I am working with a couple of premade clock and counter boards that I am building a wireless system around to allow them to be xbee remote controlled.
While reading over their datasheets, I discovered something that I had not seen before.
It appears that they are using the MCU pins for simultaneous input and output. They are constantly outputting a multiplexed signal for a display, but if at any time one of those pins is pulled high by a button, the MCU responds.
I know that this is not really an arduino thing, but one of the MCUs involved is still atmel (ATtiny2313) so I think some of this might apply to arduino as well. Additionally, you guys on this forum seem to know just about everything, so I figured I would give it a shot.
I know that it is possible to directly read the pin register using "PIND" for instance. This should theoretically give you the current value of the pin regardless of whether it is set as an input or an output.
I also dont know quite what is actually happening when we drive an output. Can the pin remain in a "tristate" or "high impedance" state, but still be pulled high or low by the MCU? This could allow an external switch to override the state set by the MCU.
If anyone actually wants datasheets to these boards, one of the devices is the MXA069, datasheet HERE.
My questions are much more general than project specific though.