Giacomo Petrini

HC908QY2: PWM at 0%?

Discussion created by Giacomo Petrini on Dec 3, 2008
Latest reply on Dec 3, 2008 by bigmac
Hello,
I have this problem:
I use the TIM module in the QY2 to create a 400Hz PWM (using CW 3.1).
Here the config:

Code:
    TSC_TSTOP = 1;    TSC_TRST  = 1;                  TSC_PS = 6;                     TMODH = 0;                     TMODL = 0x7D;                   TCH1H = 0x00;              TCH1L = 0x00;              TSC1_MS1A = 1;              TSC1_TOV1 = 1;                  TSC1_ELS1B = 1;                 TSC1_ELS1A = 0;                 TSC_TRST   = 0;                 TSC_TSTOP  = 0;                 TSC_TOIE   = 1;            

The problem is that even when TCH1 == 0 I still have a 0.8% of duty cycle on the pin (it's 20 usec long).

There is a way to have the pin low always when TCH1 == 0?

Thanks Bye Jack

Outcomes