I'm new to the ADuC841, my prior experience is with Cortex-M based microcontrollers.
I'm using ADuC841 with the dual 8-bit PWM mode on pins P3.4 and P3.3 (configured in sfr CFG841).
For a simple 50% duty cycle with full 8-bit resolution I use this code:
PWM1L = 100; // output resolution PWM0
PWM1H = 100; // output resolutionPWM1
PWM0L = 50; // dutycycle PWM0
PWM0H = 50; // dutycycle PWM1
PWMCON = 0x53; // PWM on, Mode 5, Clk/1, Clk = Fosc
This results in a nice square wave with frequency = f_xtal / 100 and just about 50% duty cycle, see screenshot:
However, when I set duty cycle to 0%, there's still a small pulse output on the pins, see screenshot:
Instead I expect the PWM pins to stay permanently at low level.
Please advise how to set PWM output to 0% duty cycle.