jerpol23
Newbie level 3
Hi,
Im currently working on a project that requires 4 pwm output for the bridge of an inverter. I am using infineon's Xe161 series of microcontroller. I already have the source code but for testing purposes I need to set the frequency of the PWM to 60Hz. Here's the part that detects the zero crossing of the AC signal,
I'm currently testing the board without connecting it to the grid so it cannot detect the period of the AC line for it to compute for the frequency. What part of the source code should i change to initially set the PWM frequency to 60Hz even without the input from the AC? Thanks in advance! :razz:
Im currently working on a project that requires 4 pwm output for the bridge of an inverter. I am using infineon's Xe161 series of microcontroller. I already have the source code but for testing purposes I need to set the frequency of the PWM to 60Hz. Here's the part that detects the zero crossing of the AC signal,
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 /** ********************************************************************** * * @brief Capture unit interrupt for frequency measurement * Zero-cross period * * @param none * * @return none * ********************************************************************** **/ void CAP_isr(void) interrupt FREQ_COUNT1_INT=CC2_CC18_INT { CC2_T7 = 0x0000; Uac_period = CC2_CC18; AcPeriod_trigger = 1; } // end of interrupt CAP_isr
I'm currently testing the board without connecting it to the grid so it cannot detect the period of the AC line for it to compute for the frequency. What part of the source code should i change to initially set the PWM frequency to 60Hz even without the input from the AC? Thanks in advance! :razz:
Last edited by a moderator: