PDA

View Full Version : ICD Connection Hardware?



chrome
- 16th June 2015, 05:17
I would like to write code to a PIC18F4520 but I don't have any of the MELabs programming hardware. I do have MC Studio Plus 5.0.0.5.

How can I connect to the chip so that I can program it and use the ICD feature? Can I just use a USB to RS232 converter like this FTDI (TTL 232R 5v) cable linked below?
http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf


Another question: Is there any way to simulate the code without writing it to the chip?

HenrikOlsson
- 16th June 2015, 06:10
You can program the chip using the MicroCode Loader bootloader. But it requires that the bootloader firmware is first programmed into the chip using a normal programmer like the U2, PICKit3, ICD3 or whatever. Once you got the correct bootloader firmware in the chip your "normal" program can be downloaded over the serial port using, for example, the FTDI cable. The bootloader and the soft ICD in Microcode Studio uses the same hardware connections.

There's no way to simulate the code within Microcode studio. You need third party software for that. Lab Center Proteus seems popular.

/Henrik.

Scampy
- 21st June 2015, 15:55
You need a programmer to program a PIC. Three are lots of cheap programmers around that will get you started. The PIC Kit 3 is medium priced, or if it's just a basic development system to learn on then the PicKIt1 is still around (http://cpc.farnell.com/microchip/dv164101/starter-kit-pic-flash/dp/SC09201?mckv=s_dc|pcrid|63733200017|kword||match|| plid|&CMP=CPC-PLA

http://uk.farnell.com/productimages/large/en_GB/microchip-dv164101-40.jpg

chrome
- 1st July 2015, 05:19
Thank you all for the replies!

I dug up my Pickit 3 and configured it to work with MicroCode Studio by reading through this forum post:
http://www.picbasic.co.uk/forum/showthread.php?t=12108

Now I wonder: Can I use the Pickit3 with ICD compile in MicroCode Studio? I realize that it will let me write the firmware onto the device, but will it allow me to step through the code on the PIC, or will I need a different tool?

HenrikOlsson
- 1st July 2015, 06:22
Unfortunately not. The MicroCodeStudio ICD is a software debugger. It uses the PICs USART to communicate with the IDE.
I suggest you look at the In Circuit Debugger section in the MicroCode Studio Help, it tells you all about it.
To use the PICKit3 as a "real" debugger" you need to use MPLAB.

/Henrik.