Problem with ICSP & PIC16F628A


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154

    Default Problem with ICSP & PIC16F628A

    I have a working circuit where i would like to use In-Circuit Serial Programming. I am using MeLABS EPIC Serial Programmer.

    Unfortuanatly, i am not getting very far. I have attached a circuit diagram of the ICSP part (main circuitry not shown).

    The PIC is a 16F628A.

    Has anyone successfully used this combination, if so, what am i doing wrong. Its basically saying the PIC is not detected.

    Many thanks,

    Steve
    Attached Images Attached Images  

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default Icsp

    Hi Tissy,

    I am using the EPIC parallel programmer with ICSP and I used the drawing from the MELABS site that shows 5vdc connected to pin1 of the ICSP connector. I am using this setup on 16F74's. The only thing I have noticed that is different on my ICSP setup is one of the led's on the EPIC board stays on even when I am not programming. I do have my board removed from the normal power source of my product so it only gets its power through the ICSP connector. Try it and see if it makes a difference.

    Regards,

    BobK.

  3. #3
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Thanks RobK,

    I took the 5v line from the EPIC Programmer to the In-Circuit PIC, still no luck.

    The prgrammer comes up with the message:

    'Target Device does not match selected device'

    Do you have to change any settings with the programmer or is it just the same as if the PIC was in the programmer on its own?

    I read somewhere that i think you don't supoossed to use the 5v line from the EPIC to power your circuit due to the possible current drain.

    Any other ideas? Does your connections look the same as mine. Do you also use only the four lines from the EPIC - Vpp, RB6, RB7 and Gnd.

    Many thanks.

    Steve.

  4. #4
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default

    Hi Steve,

    This statement should tell you what is wrong:

    'Target Device does not match selected device'

    This tells me that the pic you are trying to program is not the same as what you are telling the programmer to program. Make sure the PIC is what the programmer is set for.

    Yes the pin layout is the same as I am using. The load on my product is very low so I'm not putting any strain on the programmer.

    Regards,

    BobK.

  5. #5
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Definately not that. I can put the ZIP adaptor on with the 16F628A, it'll program fine. Take the Adaptor off, put the iCSP lead on, try to program and that error comes up immediately, its as if its not even trying to program. Take the lead off, put the ZIP bag on, programs fine.

    Any other ideas, can you send me a copy of your diagram so i can compare the ICSP side?

    I've sent you a PM with me emails address if required.

    Many thanks.

    Steve

  6. #6
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default ICSP problem

    Hi Steve,

    My ICSP connector is wired as follows:

    1-5vdc from EPIC
    2-no connection
    3-no connection
    4-no connection
    5-ground
    6-ground
    7-RB6
    8-RB7
    9-no connection
    10-Vpp

    I have a blocking diode between the MCLR pull up 1K resistor to prevent the programming voltage from damaging my circuit. I have another board that has ICSP on it and there I have a VFDisplay data lines on RB6 and RB7 so I put a DPDT toggle switch between the display and the ICSP connector so I don't cause any problems with the display while programming. It works okay also.

    I did notice on your schematic that it shows a 16F628 and your posts mention a 16F628A. I'm assuming that this was the only label of the chip diagram being different.

    Perhaps this could be of help: (From MELabs help support)

    Note for PIC16F62x: RB4 should be connected to ground to prevent interference from the Low Voltage Programming pin.

    If you can program through the ZIF but not the ICSP connection them maybe there is something wrong between the ICSP and the PIC.

    At this point I'm out of ideas. I know I've had my share of head scratchers lately too!

    BobK.

  7. #7
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    I thought i was going mad, but a short break solved the problem !!

    It was operator error. I messed up the numbering system on the IDC header.

    I had the numbering system as


    1 6
    2 7
    3 8
    4 9
    5 10

    When it actually is:

    1 2
    3 4
    5 6
    7 8
    9 10

    It now works perfectly !!

    Cheers for your help.

    Steve.

  8. #8
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Thumbs up

    Hi Steve,

    So the drawing you posted was wrong? You showed:

    1 10
    2 9
    3 8
    4 7
    5 6

    This is also how mine are wired which matches MELabs.

    I'm glad you did get it to work though!

    It was a great exercise for me.

    Have a nice day!

    BobK.

Similar Threads

  1. Interesting delay problem
    By Kreston in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st September 2008, 14:41
  2. Help Pic16f628a
    By gadelhas in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th August 2008, 23:22
  3. tmr2 interrupt problem
    By ADCON in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 2nd January 2008, 18:49
  4. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  5. Newbie Problem
    By djh82uk in forum mel PIC BASIC
    Replies: 3
    Last Post: - 13th July 2006, 15:43

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