
COUNTER/TIMERS BASIC SECTION 8
Page 8-3
Figure 8-3 Fr equency Measurem ent
Program COUNT5A.BAS is a multi-tasking version of
the frequency counter. It monitors the gating signal
using ON LINE . W hen the gate goes high, a reading is
taken. While the gate is OFF or counting, you can
process other commands.
APPLICATION PROGRAMS
The following programs are in the COUN TER directory.
COUNT1. C through CO UNT4.C display the current
count in hex and decimal format.
File Name Description
COUNT1.BAS Quadrature encoder mode.
Interrupt on carry or borrow.
Uses latch.
COUNT2.BAS Quadrature encoder mode.
Interrupts when encoder moves
through a position. Uses carry
to generate an interr upt.
COUNT3.BAS Up/down count. Interrupt when
goes through 0. Auto-reload.
COUNT4.BAS Measures pulse width of a low
pulse.
COUNT5.BAS Measure frequency.
COUNT5A.BAS Measure frequency using multi-
tasking method.
Interrupts used in some demo programs may be ignored
simply by not jumpering the interrupt line. The curr ent
count displayed is not interrupt driven.
Komentáře k této Příručce