MikroElektronika PIC Microcontrollers PIC16 Bedienungsanleitung Seite 105

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 172
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 171 172

Kommentare zu diesen Handbüchern

Keine Kommentare