??? 02/18/06 20:19 Read: times |
#110276 - Thumbwheels or ROTARY? Responding to: ???'s previous message |
I'm not sure that a dedicated MCU is the most power-efficient way to go. Perhaps it is.
Presently, I have only two such switch types in house. One type has a common terminal and ten in/out terminals, and the other has a common terminal and four "bit" terminals. In the case of the four-bit type, you can approach them in any of several ways. First of all, you could connect all the "bit" terminals for all the switches, drive them with an output port bit, and look at each of the six individual common terminals. That uses a total of ten pins, right? Of course, you can use the six inputs for other purposes when you're done, so long as you don't drive the four "bit" pins after you're done. So long as you don't drive those pins, you'll lose little power and they'll not interfere with whatever else you do with the other six, whether they're inputs our outputs. With the common + 10 discrete-terminal type, you'd probably want to save MCU pins by using a 74HC154, which is a 16-output data distributor/decoder. It comes in a 24-pin skinny-dip if that's a convenient package for you for your prototype. The reason for the 16 outputs is so that you can disable the things by selecting an unused output, or by driving the enable, which you can't do with the 74HC42. What you might consider doing with that is hooking the discrete outputs together and driving them with the '154 then looking at each of the common pins with input port bits. Unfortunately, you won't be able to disable the drive to the common pins, because the '154 doesn't go tristate when disabled. There are, of course, other options, e.g. a shift register on the six input bits, which would isolate your MCU from the logic, with the exception of one bit, but I don't know whta your other constraints are. I'd suggest you explain in more detail what your intention is. If you really want to stick with the dedicated MCU, then the trick will be to minimize the amount of external logic. However, since you can probably save on pins by simply using more inputs than outputs, you can subsequently use those pins for something else, hence, use the other MCU's that are already in the system. Eventually, it will come down to counting pins and to adding up microwatts. Have you tried doing that yet? It's possible that you might want to consider a single MCU with lots of pins rather than two or more with fewer. That will save on power as well, depending of course, on the MCU. There are some devices, CMOS, of course, in packages convenient for prototyping, e.g. PLCC-52, PLCC-68, etc, that are convenient for prototyping, yet have enough pins to drive several displays directly, deal with the switches quite conveniently, etc. If you're planning to build a PCB, then there are high-pin-count devices of many sorts that will work. The MCU core, however, is an overhead that I wouldn't want to multiply just to make the design simple, even if it has a power-down mode. RE |