How can I set a number for comparing with timer0???
setup_ccp1(CCP_COMPARE_RESET_TIMER); - this should set ccp1 to compare mode and when the numbers match to reset the timer.
setup_timer_0 (RTCC_DIV_8|RTCC_8_BIT); - this should set timer 0 to work with the oscillator divided by 8 and in 8 bit mode.
I suppose after that the timer should start counting, but how to set a value to cpp1 for comparison???
Can you give me a example???
Thanks!!
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Thu Aug 11, 2011 1:03 pm
What PIC are you using ? All the PICs I know of, use Timer1 with the
CCP, not Timer0.
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