??? 05/07/09 22:04 Modified: 05/07/09 23:26 Read: times |
#165141 - How to setup Dudy cycle ADuC841 PWM |
Hello,
I need an example program to control on DC motor my code is : #include <ADUC841.H> sbit PWM0 = P3^4; sbit PWM1 = P3^3; void DELAY(long length) { while (length >=0) length--; } void pwm_setup(void) { CFG841 |= 0xC0; //P3.3 P3.4 PWMCON = 0x9F; // 1101 1111 PWM0L = 0xf0; PWM1L = 0x50; PWM0H = 0xff; PWM1H = 0x60; } void main(void) { pwm_setup(); while(1) {} } I read the datasheet don't succed to understand how to get it work How to change the duty cycle or the freaquency There is no exmple in their site about PWM Data sheet: http://www.analog.com/static/im...42_843.pdf Please help me Thanks in advance, Mayer |
Topic | Author | Date |
How to setup Dudy cycle ADuC841 PWM | 01/01/70 00:00 | |
PWM | 01/01/70 00:00 | |
ADUC841 pwm | 01/01/70 00:00 | |
Mode 5 // 1101 1111 | 01/01/70 00:00 | |
pwm code | 01/01/70 00:00 | |
Yes, use the logic analyzer![]() | 01/01/70 00:00 |