PICkit2 Drving me nuts!!!!


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Jul 2007
    Posts
    67

    Default PICkit2 Drving me nuts!!!!

    I can't figure this thing out

    I tried hooking it up countless times and I can't get it to program
    seriously I just wish that I could learn how to program with it

    I tried hooking it up with the ICSP and led and the PIC was smoking from MCLR
    which I'm sure was my fault
    but even before I still couldn't get it to work in the past and no smoking happened

    Any help would be greatly appreciated on helping me program with this thing

    I was using a PIC16F627A

  2. #2
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Its fairly easy to test all the signals on the Pickit2.

    Just load your Pickit2 software, go to Tools-Troubleshoot and follow all the steps, using your multimeter at all stages to confirm what you're supposed to be getting. If all tests pass, your Pickit2 itself should be okay.

    Regards,

    Anand

  3. #3
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Let us see how you connect the PICKIT2 to your 16F627A with the rest of your circuit. Maybe you made some wrong connections.
    Give us a drawing or some good photo's

  4. #4
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    This is how it was before I hooked up the LED
    Attached Images Attached Images  
    Last edited by Techbuilder; - 31st December 2009 at 12:19.

  5. #5
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    That should be no problem.
    If you did it like that and nothing else connected to the chip, it must programm it.
    There is ofcource still another possibility!
    The porgramm you wrote, sucks!
    The rest of your connection and or powersupply is not good.
    Sorry for this language but at this moment nothing else came to my memory.

  6. #6
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    It was a simple blink circuit and my power supply is a fixed bench top power supply

    I believe I just have a bad programmer because the programmer would say it reads a device and then say it didn't

    I say I should just move on to an Arduino

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    It was a simple blink circuit and my power supply is a fixed bench top power supply

    I believe I just have a bad programmer because the programmer would say it reads a device and then say it didn't

    I say I should just move on to an Arduino
    That's a choice, but it doesn't have to be an this <b>or </b> that choice. The PICKit2 will supply the chip and some simple circuits without an external power supply, it is a bit fussy about short circuits though. If you short it out you will have to unplug it and restart the software. Since you have the PICKit2 already, why not order the low parts count demo board and eliminate all the fussing with wires and breadboards to prove out code snippets, which you can translate over to other chips later, the 16F690 is a pretty powerful chip and the demo board couldn't be easier even if it had an Italian name. And trust me, PBP beats the heck out of all that screwy syntax the " C " languages use!
    Last edited by Archangel; - 31st December 2009 at 16:51.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8
    Join Date
    Jul 2007
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    What if my PICkit 2 is just the burnt cookie of the batch
    which would mean I would have to purchase the development board and a new pic kit
    honestly I love basic but I have not been able to find a way to properly compile and program to a chip

    This has been my second programmer

    1st one I bought was on ebay
    it was a Chinese made board

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PIC16F627 has a PGM pin, and can work on LVP mode. Having the LVP mode set to off in your config fuses is not enough in many occasion, you also need to pull this pin to gnd with a resistor.

    See the following link

    http://www.microengineeringlabs.com/support/icsp.htm

    And see what note 4 says...
    4. Make sure the "low-voltage programming" pin is pulled to ground. Low-voltage programming is not used by melabs programmers and should always be disabled in the configuration settings. Even so, the low-voltage programming pin (labeled PGM or LVP) should be pulled to ground when programming. If it is left floating or in a high condition, it may interfere with the programming process. ...
    Also make sure of your connection, As far as I remember, Pin 1 of PICKIT 2 is the pin with the white arrow on.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Techbuilder View Post
    What if my PICkit 2 is just the burnt cookie of the batch
    which would mean I would have to purchase the development board and a new pic kit
    honestly I love basic but I have not been able to find a way to properly compile and program to a chip

    This has been my second programmer

    1st one I bought was on ebay
    it was a Chinese made board
    I have 3 programmers, 2 $8.00 JDMs and a PICKIT2, I have Smoked a few PICS, and A nice Sure Electronics dot matrix board, but never a programmer. Is the USB port you are using working for other devices?
    Maybe you should UnInstall the Software and reinstall it. The Low parts Demo board is pretty cheap, and plugs into the PICKit2. http://www.microchipdirect.com/produ...rds=DM164120-1
    I just love it!
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  11. #11
    Join Date
    Jan 2010
    Posts
    2


    Did you find this post helpful? Yes | No

    Default I face the same problem with PIC Kit2

    Hi joe,

    I just buy a PIC kit and try to program my development board..I manage to program the PIC using PIC Kit 2, but led is not going to blink..this is my code:

    DEFINE OSC 20

    LED VAR PORTC.5
    trisc = $00

    MAIN:
    HIGH LED
    PAUSE 500
    LOW LED
    PAUSE 500

    GOTO MAIN

    maybe there are mistakes in the code? For your information i use the code to program PIC16F877A. Communication from the PIC Kit 2 to my board is ok..and programmed successfully.

    I have another question. I let say my oscillator did not work, is it the programming stage failed? because I not check the oscillator yet using scope.

  12. #12
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rosmadi View Post
    Hi joe,

    I just buy a PIC kit and try to program my development board..I manage to program the PIC using PIC Kit 2, but led is not going to blink..this is my code:

    DEFINE OSC 20

    LED VAR PORTC.5
    trisc = $00

    MAIN:
    HIGH LED
    PAUSE 500
    LOW LED
    PAUSE 500

    GOTO MAIN

    maybe there are mistakes in the code? For your information i use the code to program PIC16F877A. Communication from the PIC Kit 2 to my board is ok..and programmed successfully.

    I have another question. I let say my oscillator did not work, is it the programming stage failed? because I not check the oscillator yet using scope.
    Hi rosmadi,
    Welcome to the forum !
    Second question first: If no ocsillator, Then no work. period. If the configs are incorrect, then no OSC.
    Your code looks as if it will work, <b>BUT</B> You did not list which PIC you are using, If you are using the development board or a solder less breadboard, and how you are powering it, either by a separate power supply or from the PICKit2.
    The PICKit2 window has a little check box to power the development boards. Please give us the missing information I am going to list.
    PIC number
    Assembler . . . MPASM or the automatic default as installed
    Development board ? or Breadboard?
    Have you changed the xxx.inc file yet? xxx meaning the pic number I. E. 16F690.inc ? you will need to do this if you want to put configs into your code (recommended).
    Please view these threads:
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    http://www.picbasic.co.uk/forum/showthread.php?t=555
    http://www.picbasic.co.uk/forum/showthread.php?t=561
    The 3 threads are <b>must know</b> information to successfully program PICs.
    Last edited by Archangel; - 31st January 2010 at 21:46.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  13. #13
    Join Date
    Jan 2010
    Posts
    2


    Did you find this post helpful? Yes | No

    Talking Thank you Joe, It work just fine..

    Thank you Joe, you help me lots..I manage to program 2 PIC today. PIC16F877A and PIC18F452. I was a good starting point for me..Link given by Joe is very helpful..i just put my sample code to blink LED here as reference for anyone facing same problem like me after this...

    Code:
     8:49 PM
    
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  :                             *
    '*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 1/31/2010                                         *
    '*  Version : 1.0                                               *
    '*  Notes   : This is sample code to program PIC16F877A,        *
    '*           configuration setting must be done carefully 
    '*          (modified the setting based on your requirement). 
    '*          This programm has been tested on SK40B successfully.
    '*          Please note that in order to assemble with MPASM, 
    '*          please change accordingly at View>Compile and Program 
    '*          Option and edit the INC file at C:/PBP/16F877A.INC with 
    '*          the following:
    '*                  NOLIST
    '*                  ifdef PM_USED
    '*                  LIST
    '*                  include 'M16F87xA.INC'  ; PM header
    '*                  ;device  pic16F877A, xt_osc, wdt_on, lvp_off, protect_off
    '*                  XALL
    '*                 NOLIST
    '*                  else
    '*                  LIST
    '*                  LIST p = 16F877A, r = dec, w = -302
    '*                  INCLUDE "P16F877A.INC"  ; MPASM  Header
    '*                  ;__config _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
    '*                  NOLIST
    '*                  endif
    '*                  LIST
    '*
    '*          Note: sign ";" has been put infront of the 5 line and 12th. This will
    '*          avoid error by this way the configuration will be based on the user defined
    '*          as mention in the program below. INCLUDE "PI16F877A.INC" will be located in 
    '*          MPASM folder under C: program File/Microchip/MPASM Suite/ PI16F877A
    '*
    '*          SK40B can be used to program other PIC, but change need to be made on the
    '*          C:/PBP/16F877A.INC as mentioned above and of course the setting on config 
    '*          below must be refer to PIC datasheet. 
    '****************************************************************
    
    
    @ INCLUDE "P16F877A.INC" ; MPASM Header
    
    @__config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF & _CPD_OFF & _BODEN_OFF 
    
    
    
    DEFINE OSC 20 
    
    
    trisc = $00
    
    MAIN:
        PORTC = $FF
        PAUSE 500
        PORTC= $00
        PAUSE 500
    
    GOTO MAIN
    here is another code tested using PIC18F452..all port C is blinking make my eyes also blinking..

    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : Rosmadi bin Abdullah                              *
    '*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 1/31/2010                                         *
    '*  Version : 1.0                                               *
    '*  Notes   : This is sample code to program PIC18F452,        *
    '*           configuration setting must be done carefully 
    '*          (modified the setting based on your requirement). 
    '*          This programm has been tested on SK40B successfully.
    '*          Please note that in order to assemble with MPASM, 
    '*          please change accordingly at View>Compile and Program 
    '*          Option and edit the INC file at C:/PBP/18F452.INC with 
    '*          the following:
    '*          
    '     NOLIST
    '    ifdef PM_USED
    '        LIST
    '        "Error: PM does not support this device.  Use MPASM."
    '        NOLIST
    '    else
    '        LIST
    '        LIST p = 18F452, r = dec, w = -311, f = inhx32
    '        INCLUDE "P18F452.INC"   ; MPASM  Header
    '        ;__CONFIG    _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
    '        ;__CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    '        ;__CONFIG    _CONFIG4L, _LVP_OFF_4L
    '        NOLIST
    '    endif
    '        LIST
    'EEPROM_START	EQU	0F00000h
    'BLOCK_SIZE	EQU	8
    '        
    '*
    '*          Note: sign ";" has been put infront of the line 10th to 12th. This will
    '*          avoid error. By this way the configuration will be based on the user defined
    '*          as mention in the program below. INCLUDE "P18F452.INC" will be located in 
    '*          MPASM folder under C: program File/Microchip/MPASM Suite/ P18F452
    '*
    '*          SK40B can be used to program other PIC, but change need to be made on the
    '*          C:/PBP/xxxx.INC as mentioned above and of course the setting on config 
    '*          below must be refer to PIC datasheet. 
    '****************************************************************
    ' Also please locate the following statement in C:\Program Files\Microchip\MPASM Suite\P18F452
    ' and do the followin ammendment by placing ";" sign infront of the #define+++ 
    ';==========================================================================
    ';       16Cxxx/17Cxxx Substitutions
    ';==========================================================================
    
    '*      ;  #define DDRA  TRISA          ; PIC17Cxxx SFR substitution     
    '*      ;  #define DDRB  TRISB          ; PIC17Cxxx SFR substitution
    '*      ;  #define DDRC  TRISC          ; PIC17Cxxx SFR substitution
    '*      ;  #define DDRD  TRISD          ; PIC17Cxxx SFR substitution
    '*      ;  #define DDRE  TRISE          ; PIC17Cxxx SFR substitution
    
    
    
    
    
    @ INCLUDE "P18F452.INC" ; MPASM Header
    
    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
        ' Oscillator switch OFF
        ' Use HS oscillator (20MHZ here)
    
    @ __CONFIG _CONFIG2L, _BOR_OFF_2L & _PWRT_ON_2L 
        ' Brown out reset OFF
        ' Power-up timer ON
        
    @ __CONFIG _CONFIG2H, _WDT_ON_2H 
        ' Watch dog timer ON
        '
    @ __CONFIG _CONFIG4L, _STVR_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
        ' Stack over/underflow OFF
        ' Low Voltage programming OFF
        ' Background debugger OFF
    
    @ __CONFIG    _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
        'code protect disable
    
    DEFINE OSC 20 
    
    
    trisc = $00
    
    MAIN:
        PORTC = $FF
        PAUSE 500
        PORTC= $00
        PAUSE 500
    
    GOTO MAIN

Similar Threads

  1. ICD use with MCS Plus, PBPro & PicKit2??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th September 2009, 23:06
  2. Pickit2 / ICD2? advice please?
    By karenhornby in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th May 2008, 18:27
  3. mplap picbasic with pickit2
    By zk_bamx2 in forum General
    Replies: 1
    Last Post: - 25th February 2008, 03:13
  4. Help MCS with PICKIT2 programmer question
    By luminas in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 1st February 2008, 17:57
  5. Good news for Pickit2 disapointees
    By websmith in forum Off Topic
    Replies: 1
    Last Post: - 31st January 2007, 15:54

Members who have read this thread : 1

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