کد:
$regfile = "M16DEF.DAT"
$crystal = 4000000
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2
Config Porta = Input
Config Portb = Output
Dim San As Byte
Config Timer1 = Timer , Prescale = 64
Enable Interrupts
Enable Timer1
If Pinb.0 = 1 Then Start Timer1
San = 0
On Timer1 P
Do
Locate 1 , 1 : Lcd San
Loop
End
P:
Incr San
If San > 10 Then : Toggle Portb.0 : San = 0 : End If
If San < 11 Then : Toggle Portb.1 : San = 0 : End If
Return
دوستان این کد رو نوشتم اما عمل نمی کنه میشه کمک کنید مشکلش پیدا شه!