Rev 2095 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed
## Section act_hwPWM -- Do not edit this line#Uncomment the line below if you want to use EEPROM with this module, dont forget to also uncomment the line in sources.listact_hwPWM_USEEEPROM=1act_hwPWM_ID=<ID>act_hwPWM_STORE_VALUE_TIMEOUT=<TIMER>act_hwPWM_STORE_VALUE_TIMEOUT_TIME=10act_hwPWM_SEND_STATUS_TIMEOUT=<TIMER>act_hwPWM_SEND_STATUS_INTERVAL_S=5act_hwPWM_FADE_TIMER=<TIMER>act_hwPWM_ENABLE_FADE=1# Examples:# for channel 1 or 2:# COM=2, WGM= 5, CS=4# will give 120Hz PWM, adjust CS to change frequency# for channel 3 or 4:# COM=2, WGM= 1, CS=3# will give 240Hz PWM, adjust CS to change frequency#Channel 1 and 2 is attached to the 16 bit timer 1#Channel 3 and 4 is attached to the 8 bit timer 0#### PWM Channel 1 and 2 ##### COM-modes:# In Fast PWM mode:# 0 - Disabled# 1 - Toggle OC1A on compare match, OC1B disabled (if WGM = 14 or 15)# 2 - Clear output on Compare match, set at bottom (non-inverting)# 3 - Set output on Compare match, clear at bottom (inverting)# In Phase correct mode:# 0 - Disabled# 1 - Toggle OC1A on compare match, OC1B disabled (if WGM = 9 or 11)# 2 - Clear output on compare match when upcounting# set when downcounting# 3 - Set output on compare match when upcounting# clear when downcounting## WGM-modes:# Mode "TOP" "Update Output" "Name"# 0 - 0xFFFF Immediate Normal# 1 - 0x00FF Top PWM, Phase correct, 8-bit# 2 - 0x01FF Top PWM, Phase correct, 9-bit# 3 - 0x03FF Top PWM, Phase correct, 10-bit# 4 - 0CR1A Immediate CTC# 5 - 0x00FF Bottom PWM, Fast, 8-bit# 6 - 0x01FF Bottom PWM, Fast, 9-bit# 7 - 0x03FF Bottom PWM, Fast, 10-bit# 8 - ICR1 Bottom PWM, Phase and frequency correct# 9 - OCR1A Bottom PWM, Phase and frequency correct# 10 - ICR1 Top PWM, Phase correct# 11 - OCR1A Top PWM, Phase correct# 12 - ICR1 Immediate CTC# 13 - Reserved# 14 - ICR1 Bottom PWM, Fast# 15 - OCR1A Bottom PWM, Fast#### PWM Channel 1, EXP_B, Timer1, OC1B ##### Select Compare Output Mode, act_hwPWM_CHx_COM# Set to 0 to disable this channel# See datasheet for more informationact_hwPWM_CH1_COM=0# Select Waveform Generation Mode, act_hwPWM_CHx_WGM# See table datasheet for informationact_hwPWM_CH1_WGM=1# Select Clock Prescaler, act_hwPWM_CHx_CS# 1 divide by 1 2 divide by 8# 3 divide by 32 4 divide by 64# 5 divide by 128 6 divide by 256# 7 divide by 1024# See datasheet for more informationact_hwPWM_CH1_CS=1# Set this to 1 to enable LED scaling on PWM outputact_hwPWM_CH1_LED=0#### PWM Channel 2, EXP_C, Timer1, OC1A ####act_hwPWM_CH2_COM=0act_hwPWM_CH2_WGM=1act_hwPWM_CH2_CS=1act_hwPWM_CH3_LED=0#### PWM Channel 3 and 4 ##### COM-modes:# In Fast PWM mode:# 0 - Disabled# 1 - Toggle output on compare match (if WGM >= 4)# 2 - Clear output on Compare match, set at bottom (non-inverting)# 3 - Set output on Compare match, clear at bottom (inverting)# In Phase correct mode:# 0 - Disabled# 1 - Toggle output on compare match (if WGM >= 4)# 2 - Clear output on compare match when upcounting# set when downcounting# 3 - Set output on compare match when upcounting# clear when downcounting## WGM-modes:# Mode "TOP" "Update Output" "Name"# 0 - 0xFF Immediate Normal# 1 - 0xFF Top PWM, Phase correct# 2 - 0CRA Immediate CTC# 3 - 0xFF Bottom PWM, Fast# 4 - Reserved# 5 - OCRA Top PWM, Phase correct# 6 - Reserved# 7 - OCRA Bottom PWM, Fast#### PWM Channel 3, EXP_F, Timer0, OC0A ####act_hwPWM_CH3_COM=0act_hwPWM_CH3_WGM=1act_hwPWM_CH3_CS=1act_hwPWM_CH3_LED=0#### PWM Channel 4, EXP_G, Timer0, OC0B ####act_hwPWM_CH4_COM=0act_hwPWM_CH4_WGM=1act_hwPWM_CH4_CS=1act_hwPWM_CH4_LED=0## End section act_hwPWM -- Do not edit this line