Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
hi to everybody
i need to assign a 1/8 prescaler to tmr0
i used the command "init tmr" (init timer 0 ps0 1/8), but when i compile no error reported but the routine does not work.
with the same routine if i change the chip and use the 12f675 it work perfectly.
can some body help me with this?
thank you very much
Using the baseline PIC's is always a treat =). Don't have the time to look at the library, but you can try the following code to set the maximum prescaler. I think option_reg could be used now instead of asm option?, this is some older code.
movlw B'01000111' ;bit 7 GPWU 0 = enables wake on pin change
;bit 6 GPPU 0 = enables weak pullups on GP0, GP1, GP3
;bit 0-2 assign prescaler to TMR0 prescale
i was close to add a post here
i solved writing manully the asm code to set the option reg.
also i needed to reset the option reg after every tmr0 clearing, because when you clear tmr0 you clear also the prescaler too.
now my speed regulator for rc models work perfectly