When the Operate property is 1, the oCycleTimeH Object monitors I/O line 17 for a specified transition. When the input transitions, a counter value is copied to the Duration property and the counter is reset to 0. The Mode property selects the transition that causes the copy which can be one of the following:
Every falling edge
Every rising edge
Every 4th rising edge
Every 16th rising edge
When the transition occurs, the 16-bit value of the counter is copied into the Value property. If another transition occurs before the Value property is read, the old value is overwritten by the new value. Note that any changes to the mode property only take affect when the operate property transitions from 0 to 1. The DIO property is an instance of the oCCP object which is used to do the actual cycle time calculation. When the operate property transitions from 0 to 1, the oCCP object is configured so that it will use an oTimer object with an internal clock and a 1:1 prescale. Note that all instances of the oTimer object will use the PIC's Timer1 Hardware Module. Therefore, all instances of the oTimer object and objects that use the oTimer object will have the same 16-Bit count. |