MikroElektronika PIC Microcontrollers PIC16 Instrukcja Użytkownika Strona 105

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 104
For example, when handling the interrupts from TMR0
(if no other interrupts are allowed):
sub procedure interrupt
counter = counter + 1
TMR0 = 96
INTCON = $20
end sub
In case of multiple interrupts enabled, you must test which of the interrupts
occurred and then proceed with the appropriate code (interrupt handling):
sub procedure interrupt
if INTCON.TMR0IF = 1 then
counter = counter + 1
TMR0 = 96
INTCON.TMR0IF = 0
else
if INTCON.RBIF = 1 then
counter = counter + 1
TMR0 = 96
INTCON.RBIF = 0
end if
end if
end sub
See also:
Built-in Functions and Procedures
Library Functions and Procedures
mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
100
mikroBASIC
MikroElektronika: Development tools - Books - Compilers
making it simple...
page
Przeglądanie stron 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag