COP8SA-DM National Semiconductor, COP8SA-DM Datasheet - Page 205

no-image

COP8SA-DM

Manufacturer Part Number
COP8SA-DM
Description
MODULE DEBUGGING FOR COP8SA
Manufacturer
National Semiconductor
Datasheet

Specifications of COP8SA-DM

Module/board Type
Debugger Module
For Use With/related Products
Cop 8
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
*COP8SA-DM
The Timer Input Capture Mode can be used to measure the time between events. The
simple block diagram in Figure 4-7 shows how the COP8SAx7 can be used to measure
motor speed based on the time required for one revolution of the wheel. A magnetic
sensor is used to produce a pulse for each revolution of the wheel.
In the capture mode of operation, the timer counts down at the instruction cycle rate. In
this application, the timer T1 is set up to generate an interrupt on a T1A positive edge
transition. The timer is initialized to 0FFFF Hex and begins counting down. An edge
transition on the T1A input pin of the timer causes the current timer value to be copied
into the R1A register. In addition, it sets the timer interrupt pending flag, which causes
a program branch to memory location 0FF Hex. The VIS instruction vectors the program
to interrupt service routine for the timer. The interrupt service routine resets the
T1PNDA pending flag. It then reads the contents of R1A and stores it in RAM for later
processing. An RETI instruction is used to return to normal program execution and re-
enable subsequent interrupts (by setting the GIE bit).
On the next rising edge transition on T1A, the program returns to the interrupt service
routine. The value in R1A is read again, and compared with the previously read value.
The difference between the two captured values, multiplied by the instruction cycle time,
gives the time for one revolution. This is easily converted to a frequency. The frequency
may be displayed on a display unit using the MICROWIRE/PLUS interface and a display
driver.
NOTE:
The T1B input may be used simultaneously to measure the time between
different events.
COP8SAx7 APPLICATION IDEAS
4-13

Related parts for COP8SA-DM