通过使用74HC245、74HC138以及AT89S52设计了一种用于多路开关状态检测的系统,74HC245有一个低有效的OE使能端,同时74HC138的输出也是低有效的,这样一个74HC138的输出就能控制8个74HC245的OE端。同时74HC245有8个输入管脚,因此,通过适当地设计74HC245的前端电路,就能同时对64路开关的状态进行有效地检测。设计仅占用了11个AT89S52的管脚资源,设计成本非常低,同时系统稳定性也非常高。%A method to detect the state of multi-switch is designed,by using 74HC245,74HC138 and AT89S52.74HC245 has a port OE which is low effective.It can work with 74HC138 because 74HC138's output is low effective too.One 74HC138 can corporate with eight 74HC245,and 74HC245 has eight input pins.So this design can detect the state of 64 switch at the same time.This design used only 11 pins of AT89S52.The design cost is very low,meanwhile system stability is also very high.
展开▼