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.

PIC16F690 in Half-Bridge mode

Status
Not open for further replies.

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
899
Helped
24
Reputation
48
Reaction score
26
Trophy points
1,318
Location
Dhaka, Bangladesh, Bangladesh
Activity points
8,254
I'm using PIC16F690 to drive a Half-Bridge. So far, I've generated the pulses with death time delay. But can't find any option to control the operating frequency and duty cycle. Can anyone help me in this case?
 

For Half Bridge mode, you use the CCP1 module and control through the CCP1CON register. The frequency is set by PR2. The duty cycle is set by CCPR1L.

Hope this helps.
Tahmid.
 

Thank you Tahmid. I did this program to check it.
Code:
int i;
void main() 
{
 TRISC = 0x00; // all out
 PR2 = 0x65; // clock frequency 19.61KHz
 CCP1CON = 0b10001101;
 PWM1CON = 0b10000111;

 while(1)
 {
   for(i=-5;i<86;i++)
   {
    CCPR1L = i;
    Delay_ms(20);
   }
   Delay_ms(500);
   for(i=86;i>-5;i--)
   {
    CCPR1L = i;
    Delay_ms(20);
   }
   Delay_ms(500);
 }
}

I found that frequency is changing with duty cycle. Why?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top