• AVR Freaks

PICKit2 and PIC18F14K50 @ 5V + misc

Author
droidian
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2008/12/20 10:14:18
  • Location: 0
  • Status: offline
2008/12/23 12:43:38 (permalink)
0

PICKit2 and PIC18F14K50 @ 5V + misc

The data sheet for the 18F14K50 says it can run at 5V and it has a built in 5V to 3V LDO to allow it to interface with 5V logic.  The LDO is needed because the core runs at 3V.  Ok, no problem.  I made sure the config bit to turn on the LDO was properly configured using:
 
ASM
 __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOREN_ON_2L & _BORV_22_2L & _VREGEN_ON_2L
 
NOTE: I could not use the "new style" CONFIG VREGEN = ON directive because MPLAB 8.15 tells me VREGEN does not exist.
 
No problem.  So I proceed to do the following:
  • Select the PIC18F14K50 device in MPLAB V8.15a and select Debugger>Select Tool>PICkit 2.
  • Select Debugger>Settings and check the "Use target power always" checkbox.
  • Remove jumper J12 from my DV164126 eval board so that external power is not applied to the VUSB pin.
  • Place jumper J14 over pins 1 & 2 so that VIN, +5V from an external power supply in my case, is routed to V+ (VDD).
  • Plug the PIC18F14K50-ICE header board into my DV164126 board.
  • Plug my PICkit 2, running V2.55, into the header board.
  • Power up the +5V supply connected to VIN on my DV164126 board.
  • Select Debugger>Connect and encounter the following error:

Found PICkit 2 - Operating System Version 2.32.0
PICkit 2 Settings: Using target power always.
PK2Error0023:  Target Vdd measured at   4.99V which is outside the programmable range of this device (  1.88V -   3.60V)
PICkit 2 Ready
 
I thought the 18F14K50 could run from 5V.  Anyone know how to resolve this issue?  
 
BTW: If I let the PICkit 2 provide target power (3.3V) everything works fine.  The problem is I need to run the 18F14K50 board from a 5V supply so it can communicate with another processor board, that is powered by the same 5V supply.
 
 
 
 
#1

7 Replies Related Threads

    PICkit2Dev
    Super Member
    • Total Posts : 994
    • Reward points : 0
    • Joined: 2006/09/27 08:41:47
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2008/12/23 13:49:51 (permalink)
    0
    droidian,
     
    The problem is unique to this part, and is this:
     
    The PGC and PGD pins of the 18F14K50 are shared with the USB D+ and D- pins.  Although the part may be run with a 5 Volt VDD, the maximum voltage that the D+/D- pins can handle is about 3.3V.  This is noted in the datasheet and programming spec.
     
    The PICkit 2 (and most other programmers) cannot limit the PGx signal voltages to a range different from VDD, so to prevent damaging a part when a user is unaware of the PGx limitation, the supply voltage is limited.
     
    One way to work around this issue is to
    1) Power the 18F14K50 VDD from a 5 volt supply.
    2) Do not connect the PICkit 2 VDD pin to the target 5 Volt VDD (leave it unconnected)
        - This makes the PICkit 2 think it needs to supply power, so it turns on VDD @ 3.3V
    3) The target will now be powered at 5 V, but the PICkit 2 PGx signals will be limited to 3.3V
     
    Another way is to power the target at 5V from a supply and use zeners or other clamping voltage limiters on the PGx pins.
    #2
    droidian
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2008/12/20 10:14:18
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2008/12/23 14:24:45 (permalink)
    0
    PicKit2Dev,
     
    Thank you very much.  I used your 1st suggestion since it was easy to bend the pin 2 of the header board up so that it did not engage into the PICkit 2 recepticle.  Everything works great now.  No error messages and target running from external 5V supply.grin
    #3
    shoaibali
    Junior Member
    • Total Posts : 114
    • Reward points : 0
    • Joined: 2008/04/24 09:42:17
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2009/04/01 15:09:26 (permalink)
    0
    Hi
    So does that mean that PIC18F14K50 can be debugged without debug connector(one supplied with Low pin USB development board DV164127)?
    Regards
    #4
    FunnyNYPD
    Super Member
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2007/09/28 20:06:59
    • Location: USA & Canada
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2009/04/01 17:41:00 (permalink)
    0
    No, you definitely need the debug header, since the chip has no debug capability due to cost reduction.
    #5
    shoaibali
    Junior Member
    • Total Posts : 114
    • Reward points : 0
    • Joined: 2008/04/24 09:42:17
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2009/04/02 03:52:27 (permalink)
    0
    I have recently bought PIC18F14K50 kit (DV164126 that contains Low pin count USB development board, debug header board and PICKIT2) but I have confusions about debugging this mcu. Please correct and guide me as to what is the right way to debug this MCU.

    Requirements
    -------------
    - PIC18F14K50 has to be USB powered (means system works @5v)
    - Debugging USB firmware using PICKIT2

    My understandigs
    -----------------
    - PIC18F14K50 has no debugging circuitry so a header board is provided for debugging
    - PIC18F14K50 can work with Vdd @ 5v
    - PIC18F14K50-ICE Debug header can work @ Vdd max. 3.6v

    Confusions
    ----------
    - When to connect and not to connect VUSB pin with USB port +5v? Is there any difference when using PIC18F14K50-ICE debug header or PIC18F14K50?
    - If the board is USB powered then that means Vdd = 5v then how would the debug header(PIC18F14K50-ICE)  survive Vdd = 5v> 3.6v?
    - How to plug in the debug header in the IC socket provided on board? I have tried with normal pin headers but their diameter is too big to be inserted into the socket


    Summary
    ---------
    - Steps to debug PIC18F14K50 using provided header board?
    - VUSB pin connections

    Many thanks in advance
    #6
    GlennB
    Senior Member
    • Total Posts : 158
    • Reward points : 0
    • Joined: 2008/10/31 22:18:52
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2009/04/02 17:07:46 (permalink)
    0
    ORIGINAL: shoaibali

    - How to plug in the debug header in the IC socket provided on board? I have tried with normal pin headers but their diameter is too big to be inserted into the socket


    Quoting my earlier post about this problem:
    I solved the problem with an E-TEC POS-320-S058-99 DIP Board Spacer which you can find at www.e-tec.com as one of many similar adapter sources. The thing to look out for is that some adapters have (too) thick pins at one end which may harm the socket or even make the mating impossible. These adapters are intended to be soldered to a PCB at that end instead of mating with a socket. The E-tec adapter has 0.46mm/18mil diameter on both ends, which suits the IC sockets nicely.

    Glenn


    If it is worth writing it is worth writing in assembler.

    When you have calculated the worst case time needed for a project, triple the numerical value and raise to the next time unit.
    -I.E. a project estimated to 6 days will take 18 weeks.
    #7
    shoaibali
    Junior Member
    • Total Posts : 114
    • Reward points : 0
    • Joined: 2008/04/24 09:42:17
    • Location: 0
    • Status: offline
    RE: PICKit2 and PIC18F14K50 @ 5V + misc 2009/04/04 04:08:56 (permalink)
    0
    Many thanks GlenB
    #8
    Jump to:
    © 2021 APG vNext Commercial Version 4.5