hi,
ein merker ist einfach eine hilfsvariable. isr: interrup service routine
bei Bascom sind im orner samples viele programmbeispie dabei, hier der ausschnitt zum timer interrupt:
mfg jeffreyCode:'when the timer overflows, a flag named TOV0 in register TIFR is set 'You can use this to execute an ISR 'To reset the flag manual in non ISR mode you must write a 1 to the bit position 'in TIFR: Set Tifr.1 'The following code shows how to use the TIMER0 in interrupt mode 'The code is block remarked with '( en ') '( 'Configute the timer to use the clock divided by 1024 Config Timer0 = Timer , Prescale = 1024 'Define the ISR handler On Ovf0 Tim0_isr 'you may also use TIMER0 for OVF0, it is the same Enable Timer0 ' enable the timer interrupt Enable Interrupts 'allow interrupts to occur Do 'your program goes here Loop 'the following code is executed when the timer rolls over Tim0_isr: Print "*"; Return ')







Zitieren

Lesezeichen