MikroElektronika PIC Microcontrollers PIC16 Manuel d'utilisateur Page 105

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 172
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 171 172

Commentaires sur ces manuels

Pas de commentaire