MikroElektronika PIC Microcontrollers PIC16 Uživatelský manuál Strana 105

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 172
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 171 172

Komentáře k této Příručce

Žádné komentáře