beautypg.com

Remote Processing RPC-210 User Manual

Page 40

background image

COUNTER/TIMERS

BASIC

SECTION 8

Page 8-3

Figure 8-3 Fr equency Measurem ent

Program COU NT5A .BAS is a multi-tasking version of
the frequency counter. It monitors the gating signal
using ON LINE . W hen the gate g oes high, a reading is
taken. While the gate is OFF or counting, you can
process other comma nds.

APPLICATION PROGRAMS

The following program s are in the COUN TER director y.
COU NT1. C through CO UNT 4.C display the current
count in hex an d decima l form at.

F i le N a me

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 genera te an interr upt.

COUNT3.BAS

Up/down count. Interrupt when
goes through 0. Auto-r eload.

COUNT4.BAS

Measures pulse width of a low
pulse.

COUNT5.BAS

Measure fr equency.

COUNT5A.BAS

Meas ure fr equency u sing 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.