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 support@ccsinfo.com

Flaky H4 operation

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tosirius



Joined: 16 Nov 2005
Posts: 2
Location: Rockport, ME

View user's profile Send private message

Flaky H4 operation
PostPosted: Mon Dec 05, 2005 10:43 am     Reply with quote

I have been seeing flaky 4x PLL operation on an 18F252. I was using a 20MHz crystal in HS mode and needed to speed up the processor. I switched to an 8MHz crystal and set the oscillator mode fuse to H4. It took a while (until I read comments in this forum) to figure out that I needed to do a POR to get it to work at 32MHz. Now, however, every time I recompile the code and load it into flash (using the CCS ICD-U40), I need to do a POR to get it to work at 4x. If I use the Reset MPU button in the debugger, it switches back to HS mode running at 8MHz. Is this normal?
I am using PCH 3.236/WinXP.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Dec 05, 2005 10:59 am     Reply with quote

I use this processor extensively and use the H4 for virtually all projects. I have no problems with this using the ICD2. I suspect your problem is specific to your use with the ICD-U40.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
tosirius



Joined: 16 Nov 2005
Posts: 2
Location: Rockport, ME

View user's profile Send private message

Flaky H4
PostPosted: Tue Dec 06, 2005 10:57 am     Reply with quote

I browsed the forum and found a lot of issues relating to the fuses. I changed the LVP to NOLVP (not sure why it was enabled) and the NOPUT to PUT and it all seems to be working. No clue why.
Phil
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

Re: Flaky H4
PostPosted: Tue Dec 06, 2005 11:49 am     Reply with quote

tosirius wrote:
I browsed the forum and found a lot of issues relating to the fuses. I changed the LVP to NOLVP (not sure why it was enabled) and the NOPUT to PUT and it all seems to be working. No clue why.
Phil


If Vdd=5V (many parts) then use the NOLVP (no low voltage programming) fuse. If you are using 3.3V or a "LF" part then you probably need NOLVP. Refer to the data sheet for the exact PIC you are using for specifics.

PUT = Power Up Timer (PWRT in the PIC datasheets), briefly, the PIC idles a little bit right after power up to let Vdd rise to a valid level. The PWRT only runs after a POR (Power On Reset). Also, the extra delay lets the oscillator settle a bit too.

There are some issues related to having PUT and DEBUG enabled at the same time (stated from memory so I may be confusing things). But in general, you are usually better off with the PUT fuse.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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