Pomoc s programem-Bascom
Moderátor: Moderátoři
Pomoc s programem-Bascom
Pls. pomozte
Děkuji
$crystal = 8000000
$baud = 19200
$hwstack = 32
$swstack = 10
$framesize = 40
$sim
Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0
Config Lcd = 16 * 2 'nastaveni lcd
Dim X As Word
Dim V As Single
Dim F As Long
Config Timer0 = Timer , Prescale = 1024
Config Timer1 = Counter , Edge = Falling , Prescale = 1
Config Portd = Input
On Ovf0 Tim0_isr
Enable Interrupts
Do
Cls
Lcd "merim rychlost"
Lowerline
Cursor Off
If Pind.2 = 1 Then
Start Timer0
End If
If Pind.3 = 1 Then
Stop Timer0
End If
Tim0_isr:
X = Timer1
Locate 2 , 1
Lcd " "
Locate 2 , 1
V = 500000 / X
Lcd Str(v)
Lcd " m/s "
Waitms 250
Tcnt0 = 0
Timer1 = 0
Return
Loop
End