Table of Contents Previous topic Next topic
Extension Examples->Counters 0 and 1->Introduction
This example demonstrates a method of driving the counters of timer/counter 0 and timer/counter 1. It illustrates the use of GetPortPins() to toggle pins 4 and 5 of port 3. The simulator detects the falling edges that the extension applies to these pins and, providing the timers 0 and 1 have been correctly setup as counters, counters 0 and 1 will be incremented at each falling edge.
The example could easily be extended so that gating control is used using ex0 and ex1.
This example does not support the capture state feature and so if a simulator state is captured and later restored, the extension status will not be restored with it.
This example does not make use of the nExtensionState parameter but it must nevertheless return a not zero value in response to the Initialise() call.