Example S12ZVL ADC0 triggered by TIM0 OC updates PWM duty cycle

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Example S12ZVL ADC0 triggered by TIM0 OC updates PWM duty cycle

Example S12ZVL ADC0 triggered by TIM0 OC updates PWM duty cycle

********************************************************************************
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
********************************************************************************

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1115415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20S12ZVL%20ADC0%20triggered%20by%20TIM0%20OC%20updates%20PWM%20duty%20cycle%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1115415%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3EDetailed%20Description%3A%3CBR%20%2F%3ETIM0_Ch2%20OC%20triggers%20ADC%20measurements%20on%20AN2%20(DEVKIT%20S12ZVL32%2C%20potentiometer)%20every%2050ms.%3CBR%20%2F%3EADC%20interrupt%20updates%20duty-cycle%20(0-100%25)%20of%203%20PWM%20signals%20that%20are%20shifted%20by%2090%C2%B0.%3CBR%20%2F%3EADC%20can%20work%20either%20in%20Trigger%20or%20Restart%20mode.%3CBR%20%2F%3EPWM%20signals%20are%20routed%20to%20RGB%20LEDs%20(DEVKIT%20S12ZVL32).%20%3CBR%20%2F%3E---------------------------------------------------------------------------------------------%3CBR%20%2F%3ETest%20HW%3A%20DEVKIT-S12ZVL32%3CBR%20%2F%3EMCU%3A%20S12ZVL32%3CBR%20%2F%3EDebugger%3A%20CW11%3CBR%20%2F%3ETarget%3A%20internal_FLASH%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎07-20-2018 06:14 AM
Updated by: