"please help"

Thread Starter

folorunsoa

Joined Aug 11, 2014
3
I am working on traffic-light-controller project using PIC18F4550 and cascaded three 74LS164 shift-registers with CCS C programming. I am having a problem with the timing. When I use timer2, as can be seen in the code below, my circuit looses 10mins within 24 hours daily. When I changed to timer0, it lost one hour daily. Can anyone in the forum help with appropriate timer setup configuration? Thank you.
folorunsoa.

//set_timer2(0);
//setup_timer_2(T2_DIV_BY_4,100,10);
//enable_interrupts(INT_TIMER2 );
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_32); //1.0 s overflow
enable_interrupts(INT_TIMER0);
enable_interrupts(INT_RB );
enable_interrupts(global);
 
Last edited:

MrChips

Joined Oct 2, 2009
30,708
You're off to a bad start.

Think about it. How does a subject title such as "please help" help anyone?

Next time please use a more descriptive subject title.
 
Top