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

INTRC_IO oscillator won't start.

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



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

INTRC_IO oscillator won't start.
PostPosted: Sat Oct 17, 2009 9:43 am     Reply with quote

#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

View user's profile Send private message

PostPosted: Sat Oct 17, 2009 11:23 am     Reply with quote

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

View user's profile Send private message AIM Address

PostPosted: Sat Oct 17, 2009 1:47 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Oct 17, 2009 2:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Oct 18, 2009 2:18 pm     Reply with quote

Hi Douglas,

Maybe this shines some light on the issue?
http://www.ccsinfo.com/forum/viewtopic.php?t=33209&highlight=

Regards,
Edwin
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