Your reload number is wrong for 8 MHz.
Try this
[code:1:ed4ab0defd]$regfile = "m88def.dat"
$crystal = 8000000
Dim Cnt As Long
Dim Result As Long
Config Timer0 = Counter , Edge = Falling
Config Timer1 = Timer , Prescale = 256
'counter input T0
Config Pind.5 = Input
On Timer0 Cnt_sub
On Timer1 Timer_irq
Enable Timer0
Enable Timer1
Enable Interrupts
Load Timer1 , 31250
'====================================
Do
Print Result ; " Hz"
Wait 1
Loop
End
'====================================
Cnt_sub:
Incr Cnt
Return
Timer_irq:
Load Timer1 , 31250
Cnt = Cnt * &HFF
Cnt = Timer0 + Cnt
Result = Cnt
Timer0 = 0
Cnt = 0
Return
[/code:1:ed4ab0defd]
For test connect a 20 cm wire to PD4.
The display should show the frequency of the power network 50 Hz (or 60).
↧