Page 1 of 1

Simple c program for 7 segment LED for p18f4520

Posted: 23 Jan 2010 14:15
by ArRix
guys,

I just started to learn the C progam. and in fact i just got some problem writing the code for my project. i'm using 2 led to display the number entered. it can count up to 99. tha't is 2 digit. and the problem is , i don't extra ping from my controller(p18f4520) so i connect both led together. that's ping a for led is connected to ping a of led2 and same apply to ping b, c , d ...

i will be really appreciate if someone can provide me a simple program for my project.

thank

Regards,
ArRix

Posted: 02 Feb 2010 09:59
by anikolic
Hi,
You may use Seven Segment Display example for EasyPIC5 as a good start for your project. You may download examples written for PIC16F877A and do the necessary adjustments for your chip.
http://www.mikroe.com/zip/easypic5/easy ... 6f877a.zip
You should also take a look at the schematic of how 7 segment LED display is connected on EasyPIC5 board, so you might consider adjusting your hardware accordingly. Here's the part of manual related to this:
http://www.mikroe.com/pdf/easypic5/easy ... df#page=21

Best regards,
Aleksandar