Hi Johan,
Which port/ports are you using for the LCD?
Hi Johan,
Which port/ports are you using for the LCD?
I am using RD2,RD3,RD4,RD5,RD6,RD7 ( cannot change these , as these are hardwired on my easypic4 )
The problem starts even before PWM channels are active
You'll need to disable PWM for PORTD pins you're using to control your LCD. See if changing
PWMCON0 = %01010100 to PWMCON0 = %01000100 helps. %01010100 turns them ALL on
for the 18F4431.
Also check your config settings. CONFIG3H has an option where you can force PWM4 output
to be on RB5 or RD5. You'll obviously want this on RB5 since you're using RD5 for your LCD.
Hi Bruce,
I have tested it, the problem is the PWM7. How to disable it?
I want PWM 1,3,5 only , but the PWMCON0 does not have option , the best option is %01111111 ( all odd pins enabled , independent )
Is there any other way to disable PWM 7?
Johan
Last edited by Johan; - 26th October 2007 at 19:22.
I don't have an 18F4431 to test, but I don't see any options for only 1,3,5 as PWM outputs.
It appears from looking at PWMCON0 that a value of %01000100 would disable PWM outputs
6 & 7, but I can't comfirm since I don't have one to test.
Yes, this is the problem, if I switchoff PWM6,7 with %01000100 , I will loose the I/O ports that occupied by PWM0,2,4
I think I have to change the LCD wiring ,
or alternatively, can I combine 2 CCP PWM ( HPWM ) + 1 PCPWM ?
Thanks,
Johan
Bookmarks