Timer/PCA exercises




Emulation of the PCA 8-bit PWM mode

Use a timer interrupt service routine to implement the 8-bit PWM mode of the programmable counter array by software. Use appropriate variables to represent the PCA main counter and capture/compare registers. In each execution of the timer interrupt service routine the main counter should be incremented and the required operation mode should be realized.