Hello,
here is a PS2 4x4 Keyboard, made for the Propeller.
You only need a ATTiny2313 (no external parts).
I have made the source and hex-file available for download.
have fun
Franz
Post Edited (Franz Achatz) : 7/28/2007 3:06:06 PM GMT
Franz has a lot of time
Interesting, what it costs in Middle Europe:
- PCF8574 (can do the same) Euro 1.75
- AT2313 Euro 1.30
- Analogue solution, as just discussed in a parallel thread (8 resistors, plus maybe an NE 555 plus 2 capacitors for an FM or PWM type ADC) Euro 0.40, but > 10 parts to handle! And the NE 555 does not run well from 3.3 V...
Alas, the simplest solution to use some Prop pins seems out of question So we can say that an I/O pin of the Prop is worth more than 20 cents! Calculating down from the chip price an I/O pin is worth less than 40 cents...
1. I have lots of AT90S2313's will the hex file work with that chip or do I need re-compile the program.
2. If you answer to 1 is Yes, What compiler did you use to write this keyboard program with.
I did this with an 8x8 keyboard matrix using a PICAXE, serial tx connection to FemtoBasic.
I'm curious if you considered the problem of damage to the chip when multiple keys are pressed?
I included a bunch of diodes in my design. And of course 10k resistors for pulldown. Not required here?
Oldbitcollector said...
I did this with an 8x8 keyboard matrix using a PICAXE ...I'm curious if you considered the problem of damage to the chip when multiple keys are pressed?
It's only a problem if more than one PBx line are outputs at the same time. Shorting an output high to an output low through the switches is the problem, with only one output there's nothing for it to short to.
As hippy said: Use one driving pin at a time and keep all others TS.
The AVRs have the nice feature of a programmable pull-up to each input (similar to the internal pull-up of the Prop's reset in.)
Comments
Interesting, what it costs in Middle Europe:
- PCF8574 (can do the same) Euro 1.75
- AT2313 Euro 1.30
- Analogue solution, as just discussed in a parallel thread (8 resistors, plus maybe an NE 555 plus 2 capacitors for an FM or PWM type ADC) Euro 0.40, but > 10 parts to handle! And the NE 555 does not run well from 3.3 V...
Alas, the simplest solution to use some Prop pins seems out of question So we can say that an I/O pin of the Prop is worth more than 20 cents! Calculating down from the chip price an I/O pin is worth less than 40 cents...
15 minutes for setting up the hardware and 1 1/2 hr programming.
have fun
Franz
1. I have lots of AT90S2313's will the hex file work with that chip or do I need re-compile the program.
2. If you answer to 1 is Yes, What compiler did you use to write this keyboard program with.
Thanks
Roadster
I did this with an 8x8 keyboard matrix using a PICAXE, serial tx connection to FemtoBasic.
I'm curious if you considered the problem of damage to the chip when multiple keys are pressed?
I included a bunch of diodes in my design. And of course 10k resistors for pulldown. Not required here?
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
It's only a problem if more than one PBx line are outputs at the same time. Shorting an output high to an output low through the switches is the problem, with only one output there's nothing for it to short to.
The AVRs have the nice feature of a programmable pull-up to each input (similar to the internal pull-up of the Prop's reset in.)