Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Setting PWM Frequency

Status
Not open for further replies.

jerpol23

Newbie level 3
Joined
Nov 11, 2015
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
52
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,


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:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top