PDA

View Full Version : ICSP (2) questions



Ramonetnet
- 23rd April 2008, 00:24
I am trying (without success, of course) to use ICSP, using Low Voltage.

To help to make it work, would some sweet soul answer some of my questions ?

a) can I use RS-232 to program a 18F452 ? What voltage is required ?

I guess I can, as here there is a LVP

>>> http://home.vrweb.de/~lotharstolz/stolz.de.be/lvpc/index.html

But I'd like to know the voltage required to make it work, as I have no success,
and my WorkStation only provides 10 volts on the RS-232 interface ...

b) can I program the 18f452 with the crystal installed ?

I guess I can, as the final circuit has to have a crystal and I must be able to re-program it on the board, but I have read it is better not to have the crystal when programming.

I am using MPASM and IC-PROG under XP. Thanks. Ramon.

Raflex
- 23rd April 2008, 08:04
I am trying (without success, of course) to use ICSP, using Low Voltage.

To help to make it work, would some sweet soul answer some of my questions ?

a) can I use RS-232 to program a 18F452 ? What voltage is required ?

I guess I can, as here there is a LVP

>>> http://home.vrweb.de/~lotharstolz/stolz.de.be/lvpc/index.html

But I'd like to know the voltage required to make it work, as I have no success,
and my WorkStation only provides 10 volts on the RS-232 interface ...

b) can I program the 18f452 with the crystal installed ?

I guess I can, as the final circuit has to have a crystal and I must be able to re-program it on the board, but I have read it is better not to have the crystal when programming.

I am using MPASM and IC-PROG under XP. Thanks. Ramon.

a) Hi, i think that you cant use ic-prog with Win XP, however, you can program the 18f452 with ic-prog and your programmer (maybe jdm) on window 98.

b) yes, you can program it with the crystal installed

mister_e
- 23rd April 2008, 15:05
You also need to enable the LVP mode in your config fuses... and forget the specific PGM I/O for future use as it will be dedicated for LVP mode only.

Not a fan of those few components JDM based one...

Ramonetnet
- 24th April 2008, 12:16
mister-e : what one do you recomend then ?
I can spend 30 - 50 euros, but dont want to buy

>>> http://www.microchipdirect.com/productsearch.aspx?Keywords=DV003001++

Part Number: DV003001 - PICSTART PLUS DEVELOPMENT SYSTEM

It is 136 euros (plus tax, I guess)

I did write to microchip, asked to program a 18F452 and a 18F4520, and they say "DV003001"

Thanks for sharing your opinions !

mister_e
- 24th April 2008, 15:19
PICKIT 2 is the cheapest solution. Sure it doesn't have any Ziff socket, but you can use it + breadboard or home-made adapter.

Since awhile i no longer use my PicStart ... not sure if he's still working ;)

mvs_sarma
- 24th April 2008, 15:55
I strongly support the recommendation of Mister-e and as on date the best and worthy one is PICKIT2

It won't let you down wasting days to fault trace other programmers.

I have one and is working fine. Perhaps you can get it at your local Microchip dealers.
But, Don't be fooled by imitations.However I feel that JUNEBUG from www.blueroomelectronics.com is also performing well and I use it, too.

mackrackit
- 24th April 2008, 16:09
The PICSTART PLUS is a good programmer, It can even be used for ICSP but is not designed for that. As far as programming the 18Fs... About two years ago I was playing with the 18F4320 for the first time, I did not have a PICKIT 2 yet just the PIC START. Putting the 18F in the zif of the PIC START would some times program and sometimes not . Microchip people said I needed to upgrade the PIC START. I bought the upgrade (new chip for inside the PICSTART) and still had the same problem. MICROCHIP then said I needed to add capacitors across the VDD and VSS pins of the chip while it is in the ziff. YEAH RIGHT AS I ONLY HAVE TWO HANDS! That is when I started using the PICSTART as a ICSP. I had to take time to make a few adapters for different chips.

Then I bought a PICKIT2. Came with the six pin header skimask told you about. Plug the header into the breadboard, ran five wires on the board for VSS, VDD, MCLR, and the two going to the programing pins of the chip. Plug the PICKIT2 into the header and it worked. I did not have to modify it at all.

Now all I have to do is add a cheap 6 pin header to my designs and it it ready to program on the fly. I am paying $0.25 USD for these.

That all is not to mention the price difference. The only reason I have a PICSTART PLUS is because the PICKIT2 was not made when I bought it.

That is why I recommend the PICKIT2.

Ramonetnet
- 24th April 2008, 20:30
Thank you all, true !

I did write to Microchip again, saying 136 € was too expensive and all I wanted was to program a 18F452 (old chip) and/or a 18F4520 (new chip).

They answer is clear :

PG164120 = 23,84 € = pickit2 programmer
AC162049 = 27,24 € = universal programming module (socket)
AC164110 = 6,81 € = RJ-11 to ICSP adapter (cable)

This makes 57,89 €.

Do you all agree it is a good price ?

mister_e
- 24th April 2008, 20:37
Fair enough for me. But you could still build your own adapter for few bucks... BUT you will spend time on it.. so there will be no money saving at the end.

So... Go for it.... even it's kinda weird that the adapter is more expensive than the programmer :D

mister_e
- 24th April 2008, 20:44
Still possible to hack this 12USD board
http://www.mikroe.com/en/tools/experimental/pic/images/pic_exp_400.jpg
http://www.mikroe.com/en/tools/experimental/pic/

But add the shipping etc etc... not sure if it worth it. maybe easier to use though.... not jumper, no nothing.

mackrackit
- 24th April 2008, 21:21
Micros usual price.

But that does not set you up for ICSP. You will want that. With the ZIF you will plug the chip in, program, remove the chip and have another ZIF on the bread board or on your PCB, plug the chip in there. Find out the config is wrong or something else. Remove the chip from the test circuit, put back into the programming soket and start all over.

With the PICKIT2 all you need is a bread board and one of these http://www.allelectronics.com/cgi-bin/item/CON-63/192/6-PIN_FRICION-LOCK_HEADER,_0.1%22#34;_SPACING_.html

Break off the friction lock so the PICKIT2 will fit on. Now everything stays on the bread board. The chip will not need to be removed for programming.

Look at chapter #3 http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf

So in my opinion, only by the PICKIT2 and use the other money for parts that will not end up collecting dust. I have a large dust collecting collection myself.

Ramonetnet
- 24th April 2008, 21:50
mr-E : the 12 USD card seems to require some "Programmer" (there is such a connector on the board", and the picture says "PICFLASH-2" ... What is the cost of this piece ?

MackRackit : I also do have some dust at home ! Let me read chapter 3 before asking how can I do this magic. In fact, I have no "final" board, just playing at home, so the "plug-here", "unplug-and-move-there" is not such a problem to me .... (;-)) .. yet.

THANKS a LOT all (both) of you ! Ramon.

mister_e
- 24th April 2008, 21:57
As i said, this has to be hacked before using it... but... hummm.. it will only need +5V, GND, PGD, PGC, VDD signals... the same as PICKIT2 will provide.

It doesn't worth to invest for PICFlash programmer.

Real ICSP is more valuable... unless you want to program your PIC... then ship them without any PCB. Who want to ship something without testing it? well... not me :( Hence why the ICSP is handy... at very least for me.

Ramonetnet
- 24th April 2008, 23:20
Well, let me explain a bit my environment. I am not in a "industrial" situation.
We want to build a solar intensity detector, so the solar cell provides some analog voltage, the PIC converts it to digital, a PC reads it using the parallel port, and starts/stops few motors to try to find a better position. It is a scholar project, so only one prototype has to be built.

So, I think I need a LVP, if possible, or the people at Microchip will be happy with my 57,89 €.

The In-Circuit-Programming is not so important to me ...

Thanks for you patience. Ramon.

mackrackit
- 24th April 2008, 23:47
The In Circuit Programming is up to you, we were just letting you know the options.

Your project is a good one. I am not sure what you mean by LVP though.

Another thought... Serial communications are much easier than parallel and if the devices are a distance apart serial will work better.

mister_e
- 24th April 2008, 23:57
LVP use the PGM pin, while ICSP don't... i never saw ANY advantage to use LVP mode... Pretty sure none of my programmer use it and why it exist... One thing is sure... i never used it :D

mister_e
- 25th April 2008, 00:03
The In-Circuit-Programming is not so important to me ...
ok so let's have this discussion in few weeks... Once you'll have swap your PIC from Board to programmer, and programmer to board few dozen or hundreds times... ;)

mvs_sarma
- 25th April 2008, 05:59
I am trying (without success, of course) to use ICSP, using Low Voltage.

To help to make it work, would some sweet soul answer some of my questions ?

a) can I use RS-232 to program a 18F452 ? What voltage is required ?

I guess I can, as here there is a LVP

>>> http://home.vrweb.de/~lotharstolz/stolz.de.be/lvpc/index.html

But I'd like to know the voltage required to make it work, as I have no success,
and my WorkStation only provides 10 volts on the RS-232 interface ...

b) can I program the 18f452 with the crystal installed ?

I guess I can, as the final circuit has to have a crystal and I must be able to re-program it on the board, but I have read it is better not to have the crystal when programming.

I am using MPASM and IC-PROG under XP. Thanks. Ramon.

1. LVP is not that important unless the device under concern can't take 13V programming. BTW, LVP eats off one pin of Port B and you can't use it in your program anywhere.
2. ICSP you need to momentarily disable few pins used otherwise for the circuit you design.
regards to oscillator, many times PIC18xxxx uses internal oscillators. perhaps, then you need something called Vpp before Vdd facility. so that the circuit wont start and the device is taken to program mode.

The best appears, PICKIT2. if you have time and patience to make few adopters, you don't need the other two parts you referred in your earlier post. Perhaps from spare components lying at home one can make these adopters. Incidentally, if money is nothing before the time lost, you may of course have them

Please put your schematic here and let us see why you are not able to use ICSP facility, Ramon.

Ramonetnet
- 25th April 2008, 16:03
mr Sarma : (I think) I did not say I can not use it (because of my design).
I was trying to say I can not use it because I don't know the electric diagram for it !
(All that stuff about oscillator and Vpp versus Vss...)
Sorry for the misunderstanding !

mister_e
- 25th April 2008, 16:20
See page 31 of the PICkit2 user guide
http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf

This should be enough.

mvs_sarma
- 25th April 2008, 19:21
See page 31 of the PICkit2 user guide
http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf

This should be enough.

Many a time I have tried but always the download stops before reaching 1,7MB out of 2.08MB or so. Perhaps Microchip may have to replace it.

mister_e
- 25th April 2008, 20:41
Weird... never had any download problem myself :o

Anyways, when you buy a PICKIT 2, it's on the CD.

I'd post the following suggestion really often here.
http://www.melabs.com/images/icsp1.gif
http://www.melabs.com/support/icsp.htm

Ok it's for MElabs programmer, but the idea is the same.

Microchip solution... the one in the PDF
<img SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2542&stc=1&d=1209152411">

Almost the same... but the last one don't talk about the load on PGM pin, and don't show the cap on Vdd.. which is not important... but mandatory!

Ramonetnet
- 26th April 2008, 02:13
Mr_E : you are very kind.
But while I was waiting for your help,
I did some patch tests and ... it works

( I open'd a thread called "LVP for 18f452" ...)

What it says is I melted 2 designs
(1) http://home.vrweb.de/~lotharstolz/stolz.de.be/lvpc/index.html
(2) http://www.josepino.com/pic_projects/index.php?pic_programmer.jpc
and here you are : a working LVP for 18F452 ! (see attached JPG)

Maybe it is not impressive to you, experimented people,
but it has been and still is a great satisfaction to me,
everytime a ".hex" file is moved to the PIC and the LEDs
(now there are plenty of them : a 7-segment + "dot")
and then does what it is suposed to do.

Microchip people almost got my money, but I prefer this way : forums, patch board, Google.

Thank you all !

Ramonetnet
- 26th April 2008, 02:18
mr Sarma : the file is there (2.177.632 bytes without a problem)

c: >wget http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf
--03:17:11-- http://ww1.microchip.com/downloads/en/DeviceDoc/51553E.pdf
=> `51553E.pdf'
Resolving ww1.microchip.com... done.
Connecting to ww1.microchip.com[194.224.66.25]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,177,632 [application/pdf]

100%[====================================>] 2,177,632 309.55K/s ETA 00:00

03:17:18 (309.55 KB/s) - `51553E.pdf' saved [2177632/2177632]

mvs_sarma
- 26th April 2008, 07:01
mr Sarma : the file is there (2.177.632 bytes without a problem)



Thanks Ramon, I could use the second one of the two identical links you provided. the first one stopped for me at 1.74MB.

It is fine noting that you have succeeded in programing the device, Ramon. hope it serves you in the process of learning PIC.
All the best please.

Ramonetnet
- 27th April 2008, 00:06
mr Sarma - if both links were identical, why one stoopped at size X and the other did not ?
Ok - let's be positive and enjoy life in every drop.
Thanks for the support - I did appreciate it; really.

mister_e
- 27th April 2008, 00:09
Sometimes it works better when you right click on the link and use "save target as"... sometimes ;)

mvs_sarma
- 27th April 2008, 12:15
mr Sarma - if both links were identical, why one stopped at size X and the other did not ?
Ok - let's be positive and enjoy life in every drop.
Thanks for the support - I did appreciate it; really.

Agreed. I would say, at the time when i tried the second link, I could succeed. Many times I failed to download on Microchip site.

Ramonetnet
- 28th April 2008, 10:03
There was an error in the diagram. This is the good one. Sorry.