Remote-processing RPC-220 Manuel d'utilisateur Page 31

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 47
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 30
COUNTER/TIMERS SECTION 8
Page 8-2
TIMER 2
Timer 2 is used to m easure time between edges, genera te
timed interrupts, or set, clear, and toggle certain bits at
timed intervals. CP U port P1 (located on J3 and shared
with the LCD display port) and P4 are mostly used for
this purpose.
Timer 2 can use an external (at CP U port P1. 4) or
internal clock. The internal clock frequency is 1.8432
Mhz. and can be divided down via TM2CON register.
Review 8XC552OV.PDF file for more timer 2
information. Text starts on the second page (3-474).
AN418. PDF is an application note for timer 2.
NOTE: There is an err or in the 8X C552O V. PDF data
file. Figures 6 and 7 are in error. The RTE
register in Figure 6 resets bits P4.0 to P4.5 on
a match to CM1, not CM2. The STE register
in Figur e 7 sets bits P4. 0 to P4. 5 on a match to
CM1, not CM2.
APPLICATION PROGRAMS
The following programs are in the subdirectory as
shown. All programs can use the RTC output for
counting and pulse width m easurement to tr y them out.
See SECTION 7, SQUAR E WAVE OU TPUT for
generating information.
The programs list the input and control lines.
File name Description
timer0\timer0a.c Timer 0 in counter mode.
Displays current count using J3-19
input.
timer0\timer0b.c Timer 0 in timing mode.
Measures high pulse time (35 ms
maximum) at J3-6.
timer2\timer2a.c Timer 2 used to generate timed
interrupts. Can also u se to
generate timed pulse outputs.
timer2\timer2b.c Measure pulse widths (rising edge
to rising edge). Prints ou t time in
micro-seconds.
timer2\timer2c.c Measure positive pulse width.
Faster interrupt routine for shorter
pulses. Prints out number of
counter ticks.
timer2\timer2d.c Outputs delayed pulses. Need
oscilloscope to view.
Vue de la page 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 46 47

Commentaires sur ces manuels

Pas de commentaire