ICSP with MCLR as input


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86

    Default ICSP with MCLR as input

    I am converting a project into a surface mount version and wanted to add the ability to do ICSP since you never know when you need to update code. I have two 18F45K22 chips and one 12F629 chips. I was able to get the two 40 pin guys working, but the 8 pin is giving me trouble. I have removed all the extra hardware from the circuit that connects to the MCLR line and the data/clock lines so they go only to the header. If I put a blank chip in I can get the ICSP to work once, but have to take the chip out and blank it to program it again in circuit. I believe the problem is related to my setting the MCLR (GPIO3) as an input.

    I saw on the melabs website they recommended
    Code:
    TRISIO = $FF
    PAUSE 1000
    to allow for programming on power up. I went to 5000 just because and had no luck.
    My configs are set up as:
    Code:
    #CONFIG
        __config _HS_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _CP_ON & _CPD_ON
    #ENDCONFIG
    I have attached the schematic motherboard.pdf, though I have pulled the LED on the clock line, the resistor on the VPP line and I took out the microchip that is connected to the data line just to be safe.

    Thanks for taking a look
    David

  2. #2
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: ICSP with MCLR as input

    try setting _MCLRE_OFF in config to _MCLRE_ON , as it is looking for a digital input

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: ICSP with MCLR as input

    If you are using a Pickit2, try enabling the 'Use Vpp first program entry' option under tools; I suspect that should solve the problem, from the symptoms you describe.

Similar Threads

  1. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 16:25
  2. MCLR line input only
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th April 2008, 00:14
  3. Mclr As Input Pin?
    By omid_juve in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th December 2007, 07:33
  4. RA5/MCLR input in 16f88
    By kacho in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 5th April 2005, 18:21
  5. 16f688 and MCLR (ra3) as input
    By kitcat in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st March 2005, 19:15

Members who have read this thread : 2

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