Implementing ICSP via RS232

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

Post Reply
liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Implementing ICSP via RS232

Post by liak » Thu Mar 27, 2008 4:24 am

Dear All,
I am currently using the RS232 to program (PIC with bootloader burned into the PIC first). I am informed that, it is possible to implement something called ICSP on PIC18F series. I need to clarify a lot of things - still confused. I have gone through the microchip datasheet. These are some of my questions:

1. The datasheet says I need some special IC to do the programming. But I am of the opinion that with some re-arrangement of the 5 pins required to program the PIC, I can straight away jack up my RS232 port and program the PIC right?

2. No bootloader required, right? And may I ask why?

3. What sort of program do I need to convert the codes to do ICSP? Can Swordfish do this? If I am not mistaken, MP-Lab has something to do this.

4. Does this mean I can do away with the PIC programmer - since bootloader is not required?

Thank you.
:wink:

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Thu Mar 27, 2008 7:06 am

With ICSP (in-circuit serial programming), you re-program the complete chip each time, hence you do not need a bootloader in the chip first. However, you do need a programmer capable of ICSP, and not an RS232 connection to do this. You do not need to convert the code produced by Swordfish for ICSP - your programmer should be able to read the HEX file and program this into the chip.

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Fri Mar 28, 2008 3:56 am

Thank you, Steven. Now I am clear about it. BTW, do you recommend any ICSP programmer, hopefully, the most cost effective one :lol:

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Fri Mar 28, 2008 7:27 am

I use a PICFlash programmer from ME (http://www.mikroe.com/en/tools/picflashwicd/). It works well and their programming software is easy to use and often updated with new PICs.

richardb
Posts: 307
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Fri Mar 28, 2008 10:14 pm

Liak, What programmer are you using at the moment?

You can make most programmers work as an Iss programmer as long as you have already made sure that PGD PGC(usually RB 6 and 7) are only lightly loaded and that the VPP(MCLR) line can easily be pulled up to the programming voltage.

Richard
Hmmm..

User avatar
ohararp
Posts: 194
Joined: Tue Oct 03, 2006 11:29 pm
Location: Dayton, OH USA
Contact:

Post by ohararp » Sat Mar 29, 2008 2:13 pm

Liak,

I use the Pickit2 from Microchip all the time. It has usb connectivity and everything for $35. http://www.microchip.com/stellent/idcpl ... e=en023805
Thanks Ryan
$25 SMT Stencils!!!
www.ohararp.com/Stencils.html

Raistlin
Registered User
Registered User
Posts: 69
Joined: Tue Apr 01, 2008 1:13 pm

Post by Raistlin » Mon Jun 16, 2008 7:15 pm

ICD2 by Microchip also here.
I'm thinking of getting a couple of pickit2's as well though because they are a lot cheaper than the ICD2 and support nearly all the same pics (just about all of em) with more being added.
Besides for the price I can also afford to blow one to bits every now and then without grtting too uset :)
If you can read this you are too close

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Jun 16, 2008 7:24 pm

In addition, you will soon be able to single step through your Swordfish code and view variables in MPLAB using pickit2 compatible hardware. Although not a 'magic bullet', debugging on real hardware is, in my opinion, a definite plus...

Post Reply