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

ICD-U40 Frustration

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



Joined: 02 Jan 2006
Posts: 4

View user's profile Send private message

ICD-U40 Frustration
PostPosted: Sat Jan 21, 2006 5:40 pm     Reply with quote

I built my own prototyping board with a rj11/12 connector. MCLR is pulled up to 5v via a 47k resistor. B3, B6 and B7 connected and not used in the program. The proto board has it's own 5v power. I'm using a pic 16f877a. The program loads OK via the U40. I am using the short cable supplied. I can set a breakpoint. Occasionally, the program stops there, sometimes it just runs. If I recompile and reload with the debugger enabled and leave the breakpoint, it becomes a phantom breakpoint. I shows up, doesn't work and can't be removed except by restarting PCW. I get the "invalid clock value..." error regularly, I sometimes get the "tbytestack empty" error, and sometimes blank error windows. I can almost never step (f7) after stopping at a breakpoint and data is displayed in watch windows but I'm not sure I trust what I'm seeing. The fuses I use are

HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NOPUT

with a 10 mhz ceramic resonator. I'd love to be able to use the ICD as an ICD, but it takes more time to debug the debugger than I'd like.
I can't believe it's that flaky or there would be more complaints in the forums. I guess I'll try a very simple program and see if I can get the ICD to debug at all. Am I alone in this frustration?
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

Re: ICD-U40 Frustration
PostPosted: Sat Jan 21, 2006 5:48 pm     Reply with quote

dreiber wrote:
The fuses I use are

HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NOPUT


What happens if you enable the DEBUG fuse?
KamPutty
Guest







Re: ICD-U40 Frustration
PostPosted: Sun Jan 22, 2006 10:59 am     Reply with quote

dreiber wrote:
Am I alone in this frustration?


No you are not! I am going thru the same issue as we speak! I have an open ticket with CCS about exactly that! I get random breakpoints (it stops at places where I do not have a breakpoint, I get that "invalid clock error" ALL the time! I CANNOT debug.

I am using a pic18f452, and was told to replace it with one with an internal osc., so I'm going to try the pic18f4520.

Said that, I am at the point where I am going to return the whole ICD and pay some $$$ for one that works! I was going to switch from Microchips ICD-2 which works 100%, but is slow in debugging speed. So I switched to the ICD-u40 as they state that the debugging speed is faster.

I would not know about that!!! Sad Sad Sad

I will post any findings I get from CCS...

~Kam (^8*
KamPutty
Guest







findings....
PostPosted: Sun Jan 22, 2006 4:33 pm     Reply with quote

Hi all,

Well, I changed my mcu to the pic18f4520. Since it has a 8mhz internal osc, I use that.

EVERYTHING works fine with mplab and ICD-2, now when I to the CCS environments, problems still.

Still get "clock error"
Still get "verification" errors

Bummer.

~Kam (^8*
KamPutty
Guest







Re: ICD-U40 Frustration
PostPosted: Mon Jan 23, 2006 10:42 am     Reply with quote

dreiber wrote:
The fuses I use are

HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NOPUT


I did find something strange...

When you run the debugger, what is the MCU speed at the bottom?
Mine says "...MCU at 0.99mhz" (even though I am running at 8mhz).

I got this program from CCS tech support, see if this works for you...not me, same errors. You will have to change the speed to match your 10mhz

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#include <18f4520.h>
#device ICD=TRUE
#fuses intrc_io,nolvp,nowdt,nobrownout,noput,noprotect
#use delay(clock=8000000)
#use rs232(baud=9600,xmit=pin_c6,rcv=pin_c7)
#define GREEN_LED PIN_a5
main()
{
while(true){
output_high(green_led); // <--- I put break point here
delay_ms(1000);
output_low(green_led);
delay_ms(1000);
}
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Out of 10 attempts with the above code, only once (10%) did the MCU become 8mhz in debugger, and when that happened, it worked. The second I noticed the MCU changing to 0.99, error again. This happened about 5 "steps" into the code

I am at a loss on whats happening.

~Kam (^8*
dreiber



Joined: 02 Jan 2006
Posts: 4

View user's profile Send private message

PostPosted: Mon Jan 23, 2006 5:26 pm     Reply with quote

The whole thing seems to work better with a pic16f877 running at 20mhz rather than a pic16f877a running at 10 mhz. I'll have to try a pic 18f452.
Maybe the 10 mhz resonator wasn't happy. More to come...
dreiber



Joined: 02 Jan 2006
Posts: 4

View user's profile Send private message

more...
PostPosted: Mon Jan 23, 2006 7:39 pm     Reply with quote

Actually, the debugger is working flawlessly with the pic16f877 at 20Mhz.
I tries two different pic16f877a's at 10 Mhz with no luck.
dreiber



Joined: 02 Jan 2006
Posts: 4

View user's profile Send private message

more again...
PostPosted: Tue Jan 24, 2006 11:27 pm     Reply with quote

I found that the debugger works great with a lot of parts, just not the pic16f877a. I've tried a pic16f877, pic18f452, pic18f4520 and pic18f4525 with no problems at all. I reported this to CCS. I've tried several pic16f877a's. at several frequencies. Errors and strange stuff but only with this particular part.
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