PDA

View Full Version : MCSP ICD does not work



ardhuru
- 19th May 2008, 19:17
This one seems to defy logic...

I have been using the ICD feature from MCS Plus in the past; now, after months I find myself in need of using it again, but whatever I do I get a "ICD connection timeout" error.

I am using the MCSP ver 3.0.0.5 with PBP 2.47, and the device is a 16F628.

A debug out (mode 0, thru' a level shifter) on the RB2 pin works okay (as seen on a terminal emulator), so I guess the hardware is not suspect.

An "ICD compile and Program" goes thru' without any errors, but the ICD itself does not work. Any idea what could be happenning here?

Thanks for any pointers, in advance.

ardhuru
- 19th May 2008, 19:18
The device is a 16F628A; sorry.

mister_e
- 19th May 2008, 19:24
Is this possible to see your whole code?

Probably DEBUG won't work, ICD assume you use the internal USART

Do the sample test on the following Bruce's tutorial
http://www.rentron.com/PicBasic/MCS_X3.htm

Hardware must match as well.

ardhuru
- 19th May 2008, 19:33
Steve, I just did that; copy-pasted Bruce's code, with the same results;

BTW, I am using a TTL inverter in place of a 'real' level shifter; could this be an issue? But then I can send data out to a terminal over the same com port I otherwise am trying to use for ICD, so I guess not. Right?

Still lost...

Anand

mister_e
- 19th May 2008, 19:37
Not sure if i understand correctly, but in case you want to send serial data, you can't use the same port with another terminal software. As far as i remember of, MCSP ICD have a dedicated windows for that.... been long long time i didn't used it...

Did you tried with 4 and 20MHz osc?

Are you sure the COM port selected in the top menu match the one you plan to use?

ardhuru
- 19th May 2008, 19:44
Sorry, that was misleading; the serial data is being sent to the PC just for checking the hardware; while doing the ICD compile, I rem out the debug statements and close the terminal before running ICD.

I am using the internal oscillator, so I presume the default would be 4 MHz.

Yes, I've defined the right com port.

mister_e
- 19th May 2008, 20:00
Out of curiosity.. are you using a USB-To-Serial adapter? If so did you tried on COM<16?

ardhuru
- 19th May 2008, 20:07
No, a proper com port on my motherboard.

But guess what... a decoupling cap on the breadboard solved the problem. Even as I type, the ICD is chugging away happily.

I thought my supply was well filtered; didnt find the need for an extra cap on the breadboard before; just goes to show how crucial it is, I guess.

Thanks for the help, Steve.

Anand

mister_e
- 19th May 2008, 21:15
:D those mandatory cap!

I asked about the USB-To-Serial because i tried with one here... and it refused to work. It begun to work when i set it to COM9 or lower. Good enough for the records i guess :D

But it happen on my machine... maybe not on others... my machine behave in unique way sometimes :D