i need to assign a 1/8 prescaler to TMR0 (osc = XT) on this chip,
but when i do with set up tmr button it doesn't work at all
even if i try to set off the wdt.
any idea?
thank you very much
salvo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
;Variables
Dim rcvalue As byte
InitTimer0 Osc, PS0_1/8
Dir rcin In
Dir fw Out
Dir rw Out
start:
Wait Until rcin on
ClearTimer 0
Wait Until rcin off
rcvalue = tmr0
If rcvalue > 150 Then
set fw on
else
set fw off
End If
rcvalue = 0
goto start
thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi guys
i need to assign a 1/8 prescaler to TMR0 (osc = XT) on this chip,
but when i do with set up tmr button it doesn't work at all
even if i try to set off the wdt.
any idea?
thank you very much
salvo
sorry i forgot to add the basic code
here it is:
;Chip Settings
#chip 12F508,4
#config WDT=OFF, OSC=XT
;Defines (Constants)
#define rcin gpio.3
#define fw gpio.0
#define rw gpio.1
;Variables
Dim rcvalue As byte
InitTimer0 Osc, PS0_1/8
Dir rcin In
Dir fw Out
Dir rw Out
start:
Wait Until rcin on
ClearTimer 0
Wait Until rcin off
rcvalue = tmr0
If rcvalue > 150 Then
set fw on
else
set fw off
End If
rcvalue = 0
goto start
thank you