Instruction manual

Table Of Contents
PC215E Page 86
6.6.7.4 Prepare an Event Time Recorder - TCsetEventRecorder
Sets up an event recorder which records the times of positive edges on a PPI Port C bit 0
digital input (DI) line. The times recorded are the elapsed time since the given stopwatch was
started). This is performed by using a stopwatch, previously setup by a call to
TCsetStopwatch, and enabling the DI line to generate an interrupt. An interrupt service routine
(ISR) stores the elapsed time from the stopwatch into a previously allocated data buffer for
each event. See section 4.2.5 for more details on the Event Recorder application.
i = TCsetEventRecorder (h, hS, chip, hB)
where
h Integer. Board handle as issued by function
registerBoard.
hS Integer. Stopwatch handle as issued by the
TCsetStopwatch function.
chip Integer. Address offset of the digital input chip
from which Port C bit 0 will be used as the event
input. Use one of the following pre-defined
constants:-
PPIX = 0
PPIY = 8
PPIZ = 16
hB Integer. Buffer handle as issued by the
allocateBuf function. This function must have
been called with the type argument set to 4,
since the time reading is a 4-byte long integer.
Returns Integer:
Positive handle to the event recorder. Use this handle to call the
TCfreeEventRecorder function when finished.
or ERRHANDLE
ERRCHAN
ERRBUFFER
Prior Calls registerBoard
TCsetStopwatch
allocateBuf
See Also TCfreeEventRecorder
enableInterrupts