USB Programmer on e-bay


Closed Thread
Results 1 to 9 of 9

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    nah, it shouldn't have cause any grief. But yeah, the configuration fuses might be one part of the problem. If you don't have any error message, it should work.... unless you use PICKIT to supply the target board and you have forget to enable the VCC line in the utility.

    BUT, i NEVER suggest to use PICKIT to supply the target board, same thing with EASYPIC 4, EASYDsPIC 4 etc etc.. at least for development purpose.
    Steve

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

  2. #2
    Join Date
    Nov 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    My head hurts!

    I am trying to learn how to set the configuration bits. I try to use the MPLAB configuration bits window, but I can't get it to stick in the chip. I am using PICKIT 2 programming software, and it displays the config register, so I know it isn't doing what I want.

    I discovered the .inc file for the PIC I am using. Editing this seems to work, but I don't know how to create all of the different names for the bits, etc. Yes, I can change an On to Off, but for example, my file doesn't seem to have anything for the Power-Up Timer in it. Where do I find the info do edit this file? I've looked at the PIC12F683 data sheet, and I understand the config register and what the bits do. I just don't know how to edit the .inc file.

    I seem to be able to both read and write the chip using the PICKIT2 directly. However, when writing from MPLAB, it writes, but fails verify. And when I read from MPLAB it doesn't actuall load the program, like PICKIT 2 does. ??? Is this part of my problem? Can't be good.

    Any help is much appreciated at this point.

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


    Did you find this post helpful? Yes | No

    Default

    Can you post your code?

    Did you have a look at the following thread?
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    At least from post 1 to 5

    EDIT: oh, make sure you have the latest MPLAB and PICKIT 2 software version
    MPLAB 8.00
    Pickit 2 : V2.40

    You may need to update your PICKIT 2 firmware

    try this one
    Code:
        @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BOD_ON 
             ' Internal Oscillator
             ' Enable watch dog timer
             ' Enable power up timer
             ' Disable MCLR pin
             ' Enable brown out detect
             
        TRISIO=%11001011 ' MCLR/PGD/PGC pin as input
        GPIO=0
        ANSEL = 0
        CMCON0= 7
        
    Start:
        gpio=255
        pause 500
        gpio=0
        pause 500
        goto start
    While programming, none of the MCLR/PGD/PGC pins should be loaded.
    Last edited by mister_e; - 2nd December 2007 at 01:18.
    Steve

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

  4. #4
    Join Date
    Nov 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply. This is exactly what I needed. Actually, shortly after my last post, I found a link, http://www.melabs.com/support/config_defaults.htm that sorted it all out for me. Why this info isn't in the PBP manual baffles me!

    My code is now running, but it seems the logic on the inputs is inverted. Another magic register to tell it a high logic level = 1?

  5. #5
    Join Date
    Nov 2007
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    OK. ANSEL register is the trick. I needed digital inputs, and it was configured for analog! I found the info in the data sheet. Thanks again Mister e!

Similar Threads

  1. Usb Programmer ?
    By iugmoh in forum USB
    Replies: 3
    Last Post: - 20th April 2008, 18:10
  2. USB programmer problem 18LF4620
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th November 2007, 02:03
  3. problems with USB programmer
    By malc-c in forum General
    Replies: 7
    Last Post: - 10th May 2007, 20:14
  4. USB programmer problems
    By uiucee2003 in forum USB
    Replies: 2
    Last Post: - 15th August 2006, 23:47
  5. Melabs USB Programmer
    By tmurph in forum General
    Replies: 1
    Last Post: - 25th December 2005, 03:25

Members who have read this thread : 0

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