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

ICDU and PIC16F819

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
mcafzap



Joined: 07 Sep 2003
Posts: 46
Location: Manchester, UK

View user's profile Send private message

ICDU and PIC16F819
PostPosted: Tue Jun 22, 2004 7:49 am     Reply with quote

I have a 3.3volt circuit using an '819 which usually does not connect with the ICDU, usually by responding with 'Could not detect target chip'. I say usually, because if I power down & up the PIC then the _first_ time I connect all is well.

I know there are problems with this chip because it is possible to make the reset internal which would stop any ICD from working, but this is not the case.

Any ideas/suggestions? (I've got one, but I wouldn't get paid if I did it.)

Steve
mcafzap



Joined: 07 Sep 2003
Posts: 46
Location: Manchester, UK

View user's profile Send private message

ICDU & PIC16F819
PostPosted: Wed Jun 23, 2004 3:10 am     Reply with quote

To partially answer my own problem (and get it off my chest) here are some findings:

I found that using the ICD control program I could consistently find the correct chip, but only if I generated an internal reset first by lowering and raising the supply voltage. Thus it would also start to work in the debugger environment, until it came to starting the debug session when the message 'Device failed to halt - check mclr and oscillator'

I altered the voltage to 5v, amended the reset circuitry with a catch diode, pulled up B3, wired B3 to the debugger, changed from a standard 4 MHz crystal to a ceramic resonator, tried brand new ICs having programmed the configuration register externally. All to no avail.

I then altered the configuration to INTRC_IO and it started to work. I say started because you can only step about 3 times before the message 'Invalid clock value from the debugger - debugging may not have been enabled' appears.
Finally, as the first statement, I have tried setting the internal clock to 8MHz which results in a slight improvement - I can get about 7 steps now. Just 'running' seems fine until you stop the program, whereupon another message, 'Could not run program. No response from the ICD data in buffer'.

One step forward, two steps back. Ideas anyone? Any similar experience?

Steve
mcafzap



Joined: 07 Sep 2003
Posts: 46
Location: Manchester, UK

View user's profile Send private message

PostPosted: Wed Jun 23, 2004 6:44 am     Reply with quote

Further and better particulars...

First I found the cause of the crash when stepping was caused by
Code:

setup_TIMER_1(T1_INTERNAL | T1_DIV_BY_1| T1_CLK_OUT);

I've no idea why.

However, since then I've restored the circuit to 3.3v, 4MHz crystal and all is well. It still doesn't like the code above, but since this was accidentally introduced from an old program I'm not concerned.

I have to say that ICDU is not alone in giving me problems with this '819 circuit - I tried ICD2 and the Forest ICD too, so they probably all share the same difficulty although they are technically different. It is possibly simply my use of an 'old' crystal because they all use the reset line to instigate their particular background debug (slow crystal start up?). But while it's working I'm going to stop writing to myself...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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