Aug 7, 2013 #1 R rangerskm Full Member level 4 Joined Jan 23, 2013 Messages 199 Helped 0 Reputation 2 Reaction score 0 Trophy points 1,296 Activity points 2,663 can any one explain the operation of capture compare and PWM register with example program in assembly language and embedded C.
can any one explain the operation of capture compare and PWM register with example program in assembly language and embedded C.
Aug 7, 2013 #2 D Dale Gregg Junior Member level 3 Joined Jul 23, 2013 Messages 29 Helped 2 Reputation 4 Reaction score 2 Trophy points 3 Location Leeds, United Kingdom Activity points 263 https://ww1.microchip.com/downloads/en/devicedoc/39582b.pdf page 65 onward, what are you wanting to do with it, Ive used the PWM Code: PR2 = 255; //Timer2 Period Register - Period of PWM (MAX 255) CCP1CON = 0b00111100; //<5:4> DC LSBs, <3:2> PWM Mode T2CON = 0b00000100; //<2> enables Timer2, <1:0> prescaler = 1 CCPR1L = sinedc[dctrans]; That initializes the PWM and set DC to values of a char string. If u use the data sheet that'll tell u everything u need to switch on (or off) to get it to do what u want hope this helps
https://ww1.microchip.com/downloads/en/devicedoc/39582b.pdf page 65 onward, what are you wanting to do with it, Ive used the PWM Code: PR2 = 255; //Timer2 Period Register - Period of PWM (MAX 255) CCP1CON = 0b00111100; //<5:4> DC LSBs, <3:2> PWM Mode T2CON = 0b00000100; //<2> enables Timer2, <1:0> prescaler = 1 CCPR1L = sinedc[dctrans]; That initializes the PWM and set DC to values of a char string. If u use the data sheet that'll tell u everything u need to switch on (or off) to get it to do what u want hope this helps
Aug 8, 2013 #3 R rangerskm Full Member level 4 Joined Jan 23, 2013 Messages 199 Helped 0 Reputation 2 Reaction score 0 Trophy points 1,296 Activity points 2,663 can you explain with sample calculation for PWM operation
Aug 8, 2013 #4 V vinothksr08 Member level 3 Joined Jun 18, 2013 Messages 66 Helped 7 Reputation 14 Reaction score 7 Trophy points 8 Location Tamilnadu, India Activity points 367 CCP-Campture Compare PWM... this is the combination of three(capture, compare, pwm) module... it will associated with timer.... for more detail refer this link **broken link removed**
CCP-Campture Compare PWM... this is the combination of three(capture, compare, pwm) module... it will associated with timer.... for more detail refer this link **broken link removed**