Example S12ZVL ADC0 triggered by TIM0 OC updates PWM duty cycle

Document created by Daniel Martynek Employee on Jul 20, 2018
Version 1Show Document
  • View in full screen mode

********************************************************************************
Detailed Description:
TIM0_Ch2 OC triggers ADC measurements on AN2 (DEVKIT S12ZVL32, potentiometer) every 50ms.
ADC interrupt updates duty-cycle (0-100%) of 3 PWM signals that are shifted by 90°.
ADC can work either in Trigger or Restart mode.
PWM signals are routed to RGB LEDs (DEVKIT S12ZVL32).
---------------------------------------------------------------------------------------------
Test HW: DEVKIT-S12ZVL32
MCU: S12ZVL32
Debugger: CW11
Target: internal_FLASH
********************************************************************************

Outcomes