2003-04-14 04:37 AM
2003-04-13 08:29 PM
Dear all:
i can't get the wave form PWM1(PB.7) My_Init() SetBit (PBDDR ,7); //PB.7 --->output PWMCR = 0x20; // PWM1 (PB7) is selected ARTCSR = 0x78; // CPU clock, 62.5kHz, counter enabled PWMDCR1 = 0x00; something is woring?? help me please.......!!2003-04-13 10:14 PM
Hi,
Are you sure of the output IO? On my datasheet, I see the PWM output located from PB0 to PB3. By the way, you don't need to configure the IO in output mode, as the peripheral itself configures the IO in the right state. Rgds Florent2003-04-13 10:26 PM
Sorry, I thought you were speaking about the ST72321 MCU...PB7 IO might be OK!
Rgds Florent2003-04-13 10:55 PM
I think that the PWMDCR value is not OK. It has to be greater than ARTARR, moreover greater than 0x00. Please check ARTARR & PWMDCR values....
Rgds Florent2003-04-14 04:37 AM
Hi Florent....
i found the bug, PWMCR register does not mapping address correct in the .map file thanks for your help....