expert
Member level 2
BEGIN CLRF PORTB
WAITHI BTFSS PORTA,0
GOTO WAITHI
CLRF TMR0 ;START TMR0
TESTST BTFSC PORTA,0
GOTO TESTST
MOVF TMR0,W ;READ TMR0 INTO W
SUBLW .148
BTFSC STATUS,CARRY
GOTO WAITHI
i'm using a 4Mhz cystal and the prescaler is 1:1
do anyone know how to calculate the value for .148
the answer should approximate to 7ms ?
can anyone provide me the formula and calculation??
thxs
WAITHI BTFSS PORTA,0
GOTO WAITHI
CLRF TMR0 ;START TMR0
TESTST BTFSC PORTA,0
GOTO TESTST
MOVF TMR0,W ;READ TMR0 INTO W
SUBLW .148
BTFSC STATUS,CARRY
GOTO WAITHI
i'm using a 4Mhz cystal and the prescaler is 1:1
do anyone know how to calculate the value for .148
the answer should approximate to 7ms ?
can anyone provide me the formula and calculation??
thxs