Remote-processing RPC-210 Manuel d'utilisateur Page 42

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 60
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 41
EXTERNAL INTERRUPTS SECTION 9
Page 9-2
Line 10 sets up the operating system to process interrupt
0. Lines 20 and 30 increment a counter used by the
interrupt subroutine. When INT 0 goes low, code
starting at line 500 is executed as soon as the current
RPBASIC-52 statement is finished (usually in 1 mSec).
RETI is necessary to allow other interrupts. However,
if INT 0 remains low, the interrupt program will be re-
executed starting at line 500 as soon as R ETI is
executed. To prevent this, try to reset the cause of the
interrupt. If this is not possible, then execute
550 ONITR 0
This will disable INT0. You can monitor this line by
tying it to a free input at J3 and use ON LINE to detect
when it is high again.
Interrupt Priority
INT 0 is second only to ONTICK If an ONTICK
program is exec uting, an ONITR r outine is delayed until
ONTICK is finished. ONIT R cannot be interrupt by any
other multi-tasking routine such as ON COM$, ON
LINE, etc.
APPLICATION PROGRAMS
Interrupts are part of the CPU process. For setup
example, review any of the programs below.
File name Description
COUNT1.BAS Quadrature encoder input. Counter
program generates INT 0 on 0
crossing.
COUNT2.BAS Quadrature encoder input. Counter
program generates INT 0 when
preload count matches current
count.
COUNT3.BAS Pulse input. Interrupt when count
goes through 0.
RTC-5.BAS Interrupt at preset hour, minute,
and/or second.
Vue de la page 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 59 60

Commentaires sur ces manuels

Pas de commentaire