1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Can't connect to the PK2-LITE

Discussion in 'Microcontrollers' started by avi, Oct 1, 2008.

  1. skyhawk

    skyhawk New Member

    Joined:
    Feb 9, 2007
    Messages:
    235
    Likes:
    7
    Location:
    Morgantown, WV
    The I/O pin assignments are in a header file called io_cfg.h

    The relevant lines are:

    #define tris_PROG_SWITCH TRISBbits.TRISB5 // RB5 Input (Weak Pull-up)
    #define PROG_SWITCH_pin PORTBbits.RB5

    You should be able to change to another pin (RC7 appears to be available) and recompile. Unfortunately I don't do C, so I am no help.

    I don't know where to find the newest version of the source, but older versions are found here:

    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1960

    V2.32 should be adequate. It works with PK2 application 2.52.
     
    Last edited: Oct 12, 2008
  2. Mickster

    Mickster Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    1,085
    Likes:
    57
    Location:
    BDA
    The PIC18F2550 isn't supplied by Microchip with an internal program.

    The "internal program", (PK2V023200.hex for example) that you flash using your programmer, contains a bootloader.

    Once functional, this bootloader allows the PICkit2 software to be updated via USB and the PICkit2 software, without the need for the other programmer.

    Does that clear things up a bit?

    The problem you appear to be having is the method ART2003 uses to program your '2550.

    Re-read the previous posts by Blueroom, Skyhawk, Sarma & 3v0.
     
    Last edited: Oct 14, 2008
  3. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The sky is falling !

    I downloaded the project but can not get it to compile. Is is having problems finding header files "system/typedef.h" and "system/usb/usb.h". This is their project file so I would expect it to build.

    I tried the normal thinks like:

    Adding the path to my projectect using project>set language tool locations>Microchip C18 toolsuite>Default search paths&directories>Include search path.

    Moving the .h's into the project root directory.

    Adding and removing the unfound 'h's from the project.

    Reinstalled C18.

    It is one of them there not so swift days. I will try again when things start going better. :)

     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.

    Hats off 3vo for your efforts to help AVI
     
  6. avi

    avi New Member

    Joined:
    Sep 14, 2008
    Messages:
    25
    Likes:
    0
    Location:
    ISRAEL
    TNX Mickster, it was misunderstanding

    -------------------------------
     
  7. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Is it working ?
     
  8. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    I think, unless AVI gets an alternate souce of programming his 18F2550 with a standard programmer, he may hev nothing more to post. Perhaps he is on the search for it.
     
  9. theo92

    theo92 New Member

    Joined:
    Aug 1, 2008
    Messages:
    177
    Likes:
    0
    Location:
    WB, India
    avi,
    don't give up; I say don't give up.
    I was the guy of the same way. My PICKit 2 was not working, so sad about that, I worked through lonely days and nights, but that won't worked......

    But just a small idea, make it working. I just swapped the D+ and D- lines.....And it worked just fine.....But it giving a Vpp error stll for the inductor...

    MVS will help me out from here. MVS, I'm really sorry, I was out of my home for a week, so I was unable to reply regarding the 680 uH inductor. I got a 470 uH; I'll try with ya and in a new PCB because my old PCB is just getting dirty and dirty....even it was not coated... If that do not work, as you said, I'll say you to send the inductors...I'll give you my postal and ph no soon....
    OK??

    for avi,
    u should check the USB voltage smoothing caps. the 100 uF and 0.1 uF.
    try swapping the D+ and D-, if you didn't done it before.
    I programmed my 18F2550 eith ART2003, and my PK2 was detected by MPLAB without any hassle in winXP even in winvista. Who said, ART2003 will not work? It's simply not true.

    avi, if you have a PK2 lite PCB, giimme the layout...
    post images of yoiur PK2 board.
    I gonna make the PK2 lite for experiment...
    Let us work together
     
  10. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    170
    Location:
    Toronto, Canada
    I did :eek: and since you've proved me wrong PM me your mailing address and I'll send you a Junebug PCB.
     
  11. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    I too say that it would not work.
    But of course i don't have things to gift you except few 680uH coils, got made for you.
    BTW, 450uH should work well Theo.

    Could you get the upload to next driver done on PICKIT2 using the update procedures described in the manual after once programming on ART2003 type LVP programmer?
     

    Attached Files:

    Last edited: Oct 15, 2008
  12. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    We figured out that you can program it with the a LVP but you can not use it unless you have a way to change the LVP config bit to off. I did not see any way to do that without a HVP programmer.

    That is why I said the BLOAD switch needs to be moved. I have a the rest of the week off. Maybe I can take another stab at the PICkit code/project and figure out why it could not find the includes.

    3v0.
     
    Last edited: Oct 15, 2008
  13. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    Here i have a doubt. Without indicating in the__CONFIG instruction of assembly or similar instruction in C or other language, will a person be able to programm LVP mode,merly by pull down of PB5?
    If so, will still that PB5 be still effective as an input pin, in the absence of such instruction, in the softwrae, unless of course, location 2007 modified by the programmer.

    please help my clarify.
     
    Last edited: Oct 15, 2008
  14. skyhawk

    skyhawk New Member

    Joined:
    Feb 9, 2007
    Messages:
    235
    Likes:
    7
    Location:
    Morgantown, WV
    You can add me to the list of those who thought it wouldn't work. I don't know why it does, but I am glad to be proven wrong. Congratulations!
     
  15. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    If you can do it I would like to know why because it does not make sense. As long as the 2550 is in LVP mode you can not run code other then the bootloader. Unless the bootloader changes config from LVP to HVP.


    @Sarma,
    LVP capable chips are shipped with LVP enabled. The answer is yes, a chip can be programmed by pulling down the program pin.

    In LVP mode PB5/program in not available as a input. The BLOAD switch will choose between programming via LVP or programing via the bootloader. There is no way to run any code other then bootloader.

    But the 2550 is able to write config memory from the bootloader. From AN851

    I have not looked at the boot loader application to determine how to write the config from there but if it is possible the procedure for getting a working 2550 for a junbug would be

    1. Program the chip using LVP.
    2. Run the bootloader app and switch the config LVP bit to off.

    Could it be that simple ?

    What is at location 2007 ?

    3v0
     
  16. skyhawk

    skyhawk New Member

    Joined:
    Feb 9, 2007
    Messages:
    235
    Likes:
    7
    Location:
    Morgantown, WV
    The way that I read section 5.3 of the programming specifications is that the LVP bit can only be programmed to 0 from the high voltage mode.

    http://www.electro-tech-online.com/custompdfs/2008/10/39622k.pdf

    This makes sense because it means that a person using LVP can't accidentally "lock themselves out" by unintentionally resetting this bit.

    I look forward to hearing more about this subject.
     
    Last edited: Oct 16, 2008
  17. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    Attached please find the ART 2003 programmer schematic in ZIF. It is a parallel port programmer. The designer specifically says that he made this to program 18F2550 for use in PICKIT2 and another 18F2xx chip. I only wonder, if this can program 18F25xx, perhaps PICKIT2 becomes redundant.
     

    Attached Files:

    Last edited: Oct 16, 2008
  18. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    Hardly, it's a really poor LVP programmer, dependent on a custom program running on the PC - the PICKit2 is in a completely different league, and is a debugger as well.
     
  19. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    What is says is
    Whay you say is correct if you take the statement at face value. Bit it may be talking about LVP vrs HVP via a programmer. It could be that the bit is changable programaticaly (by running program). To write these config memory location one has to jump throgh the same hoops as one does to write EEPROM. It is not anything a stray bit of code is going to change, it requires quite a deliberate act.

    If the bit is not changable programaticaly one could move the BLOAD switch as I mention earlier. Bit it is a bit more work.

    What we are trying to do here is such an odd ball (wierd) sort of thing that I doubt one could say one way or another without trying it.

    3v0

     
  20. mvs sarma

    mvs sarma Well-Known Member

    Joined:
    Oct 29, 2006
    Messages:
    3,512
    Likes:
    76
    Location:
    Hyderabad, India.
    the designer says he used winpic600 in conjunction with ART2003.
     
  21. theo92

    theo92 New Member

    Joined:
    Aug 1, 2008
    Messages:
    177
    Likes:
    0
    Location:
    WB, India
    I experimented a lot with ART2003.

    ANY PIC WITH LVP CONFIG can be programmed with it.
    I tried 16F628A,18F2550,18F876A
    But sometime programming fails strangly....maybe due to my poor veroboard layout.....
     

Share This Page