|
||||||||
|
||||||||
|
DAN136 Interface to a Radio Shack 270-215 Keypad By Michael Simpson
I first came across this keypad a couple of years ago. Back then it cost about $20. However its selling now for around $7.99. It has 15 keys that are mapped in a matrix. The membrane can be written on as well. I'm going to create a simple library so that you can add one to your next application.
The Above matrix is used to generate the keys. Note that I show the pin/port combos the pin is the pin number on the keypad connector. The port is the IO port it is connected to. The combos were setup this way so the connector would match up with ports 0-7.
Here I show a simple hookup to a DiosChip 28. The connection is the same for all the Dios product lines.
Here I show the right angle header I used for connecting the keypad connector to a breadboard.
Here you can see the connector connected to DiosChip 28
Here connected to a Dios Module
Connection to Dios Ultra
The following program demonstrates the library commands. It actually contains the library commands. Note that you could just include the library. 'Interface to Radio Shack 270-215 Keypad 'First matrix line A little information about the program. Three pins are set for output. 2,4,5 They are accessed sequentially and set low one at a time the remaining pins 0,1,3,6,7 are mapped using the customeport command. This process allows us to test the keys on each leg of the matrix. Using the lookdown command we can then return the key code for the corresponding matrix match.
I had the need for a simple 4 pin binary output for the key pad. I used the Dios32pin module to do this. By using a 6 wire cable I provided the 4 output bits and 2 power pins. 'Interface to Radio Shack 270-215 Keypad
(4bit output)
Here is an example on using the hardware UART to output the data. Only pin 9 TXdata and power leads are needed. 'Interface to Radio Shack 270-215 Keypad
(Serial Output)
Parts list
|
Copyright © 2001 - 2007 Kronos Robotics