how to write code for 4 digit 7 segment display using c lang

Status
Not open for further replies.

Anandarj

Newbie level 3
Joined
Jun 29, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
hosur
Activity points
1,306
using 4 x 7-segment digits

hi ,
any one know how to write 4 digit 7 segment led display with multiplexing approach for pic18f2480 plz guide me




regrads
R.Anandaraj
 

7 segment display using c

Hi,

I have attached the code for a six digit 7-segment display using a different PIC microcontroller. I am implementing a 999999-second counter and have explained the same below.

Multiplexing implementation is very similar to driving Led Dot Matrix. I use Timer0 interrupt for switching through each digit. Timer0 or TMR0 is an 8-bit timer which overflows every 256 (0xFF) counts. It's known that the refresh rate above 50Hz would be enough for human's eyes to see the display without recognizing the flickering. If I set TMR0 with 1:8 Prescaler, the multiplexing frequency will be

4MHz(internal OSC.)/4(working OSC)/8(prescaler)/256(max counts of TMR0)/6(number of digits) = 81.3 Hz which is good for a display.

Just an example, I have implemented (in Proteus) a 999999-second counter by using 6 Digits LED 7-Segment Multiplexing technique. There are 2 main components in the project, PIC16F627A or PIC16F628 and 6 x LED7-segment display. The schematic shows below. The crystal is 32.768KHz as usual. There is a 10KOhm pull up resistor at RA4 pin as this pin is an open-drain pin as I described in the schematic.

I hope it would be useful to you.
 

    V

    Points: 2
    Helpful Answer Positive Rating
4 digit 7 segment display

thank you sir,
now my problem is solved , im going to play with my project ...thank you
 

Re: 7 segment display using c

i cant find any attachments with this post.. please can u send those attachments as early as possible
 

Re: 7 segment display using c

i cant find any attachments with this post.. please can u send those attachments as early as possible

There are two attachments at the end of post #2
 

hi alex
have you worked CAN Protocol of this microcontroler
 

Actually I have never used PIC at all.
 

Still i m not able to view the... Attachments... Please sir tell me where can i access attachments ?

- - - Updated - - -

ohhh k now i can view attachments
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…