View previous topic :: View next topic |
Author |
Message |
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
INTRC_IO oscillator won't start. |
Posted: Sat Oct 17, 2009 9:43 am |
|
|
#include <18F2220.h>
#device adc=8
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#fuses NOLVP,WDT256,NOPUT,NOBROWNOUT,NOCPD,NOWRT,NOEBTR,NOPROTECT
#use delay(clock=4000000)
The 5v PIC18F2220 won't oscillate at least that's what the CCS debugger IDE says. I tried setting OSCTUN ( redundant since CCS sets it anyway based on #use delay) and OSCCAL=0x00 mid range but again no oscillation. I know with other PICS ex 12F873 the calibration can get wiped during an erase and
#rom 0x3FF = {0x3480} //// sets the internal oscillator to mid freq near 4mhz will restore it.
Any ideas on the 18F2220? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Oct 17, 2009 11:23 am |
|
|
There are erratas on the internal oscillator for the 18F2220 for silicon
rev B2 and B3:
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010266#1
What silicon revision do you have ? The ICD debugger should report
the rev when it connects to the PIC. ICD2 does that in MPLAB so I
assume that CCS also displays it. |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Sat Oct 17, 2009 1:47 pm |
|
|
CCS debugger using USB40 reports device 0580 rev03
Microchip ver B3 errata says
Work around
Several work arounds may be used.
1. Enable the WDT in Configuration register,
CONFIG2H and place a CLRWDT instruction
somewhere in the main loop.
(put WDT in the #FUSES and cleared WDT in main still no start)
2. Configure the internal oscillator block as the
primary clock source using Configuration
Register 1H.
( no clue as to what Microchip is saying)
3. Any technique that starts the INTRC at Reset
and does not disable it may be used.
( so helpful an example would help )
4. Ensure that VDD is below 4.5V when starting
the INTRC clock source.
( not viable the circuit has a fixed 5V )
There may be other work arounds.
( many just one that works would be nice)
I don't get the Microchip speak what is the address of
CONFIG2H and Configuration resister 1H
or should there be an errata to the errata to explain this better. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Oct 17, 2009 2:21 pm |
|
|
Quote: |
2. Configure the internal oscillator block as the
primary clock source using Configuration
Register 1H.
|
It seems to me that you're doing this by using the INTRC_IO fuse,
but it doesn't appear to help.
You could try to buy the latest silicon rev. Digikey will do this for you,
if you request it. Or you could go to a related PIC that doesn't have the
errata. You could look at the 18F2420. |
|
|
Torello
Joined: 29 Sep 2006 Posts: 120
|
|
|
|