$regfile = "m16def.dat" ' specify the used micro
$crystal = 8000000
$lib "lcd4.lib"
Enable Interrupts
Config Lcdpin = Pin , Rs = Porta.0 , E = Porta.2 , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7
Config Lcd = 16 * 2
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
Dim B As Integer
Config Timer1 = Timer , Prescale = 256 'Konfiguriere Timer1
Enable Timer1 'schalte den Timer1 ein
On Timer1 Int_1 'verzweige bei Timer1 uberlauf zu Isr_von_Timer1
Enable Interrupts
Timer1 = 31285 'Timer1 soll schon von 34285 wegzahlen
Do
Locate 1 , 1
Lcd B
Loop
End
Int_1: 'ISR von Timer1
Timer1 = 31285 'Timer1 soll wieder von 34285 wegzahlen
B = B + 1
Return
Сейчас этот форум просматривают: Yandex [Bot] и гости: 5