ICSP (2) questions


Closed Thread
Results 1 to 29 of 29
  1. #1
    Join Date
    Apr 2008
    Posts
    24

    Default ICSP (2) questions

    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/st...vpc/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.

  2. #2
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ramonetnet View Post
    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/st...vpc/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

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    mister-e : what one do you recomend then ?
    I can spend 30 - 50 euros, but dont want to buy

    >>> http://www.microchipdirect.com/produ...rds=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 !

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    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.
    Regards,
    Sarma

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    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 ?

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by mister_e; - 24th April 2008 at 20:40.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Still possible to hack this 12USD board

    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.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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-bi..._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/e...Doc/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.
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    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.

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  14. #14
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    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.

  15. #15
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.
    Dave
    Always wear safety glasses while programming.

  16. #16
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Last edited by mister_e; - 25th April 2008 at 00:00.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  17. #17
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Ramonetnet View Post
    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...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  18. #18
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ramonetnet View Post
    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/st...vpc/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.
    Last edited by mvs_sarma; - 25th April 2008 at 06:02.
    Regards,
    Sarma

  19. #19
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    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 !

  20. #20
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    See page 31 of the PICkit2 user guide
    http://ww1.microchip.com/downloads/e...Doc/51553E.pdf

    This should be enough.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  21. #21
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    See page 31 of the PICkit2 user guide
    http://ww1.microchip.com/downloads/e...Doc/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.
    Regards,
    Sarma

  22. #22
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Weird... never had any download problem myself

    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/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=120915241 1">

    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!
    Attached Images Attached Images  
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  23. #23
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Thumbs up

    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/st...vpc/index.html
    (2) http://www.josepino.com/pic_projects...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 !
    Attached Images Attached Images  

  24. #24
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    mr Sarma : the file is there (2.177.632 bytes without a problem)

    c: >wget http://ww1.microchip.com/downloads/e...Doc/51553E.pdf
    --03:17:11-- http://ww1.microchip.com/downloads/e...Doc/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]

  25. #25
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ramonetnet View Post
    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.
    Last edited by mvs_sarma; - 26th April 2008 at 07:10.
    Regards,
    Sarma

  26. #26
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    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.

  27. #27
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sometimes it works better when you right click on the link and use "save target as"... sometimes
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  28. #28
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ramonetnet View Post
    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.
    Regards,
    Sarma

  29. #29
    Join Date
    Apr 2008
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    There was an error in the diagram. This is the good one. Sorry.
    Attached Images Attached Images  

Similar Threads

  1. How to drive the Vinculum VDIP1 in UART mode
    By BrianT in forum Code Examples
    Replies: 41
    Last Post: - 23rd May 2013, 12:34
  2. LOTS of questions....
    By reaper0995 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2008, 17:00
  3. PicKit 2 Questions
    By dmairspotter in forum General
    Replies: 3
    Last Post: - 11th November 2007, 21:10
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. 2 questions
    By Archangel in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 1st December 2006, 02:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts