1.4.5 IOC Without a Timer

Table 1-15. IOC without Timer Code Calculations
Modules Limit High Resolution
IOC/INT 4.194 s 5.5 μs

This method uses the IOC feature to increment a single register instead of a timer.

OVERVIEW

Without a timer, the microcontroller must spend its time polling and incrementing registers. This forces the CPU to be stuck inside of the software routine until the duty cycle is finished being measured. Refer to Figure   2 for a picture of what is being measured.

SETUP

After executing the setup in section IOC Without a Timer, the duty cycle percentage can be calculated by using Figure   1.

LIMITATIONS

This is the same resolution as the pulse measurements. The uncertainty is plus or minus two clock periods.