View previous topic :: View next topic |
Author |
Message |
tosirius
Joined: 16 Nov 2005 Posts: 2 Location: Rockport, ME
|
Flaky H4 operation |
Posted: Mon Dec 05, 2005 10:43 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Mon Dec 05, 2005 10:59 am |
|
|
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!! |
|
![](templates/subSilver/images/spacer.gif) |
tosirius
Joined: 16 Nov 2005 Posts: 2 Location: Rockport, ME
|
Flaky H4 |
Posted: Tue Dec 06, 2005 10:57 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
Re: Flaky H4 |
Posted: Tue Dec 06, 2005 11:49 am |
|
|
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! |
|
![](templates/subSilver/images/spacer.gif) |
|