این برنامه هر 60 روز 0.25 ثانیه Delay داره!
میشه در مورد این برنامه یه توضیح خط به خط بدین
البته خط 4 و 5
از همه مهمتره
"ضمناً من کاربر صفر کیلومترم به بزرگی خودتون ببخشید"
$crystal = 4000000
$regfile = "m16def.dat"
Dim S As Byte , M As Byte
Config Timer1 = Timer , Prescale = 64 , Clear Timer = 1 , Compare A = Disconnect
Compare1a = &HF424
Stop Timer1
Enable Interrupts
Enable Oc1a
On Oc1a 1_sec
Start Timer1
Do
Loop
End 'end program
1_sec:
'program will go to this routine every one sec.
'you can write/insert your own code here to obtain a real Time Clock or other purpose.
Incr S
If S = 60 Then
S = 0
Incr M
End If
Cls
Lcd M ; ":" ; S
Return
میشه در مورد این برنامه یه توضیح خط به خط بدین
البته خط 4 و 5
از همه مهمتره
"ضمناً من کاربر صفر کیلومترم به بزرگی خودتون ببخشید"
$crystal = 4000000
$regfile = "m16def.dat"
Dim S As Byte , M As Byte
Config Timer1 = Timer , Prescale = 64 , Clear Timer = 1 , Compare A = Disconnect
Compare1a = &HF424
Stop Timer1
Enable Interrupts
Enable Oc1a
On Oc1a 1_sec
Start Timer1
Do
Loop
End 'end program
1_sec:
'program will go to this routine every one sec.
'you can write/insert your own code here to obtain a real Time Clock or other purpose.
Incr S
If S = 60 Then
S = 0
Incr M
End If
Cls
Lcd M ; ":" ; S
Return
دیدگاه