Witam
Próbuje zrobić komputerek do auta i mam problem Timer0 ustawiony jest na zliczanie przy zboczu opadającym ale zllicza gdy impulsator ustawi sie że daje napięcie.
To mój program
Próbuje zrobić komputerek do auta i mam problem Timer0 ustawiony jest na zliczanie przy zboczu opadającym ale zllicza gdy impulsator ustawi sie że daje napięcie.
To mój program
$regfile = "2313def.dat"
$crystal = 8000000
Config Timer0 = Counter , Edge = Falling
Config Portd.4 = Input
Set Portd.4
Dim I2 As Integer
Dim Przep_tim0 As Word
Dim I As Integer
Dim I1 As Integer
On Ovf0 Sekunda
Enable Interrupts
Enable Timer0
Cursor Off
Cls
'------------------------------------------------------------------------------------------------------
Do
I2 = Tcnt0
I = 256 * Przep_tim0
I1 = I + Tcnt0
Home
Lcd I2
Lowerline
Lcd I1 ; "impulsy"
Loop
End
'--------------------------------------------------------------------------------------------------------
Sekunda:
Incr Przep_tim0
Return