hello everyone
i want some help hope anyone can help me...
i want to interface 4x4 keypad with 89c51 and want to display on 4 seven segment
suppose on first attempt i pressed 7 xxx7
on second attempt if i pressed 4 xx74
on third attempt if i pressed 1 x741
and on fourth attemp i pressed 3 7413
problem is how to display (multiplexed) using HARDWARE as well as SOFTWARE view......................
hello everyone
i want some help hope anyone can help me...
i want to interface 4x4 keypad with 89c51 and want to display on 4 seven segment
suppose on first attempt i pressed 7 xxx7
on second attempt if i pressed 4 xx74
on third attempt if i pressed 1 x741
and on fourth attemp i pressed 3 7413
problem is how to display (multiplexed) using HARDWARE as well as SOFTWARE view......................
you must save last display value in the RAM. It will need 5 RAM address. in example, 70h, 71h 72h, 73h, 74h.
when you press a key, store the key value to 74h and then shift value of 4 RAM locations.
70h <-- 71h
71h <-- 72h
72h <-- 73h
73h <-- 74h
so, every time you must refresh your display by value of RAM address 70h - 73h.
First of all thank u so much (for ur reply)
i have a question that in c language for 89c51 keil how can i save the number in RAM location
please jst give me an example showing what u said to do ..
hope u will do ..
thanks once again
regards
Bilal
in embedded C you dont need to save it in some address specifically
unsigned char x;
x=keypad_entry;
your value will get stored in 'x' which itself is a memory location in the RAM by the name x.
now you can use x to display it on LCD