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

[resolved] Can’t start PIC18F4220 with internal oscillator

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



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

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

[resolved] Can’t start PIC18F4220 with internal oscillator
PostPosted: Sat Mar 24, 2007 4:35 am     Reply with quote

Colleagues,

I can’t seem to get the PIC18F4220 with an internal oscillator going. Debugger gives a “Could not start target:…” message. Could you take a look at my fuses, please?

CCS v3.240
PIC18LF4220 (TQFP-44)
ICD-U40
Test ICD – pass
Test target – pass
Error message: Could not start target:…
After the message, MCLR# = Vcc = +4.1V. Pulled up by 43k resistor (I just didn't have 47k among my supplies)
OSC1 and OSC2 pins are unconnected at the moment, but eventually they will be used for I/O

Code:

#include <18F4220.h>
#device ICD=TRUE
#device adc=10

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES WDT128                   //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES BORV20                   //Brownout reset at 2.0V
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOCPD                    //No EE protection
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES DEBUG                    //Debug mode for use with ICD
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOWRTD                   //Data EEPROM not write protected
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES NOEBTR                   //Memory not protected from table reads
#FUSES NOEBTRB                  //Boot block not protected from table reads
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPB                    //No Boot Block code protection
#FUSES NOWRTB                   //Boot block not write protected
#FUSES NOWRTC                   //configuration not registers write protected
#FUSES PBADEN                   //PORTB pins are configured as analog input channels on RESET

#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=9,stream=pcrs232)
#use i2c(Master,Fast,sda=PIN_C4,scl=PIN_C3)


Cheers,
Nick


Last edited by kender on Mon Mar 26, 2007 12:25 pm; edited 5 times in total
mskala



Joined: 06 Mar 2007
Posts: 100
Location: Massachusetts, USA

View user's profile Send private message

PostPosted: Sat Mar 24, 2007 8:53 am     Reply with quote

Hi, I was recently trying to look at proper debug settings in case I buy one.

Not that I know it very well yet, but all your fuses look good to me except IESO. Since that mode is supposed to use INTOSC until some external clock source is ready, it's not clear to me what will happen if you set this fuse along with actually using the INTOSC.

Keep us posted

Mark S.
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

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

IESO fuse
PostPosted: Sat Mar 24, 2007 8:37 pm     Reply with quote

mskala wrote:
Not that I know it very well yet, but all your fuses look good to me except IESO. Since that mode is supposed to use INTOSC until some external clock source is ready, it's not clear to me what will happen if you set this fuse along with actually using the INTOSC.


Thanks, Mark! I have commented out the IESO fuse, but it didn't help. I'm getting the same "Could not start target:…" message.

Could anyone post a combination of fuses (may be not for 18LF4220, but for some other PIC) that worked with the internal oscillator?

UPDATE: The following fuses produce the same "Could not start target:…" message.
Code:
#fuses INTRC, NOWDT, NOPROTECT, NOLVP

Could this be a hardware issue?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 26, 2007 11:52 am     Reply with quote

Quote:
After the message, MCLR# = Vcc = +4.1V.
Pulled up by 43k resistor (I just didn't have 47k among my supplies)

1. I would change the Vdd voltage to +5v and see if it starts working.

2. I would also add a 3.9K resistor in series with the 43K, just to make
everything be perfectly within CCS spec.
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

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

PostPosted: Mon Mar 26, 2007 11:59 am     Reply with quote

PCM programmer wrote:
1. I would change the Vdd voltage to +5v and see if it starts working.

I have increased the Vcc to +5V, but it didn't make any difference.

PCM programmer wrote:
2. I would also add a 3.9K resistor in series with the 43K, just to make
everything be perfectly within CCS spec.

I will try this too.

My problem might be caused by the ICD firmware. I have e-mailed CCS support with the original question. Here's their response.
CCS support wrote:
What is your ICD firmware version? If you open the ICD control program(ICD.exe) it is displayed on the bottom status bar. We have this issue in versions above 2.05 [mine is v2.14]. Let me know the version and I am attaching 2.05. You need to switch back to this version when debugging this family. We are looking into the issue with the latest version.


Unfortunately, my ICD control program refuses to upgrade the firmware, but that's a separate problem.
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