• AVR Freaks

Hot!Use MCLR Pin (RA3) as input with low-voltage programming?

Author
mlman
Starting Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2020/03/16 09:13:57
  • Location: 0
  • Status: offline
2020/10/24 07:30:01 (permalink)
0

Use MCLR Pin (RA3) as input with low-voltage programming?

Development Environment: MPLAB X IDE using asm
Development Board: Curiosity DM164137
Processor: PIC12F1572
 
I want to use RA3/MCLR as an input.  In order to do that, I need the configuration bits to be:
MCLRE=0
LVP=0
 
I can’t program the pic with MPLAB X IDE/DM164137 until I set LVP=1.  Therefore I can’t program RA3 as an input????
 
What do I do? Any help would be appreciated.
#1

11 Replies Related Threads

    Mysil
    Super Member
    • Total Posts : 3946
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: online
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 09:17:08 (permalink)
    0
    Hi,
    Cannot be done.
    Use HVP,
    but then you cannot use the PKOB programmer on the Curiosity board.
     
    You may use RA0 and RA1 for input and output in a production build,
    but that you probably do already.
     
        Mysil
    #2
    mlman
    Starting Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2020/03/16 09:13:57
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 09:38:47 (permalink)
    0
    Is there a high-voltage programming board/setup I can use for a PIC12F1572 to get the required result?
    #3
    davea
    Super Member
    • Total Posts : 500
    • Reward points : 0
    • Joined: 2016/01/28 13:12:13
    • Location: Tampa Bay FL USA
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 09:42:28 (permalink)
    0
    Cannot be done
    without some modification's to the PCB
    #4
    Mysil
    Super Member
    • Total Posts : 3946
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: online
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 10:52:07 (permalink)
    0
     
    PICkit 3 or PICkit 4, a breadboard and a capacitor 0.1 microFarad.
     
    There may be cheap clones available on auction sites,
    there may even be original PICkit 3 among retailers.
    SNAP programmer is no better than what you already have.
     
        Mysil
    #5
    mlman
    Starting Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2020/03/16 09:13:57
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 11:35:26 (permalink)
    0
    If I used a PICkit 3 or 4 for programming the 12F1572, where would you connect the capacitor?
    Also, I read that  PICkits won't detect detect a 12F1572?
    Finally, do I use MPLAB X IDE or something else to high-voltage program the device?
    #6
    Mysil
    Super Member
    • Total Posts : 3946
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: online
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 12:46:28 (permalink)
    0
    Hi,
    Capacitor between Vss and Vdd,  over or around the end of the package.
     
    Where did you read this? What version of MPLAB X, what operating system and version?
    PIC12F1572 is Not recognized by MPLAB v8.92
     
    MPLAB X, any version, v5.25 or v5.35 or v5.45?  I would try to get around v5.40.  
    In 'Project Properties'  there is: 'PICkit 3'   if PICkit 3 have been selected in 'Hardware Tool'
    In 'Option Categories:' there is 'Program Options'  with  'Use low voltage programming mode entry'
    uncheck that box to use HVP.
    This option is not visible if Starter Kits (PKOB) Curiosity is selected.
     
        Mysil
    post edited by Mysil - 2020/10/25 08:14:52
    #7
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/24 14:06:48 (permalink)
    0
    There is an issue with the DM164137 that makes using high voltage programing fail for the controller in the socket.
     
    This circuit is the reason:
    Attachments are not available: Download requirements not met
    The body diode of transistor Q2 will clamp and VPP voltage to the BOARD_VDD voltage.
     
    On the latest version of the DM164137 jumpers J48,J49,J50,J51 can be used to disconnect the PKOB from the controller so that an external device programmer can be connected to P1.
     
    The previous user's guide does not have a complete enough schematic to determine if there is a way to disconnect the PKOB for the older version of the DM164137.
     

    Attachment(s)

    Attachments are not available: Download requirements not met
    #8
    Jerry Messina
    Super Member
    • Total Posts : 567
    • Reward points : 0
    • Joined: 2003/11/07 12:35:12
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/25 07:27:40 (permalink)
    0
    Darn! I just bought one of the older DM164137 (rev 2, w/PKOB) boards yesterday with the express purpose of using the external ICSP connector and HVP.
     
    In the original rev2 users guide (40001804B or C), in the troubleshooting section 3.3 it states
    If the PIC device will not program using the PICkit 3, ensure that the 3.3/5V jumper (J12) is removed

     
    That made it sound like you can remove VDD jumper J12 and use HVP with the ICSP powering the board via P1.
    Does anyone know if that's true?
     
    @Dan,
    Isn't that part of the schematic from the newer DM164137 Rev4 board (with PKOB4)?
     
    #9
    dan1138
    Super Member
    • Total Posts : 3990
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/25 10:40:57 (permalink)
    0
    Jerry Messina
    Isn't that part of the schematic from the newer DM164137 Rev4 board (with PKOB4)?

    Yes, that is from the Rev 4 schematic in the DM164137 User's Guide DS40001804D-page 18 with the PKOB4.
     
    I cannot find a complete Rev 2 schematic for the DM164137 with the PKOB3, but there is one for the DM164136 with the PKOB3.
     
    This is the VPP ciruit from that schematic:
    Attachments are not available: Download requirements not met
     
    This "should" work with an external device programmer using High Voltage Programming as long as the onboard PKOB is held in reset with a jumper between pins 1 and 3 of J1.
     
    But remember the PKOB will not work with a controller that has Low Voltage Programming disabled in the configuration words.
    post edited by dan1138 - 2020/10/25 10:48:23

    Attachment(s)

    Attachments are not available: Download requirements not met
    #10
    mlman
    Starting Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2020/03/16 09:13:57
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/26 05:20:33 (permalink)
    +2 (2)
    Thank you everyone for your help.  I purchased a clone PICkit 3 including programming socket for ~$24 that should hopefully do the trick.
    #11
    mlman
    Starting Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2020/03/16 09:13:57
    • Location: 0
    • Status: offline
    Re: Use MCLR Pin (RA3) as input with low-voltage programming? 2020/10/27 11:48:37 (permalink)
    +2 (2)
    I got my PICkit 3 working and high-voltage programmed my device.  Attached are instructions in case someone has the same problem.

    Attachment(s)

    Attachments are not available: Download requirements not met
    #12
    Jump to:
    © 2020 APG vNext Commercial Version 4.5