I am new to the PIC world and was wondering if anyone can help with some source code or a flow chart to get me going on a project that has 4, 7-segment displays multiplexed with a 2x3 keypad. I am using port B to drive the segments ( 7 plus the DP) and port D to drive the anodes of the 4 dislays and also to provide the 3 columns to the keypad matrix. The 2 rows for the keypads are read in port C.
What I am looking for is the proper timing to create the display and also, while a segment is 'turned ON' also be able to see if a key is hit.
If anyone can point me in a direction I would greatly appreciate it.
Thanks in advance and have a great New Year!
Jake
snoopy Guest
Posted: Tue Dec 30, 2003 1:34 pm
Hi
for 7 segment, i am using max7221. that is really simple way
to multiplex 7 segment, max7221 works with spi communication.
For the keypad, look there are several example on internet.
ex:
output_high(PIN_C2); //put pin c2 to high
if input(PIN_C0) //if input c0 is high
{ write would you like to do (a fonction)}
if input(PIN_C1)
{ write would you like to do(a fonction)} }
output_low(PIN_C2); //put pin c2 to low
output_high(PIN_C3); //put pin c3 to high
if input(PIN_C0) //if input c0 is high
{ write would you like to do (a fonction)}}
if input(PIN_C1)
{ write would you like to do (a fonction)}}
i try to give you a really beginner soft.
before begin software, you need to think what do you want to do.
write it on the paper and after make a little step by step sequence
of your program.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum