|
|
View previous topic :: View next topic |
Author |
Message |
dreiber
Joined: 02 Jan 2006 Posts: 4
|
ICD-U40 Frustration |
Posted: Sat Jan 21, 2006 5:40 pm |
|
|
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
|
Re: ICD-U40 Frustration |
Posted: Sat Jan 21, 2006 5:48 pm |
|
|
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 |
Posted: Sun Jan 22, 2006 10:59 am |
|
|
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!!!
I will post any findings I get from CCS...
~Kam (^8* |
|
|
KamPutty Guest
|
findings.... |
Posted: Sun Jan 22, 2006 4:33 pm |
|
|
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 |
Posted: Mon Jan 23, 2006 10:42 am |
|
|
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
|
|
Posted: Mon Jan 23, 2006 5:26 pm |
|
|
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
|
more... |
Posted: Mon Jan 23, 2006 7:39 pm |
|
|
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
|
more again... |
Posted: Tue Jan 24, 2006 11:27 pm |
|
|
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. |
|
|
|
|
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
|