??? 12/17/08 05:21 Read: times |
#160982 - How to initialise PWM using PCA |
Dear All,
I am trying to build PWM using PCA in P89C669,but there are problem regarding to O/P.I also used the cookbook for it and develop a program it goes well in mode 0 ,but when i'm trying it on mode 3 the o/p on DSO will not show squre wave it just like as a sine wave.For reference i;m send my code please suggest the proper solution as early as possible. void init_pwm(void) { Pwm=1; // For alternate function CMOD=0x02; // Clock input 4 250 nsec at 16 MHz CL=0; //Frequency of output 4 15.6 KHz CH=0; // ; Module 0 in PWM mode CCAP3L=0; CCAP3H=0x80; // 50 percent duty cycle CCAPM3=0x42; CR=1; // Turn on PCA timer } thanks & regards Mayur |
Topic | Author | Date |
How to initialise PWM using PCA | 01/01/70 00:00 | |
Why a new thread.... | 01/01/70 00:00 |