??? 07/05/06 14:06 Modified: 07/05/06 14:21 Read: times |
#119677 - the reality is Responding to: ???'s previous message |
hi,
Abhishek Bk said:
But do you have an inexpensive 8051 based MCu that has 16 programmable input output lines?
Doing your way why not to switch to even smaler, let say, 8 IO lines MCU and place two ones for each relays` group? That was a kind of irony, sorry. The reality is that there is no reason for such occupation people see here. With ordinary MCU you need only 8+3 IO lines and a couple of simplest chips to do all the job. From other side, if you do not look for simple way then maybe is it time to look at PLDs? Let say, Altera EPM7128STC100 for about 10USD. As about 16 IO lines MCUs so most Atmel cheap derivatives (AT89C2051-like ones) have only 15 lines. But this is not a problem in the whole. There is magic word called "multiplexing". Use this way: - 8 lines as inputs from relays; - 3 lines for addressing slave MCUs from host to all slaves; - 3 lines for addressing relays` contacts from host MCU to all slave MCUs; - 1 back-loop data line hardwired from all slaves to host MCU. Totally it requires 8+3+3+1=15 for slave MCUs; 3+3+1=7 for host MCU. But note that you should assign slave address for each slave during flashing them. Another way: - 8 lines as inputs from relays; - 3 lines for addressing relays` contacts from host MCU to all slave MCUs; - 8 back-loop data lines (one per slave) from slaves to host MCU. Totally it requires 8+3+1=12 for slave MCUs; 3+8=11 for host MCU. Here all slaves will have the same software. There are other configurations you may imagine then. Moreover using a word "protocol" and some software work you may decrease slave MCU even to 9-lines one, for example (the key: 1-wire communication). Regards, Oleg |