CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

using CCP to create 1KHz signal
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jseidmann



Joined: 04 Nov 2004
Posts: 67

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 24, 2006 12:51 pm     Reply with quote

PCM,

We manufacture a finished product here and there is a socket where the microcontroller goes. I have simply switched the PIC18F252 to the PIC18F2620 and burned the HEX file to it. The circuit allows being programmed in circuit. I am using an oscilloscope to view the signal off of pin C1.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 24, 2006 1:48 pm     Reply with quote

Look at this errata document for the 18F2620:
http://ww1.microchip.com/downloads/en/devicedoc/80224b.pdf
It says:
Quote:

8. Module: ECCP and CCP
The CCP1 and CCP2 configured for PWM mode,
with 1:1 Timer2 prescaler and duty cycle set to the
period minus 1, may result in the PWM output(s)
remaining at a logic low level.
Clearing the PR2 register to select the fastest
period may also result in the output(s) remaining at
a logic low output level.


This doesn't fit your exact situation but partly it does.
You may be experiencing a related problem. Microchip may not know
all of the erratas that exist in that PIC. You may have found another
one.

I would take a small test program and start to change the parameters
slightly. Use a different timer prescaler. Try to find a point at which
it starts working.

If nothing works, and there's no work-around, then select another PIC
that doesn't have that errata.
jseidmann



Joined: 04 Nov 2004
Posts: 67

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 24, 2006 3:23 pm     Reply with quote

PCM,

Thanks for your post! I tried it with a T1_DIV_2 and that worked no problem. I just had to change the CCP_1 value to get the frequency to what it should be and voila, it worked perfectly. Thank you for all your help, I certainly couldnt have gotten this fixed without you all.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group