CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Keypad with 4 digit 7 segment

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Dark_CCS



Joined: 28 Apr 2021
Posts: 1

View user's profile Send private message

Keypad with 4 digit 7 segment
PostPosted: Wed Apr 28, 2021 7:26 am     Reply with quote

I need code.

Project materials: PIC16F877A, 4x4 keypad, 4 digit on 7-Segment Display.

For example : If I press number '4' , the number will be shown on display. Then if I press number '5', the number will be shown and the number '4' will be kept and passed to left display. Then if I press number '3', the number will be shown and the number '5' will be kept and passed left. The number '4' will be passed again to the left. At the end if we want to look 7 segment display, we will see the numbers like this '4 5 3'. The process will be go like this. Every number will be shown and the before kept number will be pass to left.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 28, 2021 9:55 am     Reply with quote

Create an array that holds 4 bytes.

Call the keypad routine to wait for a key to be pressed.

Shift the array to the left by 1 byte. Do this a byte at a time.

Write the character received from the keypad to the LSB of the array.

Copy the whole array to the display.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group