• AVR Freaks

Hot!Vpp Rise Time to enter Program mode, PIC18F26K22

Author
taribo
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2012/04/05 02:22:02
  • Location: 0
  • Status: offline
2019/09/20 07:03:16 (permalink)
0

Vpp Rise Time to enter Program mode, PIC18F26K22

Hello,

I am trying to build a PIC ICSP programmer, for PIC18F26K22, using HVP (High Voltage Programming).
I followed the specification found here: http://ww1.microchip.com/...n/DeviceDoc/41398B.pdf
What is not clear to me is the P1 parameter (rise/fall time of Vpp), to enter HVP (Figure 2-12, page 10).
On chapter 6.0 (AC/DC CHARACTERISTICS TIMING REQUIREMENTS FOR PROGRAM/VERIFY TEST MODE, page 38), the P1 parameter is specified as maximum 1 micro second. This seems a very short time, difficult to obtain. Is this correct ?
There is also a note that says:
Do not allow excess time when transitioning MCLR between VIL and VIHH; this can cause spurious program executions to occur. The maximum transition time is:
1 TCY + TPWRT (if enabled) + 1024 TOSC (for LP, HS, HS/PLL and XT modes only) + 2 ms (for HS/PLL mode only) + 1.5 micro s (for EC mode only) where TCY is the instruction cycle time,
TPWRT is the Power-up Timer period and TOSC is the oscillator period. For specific values, refer to the Electrical Characteristics section of the device data sheet for the particular device.



#1

7 Replies Related Threads

    NorthGuy
    Super Member
    • Total Posts : 5673
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/20 11:04:42 (permalink)
    +2 (2)
    1 us doesn't seem to me a fast time which is difficult to obtain.
     
    They seem to be afraid of PIC running, possibly driving something which it shouldn't. However, this doesn't seem to be a problem. I did lots of tests with circuits where MCLR was held at VDD (meaning the PIC is running), and then brought to Vpp to enter the programming mode. I had circuits with both BJT and FET based switches to do this, and either of them worked fine.
     
    Some of the PICs (but definitely not K22) have problems leaving the programming mode if you don't drive MCLR to 0V. For such PICs fall times could be a problem, but even then you shouldn't have any problems meeting the 1 us spec.
     
    #2
    ric
    Super Member
    • Total Posts : 23864
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/20 15:04:36 (permalink)
    +2 (2)
    taribo, is this just a learning exercise, or do you have a specific requirement to make your own?
    If you follow the link in NorthGuy's  signature, you'll find he makes very comprehensive, cheap modules that do most of the work for you.
    I would question your requirement for HVP. Do you have to support chips that may have had the LVP bit turned off?

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    taribo
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2012/04/05 02:22:02
    • Location: 0
    • Status: offline
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/23 02:39:19 (permalink)
    0
    I have these devices on the field, built with PIC18F26K22, programmed with LVP bit turned OFF. I have a bootloader on these PICs and the programming pins are accessible on a connector (same connector can also be used for upgrading FW by serial/UART bootloader).

    I was looking for a method of loading a HEX file to my PICs, on the field, from an Android device (phone or tablet), either via USB OTG or by Bluetooth/WiFi. I googled a PIC programmer for Android but haven't found any. PicKit, ICD are not supported by Android.

    Since I only want to program one PIC family (PIC18F26K22) I believe I can built my own PIC programmer.

    I don't want it to be fast, I just don't want to carry a laptop on the field only to load a HEX file.

    I have already done the FW upgrade via bootloader (when the bootloader is present), from Android, via a Bluetooth-UART adapter. It's slow, but it works well.
    Now I want to load a HEX file (when the bootloader is not present, or if I want to upgrade bootloader), from Android.


    #4
    ric
    Super Member
    • Total Posts : 23864
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/23 02:55:45 (permalink)
    0
    Is 'Programmer to Go" on a PICkit3 no use to you?
    i.e. setup the PK3 in PTG mode back at base using a PC or Mac, then you just need a power supply for it in the field.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    taribo
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2012/04/05 02:22:02
    • Location: 0
    • Status: offline
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/23 03:32:36 (permalink)
    0
    I also thought of Programmer to Go on PICKit3.
    But I have a few different types of devices on the field (with different FW). So, I want to give my men on the field the option to choose what device they want to program (these are not very skilled people, but they know how to use a simple phone app Smile: Smile ).
    #6
    NorthGuy
    Super Member
    • Total Posts : 5673
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: online
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/23 07:56:15 (permalink)
    +2 (2)
    It's not hard to write your own programmer for a single device.
     
    For MCLR, you can use a 9V battery. Connecting it to the MCLR with a transistor is Ok. Many of our customers used this circuit:
     
    https://www.northernsoftware.com/nsdsp/hvp.htm
     
    and it worked fine on many PICs. It doesn't drive MCLR low, but that's Ok.
     
    If you do want to drive MCLR low for some reason, you can use CD4052B or similar to switch between 9V, 5V and GND.
     
    Aside of 9V, you can power the rest of your programmer through the ICSP circuit from your field device. This way, the battery will last really long.
     
    #7
    taribo
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2012/04/05 02:22:02
    • Location: 0
    • Status: offline
    Re: Vpp Rise Time to enter Program mode, PIC18F26K22 2019/09/24 01:02:20 (permalink)
    0
    I usually connect a 100nF capacitor from MCLR to GND on my PICs. This is why I questioned the 1us timing in my first post. But the PicKit/ICD seems to work fine with this capacitor connected, even if the timing is >1us (I looked with an oscilloscope).
    #8
    Jump to:
    © 2019 APG vNext Commercial Version 4.5