westaust55
Moderator
Hi all,
Recently started experimenting with PICAXE microcontrollers and have so far spent some nights working with comms to LCD displays (AXE033 = 2x16 LDC + DS1307 RTC and a 4x20 LCD).
But there is only so far one can go with having outputs alone so starting to look at setting up a keypad for some input.
Looking to do something in far less space that a standard PC keyboard for a compact experimenters set.
In searching around I have identified a couple of IC’s that will help and reduce the amount of code to get input into a PICAXE.
The first is the E-Labs ETE1144 encoder for a 4x4 16-key pad. These only require 2 inputs for “Data Valid” and “Serial Input”
The second that I have identified are the MM74C923N 20-key keypad encoder with output on 5 parallel lines (there is 74C922 for a 4x4 16-key pad as well using 4 parallel lines) plus needs a 5tgh input for the Data Available status signal/interrupt.
An archived posting (Archive 4) mentions using a 74C165 8-bit Shift register in conjunction with a 74C922 for a serial keypad configuration. Looking at this dual IC arrangement the required IO is 4 as 2 in 2 Out used for Serial Data, Data Avail, Shift/Load, Clock. Thinking that it just may be possible to invert the Data Avail signal with a transistor to directly load the shift register when a key is pressed to save one PICAXE Output so down to 3 I/O pins required. Still need to pass the Data Avail signal to the PICAXE so code knows when data is available.
The cost of the ETE1144 and the 74C922+74C165 combo is about the same.
Then, I could get a 74C923 instead of the 74C922 which will enable use of up to 20-keys (4 x 5 matrix) – that would allow me to have 5 extra keys for Special or extra values/commands. Maybe even add a few extra key type pushbuttons direct into the spare inputs of 8 bit shift register as “Shift”, “Ctrl” and “Alt” type modifier keys so each of the main keys can have multiple values. That could give 20 x 3 = 60 values.
Has anyone else gone down either of these paths and can offer comments on the pro’s and con’s.
I am leaning towards the 74C923+74C165 approach which while not as elegant does have the advantage of being able to hand 20 keys instead of the more usual 16 keys plus some “modifier” buttons.
Has anyone else gone down either of these paths?
Any comments, schematics, code examples, etc would be appreciated.
Regards
Westaust55
Recently started experimenting with PICAXE microcontrollers and have so far spent some nights working with comms to LCD displays (AXE033 = 2x16 LDC + DS1307 RTC and a 4x20 LCD).
But there is only so far one can go with having outputs alone so starting to look at setting up a keypad for some input.
Looking to do something in far less space that a standard PC keyboard for a compact experimenters set.
In searching around I have identified a couple of IC’s that will help and reduce the amount of code to get input into a PICAXE.
The first is the E-Labs ETE1144 encoder for a 4x4 16-key pad. These only require 2 inputs for “Data Valid” and “Serial Input”
The second that I have identified are the MM74C923N 20-key keypad encoder with output on 5 parallel lines (there is 74C922 for a 4x4 16-key pad as well using 4 parallel lines) plus needs a 5tgh input for the Data Available status signal/interrupt.
An archived posting (Archive 4) mentions using a 74C165 8-bit Shift register in conjunction with a 74C922 for a serial keypad configuration. Looking at this dual IC arrangement the required IO is 4 as 2 in 2 Out used for Serial Data, Data Avail, Shift/Load, Clock. Thinking that it just may be possible to invert the Data Avail signal with a transistor to directly load the shift register when a key is pressed to save one PICAXE Output so down to 3 I/O pins required. Still need to pass the Data Avail signal to the PICAXE so code knows when data is available.
The cost of the ETE1144 and the 74C922+74C165 combo is about the same.
Then, I could get a 74C923 instead of the 74C922 which will enable use of up to 20-keys (4 x 5 matrix) – that would allow me to have 5 extra keys for Special or extra values/commands. Maybe even add a few extra key type pushbuttons direct into the spare inputs of 8 bit shift register as “Shift”, “Ctrl” and “Alt” type modifier keys so each of the main keys can have multiple values. That could give 20 x 3 = 60 values.
Has anyone else gone down either of these paths and can offer comments on the pro’s and con’s.
I am leaning towards the 74C923+74C165 approach which while not as elegant does have the advantage of being able to hand 20 keys instead of the more usual 16 keys plus some “modifier” buttons.
Has anyone else gone down either of these paths?
Any comments, schematics, code examples, etc would be appreciated.
Regards
Westaust55