4.3 Software Modules
The CPU is executed at 8MHz using Internal RC Oscillator. The heart beat timer used to generate interrupt is configured to overflow at the maximum value. The prescalar value is set to 1024 and still the highest overflow value of 255 (8-bit) will not be sufficient to have a delay of 1 second. A variable is used to count the entry into ISR before the duty cycle is actually changed.
- Capture
Pulse Width -
icp_rx()
- Compute
the Duty Cycle -
icp_duty_compute()
- Queue the
Sample -
icp_enq()
- Capture
with Automatic Calibration -
Compare ISR