PICAXE-20M DTMF, CAT, CI-V Keypad
I don't have any way one some of my radio to send DTMF sequences which can be used for activating echolink nodes and the like so I decided to make something. As I was able to spec the requirements I decided to add extra functionality such as DTMF memories and frequency and mode control of the radio using wither CAT or CI-V commands (depends on which radio I’ll use it on) also by using the keypad – this part is not yet finished but will be easy to implement.
Reading keypads is not trivial, there are dedicated chips which will do it but they cost about £5 each, whereas the PICAXE-20M and the 4 resistors (needed to hold lines high) cost about £2 and also much easier to design into a small space. The method used is as follows, connect 4 Outputs of the PIC back into 4 Inputs of the PIC. In turn activate each output which in turn which are also connected to the rows (horizontal keys) of the keypad, at the same time scan each column (vertical), which are held low with resistors, and look if any pins are high. What happens here is that if the top row of keys are active and key 2 is pressed then the column 2 pin will be pulled high also. So summing both inputs, one from the row and the other from the column (in this case on J2 this is pin2 and pin5) you can work out which key is pressed, see the diagram (not the full schematic) – J2 pins 1-4 are columns and pins 5-8 are rows.
Anyway ultimately you press a button and the PIC works out which key was pressed, it then sets the output pins to equal that key as the HT9200B DTMF generator chip sends the DTMF for 2 if the input pins equal 2 and so on. There is a DTMF enable pin which the PIC only enableds when sending DTMF and not when scanning the keypad – this allows the output pins for the keypad to be used for the DTMF chip too, also the PTT is enabled with a transistor and is put on a 500ms timer to save it disabling the PTT if there are more characters to send.
Downloads
ExpressPCB Schematic and PCB layout v2.0 (ZIP) | |
File Size: | 31 kb |
File Type: | zip |
Schematic Layout v2.0 (BMP) | |
File Size: | 412 kb |
File Type: | bmp |
PICAXE Code v2.0 (BAS) | |
File Size: | 2 kb |
File Type: | bas |