Page 1 of 1

HELP - KEYPAD HEADACHES

Posted: Tue Jan 02, 2018 9:49 pm
by siliconchip
hi all ive finally got to grips with the basics of I2C and I'm now applying this with the use of a hex keypad, ive created a simple flowchart and the display is showing my caption but when pressing a number on the keypad I'm getting nothing, it works fine in simulation but not in hardware ive changed ports for coloumbs and rows but no joy, I'm also using 10k resistors on the row lines and 100k resistors to ground on the coloumbs, ive also tried with no resistors, as an after thought does the master I2C need to see the keypad with an address ?? I would appreciate any input please

cheers bob

Re: HELP - KEYPAD HEADACHES

Posted: Tue Jan 02, 2018 9:57 pm
by Docara
Hi,

My stock answer for display issues is have you checked the brightness potentiometer?

Matt

Re: HELP - KEYPAD HEADACHES

Posted: Tue Jan 02, 2018 10:19 pm
by siliconchip
Hi matt
Thanks for the reply the lcd is adjusted correctly the first line "BIN" is clearly visible just no input from any key pressed on keypad

Cheers bob

Re: HELP - KEYPAD HEADACHES

Posted: Wed Jan 03, 2018 12:27 pm
by siliconchip
hi all,
ive tried changing the keypad to the generic keypad and changed to 4x4 but still no joy I have wired it using resistors as per the keypad on matrixs keypad as mentioned before but still no joy, is there a problem within flowcode concerning keypads or have I missed something important, flowcode simulation is fine but not on hardware

bob

Re: HELP - KEYPAD HEADACHES

Posted: Wed Jan 03, 2018 1:53 pm
by LeighM
I cannot yet see any issues with the keypad or the code.
Do you have an oscilloscope or logic probe to see if the column outputs are strobing?
Also, perhaps you could try driving a row input high via a resistor, say 1K, and see if you get anything on screen?

Re: HELP - KEYPAD HEADACHES

Posted: Wed Jan 03, 2018 3:14 pm
by siliconchip
hi leigh,
thanks for the reply, I tried pulling one row up via a 1k resistor and when a key is pressed on that row the lcd dims badly, ive tried a second keypad but still no joy, all the display shows is "BIN1" where it should show just "BIN" until a key is pressed does this give any clues, I shall try the logic function on my multimeter, would the port arrangement affect it ???

cheers bob

Re: HELP - KEYPAD HEADACHES

Posted: Wed Jan 03, 2018 3:48 pm
by LeighM
Hi Bob,
The BIN1 sounds like all lines high,
I would try using 10K pull downs (instead of the 100K) and use 1K in series with the driving rows (instead of the 10K)

Re: HELP - KEYPAD HEADACHES

Posted: Wed Jan 03, 2018 5:51 pm
by siliconchip
hi leigh,
I will give this a go and report back

cheers bob

Re: HELP - KEYPAD HEADACHES

Posted: Thu Jan 04, 2018 6:34 pm
by siliconchip
hi leigh
you were right thank you ive changed the 100k resistors to 10k and the 10k to 1k as you suggested, this gave me some results but I realised that the HEX keypad I selected was different in key layout to the one I had in hardware so I replaced the keypad to the generic one in flowcode and modelled it on the keypad I'm using I now have a keypad and program that nearly works, but the last 2 coloumbs wont display anything in hardware but the first 2 will leading me to think I have set the keypad correctly, could you check my settings please and a big thank you for the help so far

bob

Re: HELP - KEYPAD HEADACHES

Posted: Fri Jan 05, 2018 10:39 am
by LeighM
Try removing the I2C Master component.
Then also check the component pin property values.

Re: HELP - KEYPAD HEADACHES

Posted: Fri Jan 05, 2018 3:55 pm
by siliconchip
Hi leigh
If i remove the I2C master component will this stop the program altogether as i thought this was pivitol to the operation of the I2C function

Bob

Re: HELP - KEYPAD HEADACHES

Posted: Fri Jan 05, 2018 4:22 pm
by LeighM
Hi Bob,
No, the LCD_I2C component has an embedded I2C, so you do not need another.
Regards,
Leigh

Re: HELP - KEYPAD HEADACHES

Posted: Fri Jan 05, 2018 9:59 pm
by siliconchip
Hi leigh,
I have removed the I2C master component but this has made no difference, I have also tried different number set ups within the keypad properties - return values - int fixed but again no change I just cant seem to get rows 3 and 4 working, ive checked all connections in hardware but cannot seem to find the cause

bob