I'd like to build a controller (input only) for my PC which uses an 08.
I need at least six switches. The reason I'm building this controller is that computer keyboards don't tend to like three or more buttons held at once - depending on the keyboard and which keys, of course - so all button combinations would have to work.
I intend on sending the status out via the serial out pin, where a Windows application will send translated keyboard events to the topmost window.
Initially I simply used a 3x2 keypad grid, scanning 3 columns and polling 2 rows. This requires five PICAXE I/O pins - and when one has to be serial out, there are only four available for use.
If I use active-low logic, (ie select a column by driving it low and leaving the other ones high) then I only need two outputs from the PICAXE to drive two of the columns, and the third column would be simply the status of the other two columns XORed together - but this requires 'complex' additional circuitry. (Something more than diodes/resistors/capacitors, in other words).
Another idea would be to use resistors in series (~1K, ~2K, ~4K, ~8K), use the push switches to short the first three out and connect the point between the 4K and 8K to the PICAXE's ADC - but I doubt this is reliable.
There might be a nice easy method which I've completely missed, but I can't work it out..!
 
Edited by - benryves on 27/06/2007 13:33:59
I need at least six switches. The reason I'm building this controller is that computer keyboards don't tend to like three or more buttons held at once - depending on the keyboard and which keys, of course - so all button combinations would have to work.
I intend on sending the status out via the serial out pin, where a Windows application will send translated keyboard events to the topmost window.
Initially I simply used a 3x2 keypad grid, scanning 3 columns and polling 2 rows. This requires five PICAXE I/O pins - and when one has to be serial out, there are only four available for use.
If I use active-low logic, (ie select a column by driving it low and leaving the other ones high) then I only need two outputs from the PICAXE to drive two of the columns, and the third column would be simply the status of the other two columns XORed together - but this requires 'complex' additional circuitry. (Something more than diodes/resistors/capacitors, in other words).
Another idea would be to use resistors in series (~1K, ~2K, ~4K, ~8K), use the push switches to short the first three out and connect the point between the 4K and 8K to the PICAXE's ADC - but I doubt this is reliable.
There might be a nice easy method which I've completely missed, but I can't work it out..!
 
Edited by - benryves on 27/06/2007 13:33:59