1.4.4 IOC With Timer
Modules | Limit High | Resolution |
---|---|---|
IOC/INT | 1 ms | 250 ns |
TimerX |
This method is cheap in terms of hardware modules used, but at a cost of accuracy. This method uses the pulse measurement within section Interrupt-On-Change (IOC) With Timer.
OVERVIEW
This method is similar to what the CCP module does, except it cannot latch the timer value when an event is detected (rising/fall edge). This introduces further deviation in the calculation, since software must now save the timer. Some PIC microcontrollers can specify rising and falling edge triggers, while others cannot differentiate between the two. The INT pins can be used, as well as any of the PORTB pins, if the device supports IOC. Refer to Figure 2 for a picture of what is being measured.
SETUP
After executing the setup in section Interrupt-On-Change (IOC) With Timer, the duty cycle percentage is then:
LIMITATIONS
This is the same resolution as the pulse measurements.