I'm trying to set up the CCP1 output for PWM using timer 2. Everything is fine except the output "looks" like it's capacitively coupled and the Vpp is very low. I'm assuming it's a setup problem but I can't figure it out. Any help would be appreciated.
The configuration won't affect the resulting waveform (except to change the frequency, and mark space ratio). You have a hardware problem. What is attached to the pin?. Double check the resistances of the connections. Are you sure the scope's ground is connected to the Vss on the PIC directly?.
Best Wishes
DonWare
Joined: 18 Jan 2006 Posts: 43
Posted: Wed Oct 17, 2007 9:35 am
The scope is the only thing connected. I checked the probe, it's DC coupled and shows VCC properley. The ground is right at the PIC. I also tried another probe.
What if I write to TRISC directly for that port ?
DonWare
Joined: 18 Jan 2006 Posts: 43
Posted: Wed Oct 17, 2007 9:44 am
I tried writing to TRISC and the signal went away.
The output is not looking at a short. I touched the scope lead and the signal went wild as if it were an antenna. It really seems that the output is not configured properly.
I'll look for a new IC.
DonWare
Joined: 18 Jan 2006 Posts: 43
Solved
Posted: Wed Oct 17, 2007 10:44 am
What I did wrong was use setup_ccp2 and set_pwm2 instead of 1.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum