Menu

What's wrong with connecting PIC12F683 to MPLABX with PicKit3?

Helen Wang
2018-03-27
2018-04-06
  • Helen Wang

    Helen Wang - 2018-03-27

    Disclaimer: I am a complete noob when it comes to programming chips with a dedicated external programmer such as the PicKit3, as well as writing code for chips (especially not in C) so bear with me :)

    I am attempting to connect a Microchip PIC12F683 8-bit microcontrolle(more about microcontroller: http://www.apogeeweb.net/article/58.html)r to my PC with a PicKit3 and MPLAB X. My main goal is just to be able to do a basic "Hello, World" by flashing an LED on one of the outputs. I have MPLAB X opened up with a new program in C with the following code:

    /* 
    * File:   newmain.c
    * Author: Malachi
    *
    * Created on March 20, 2018, 7:04 PM
    */
    
    #include <stdio.h>
    #include <xc.h>
    #include <stdlib.h>
    
    /*
    * 
    */
    int main(int argc, char** argv) {
        TRISIO = 0; // set as output
        while(1) { // infinite loop
    
        GPIO = (1<<4);
      }
        return (EXIT_SUCCESS);
    }
    

    When I hit "Run Main Project," it successfully builds (using the XC8 compiler I was instructed to install by MPLAB), but when it connects to the PicKit3, it says the following in the console:

    Connecting to MPLAB PICkit 3...
    
    Currently loaded firmware on PICkit 3
    Firmware Suite Version.....01.51.08
    Firmware type..............Midrange
    
    Target device was not found (could not detect target voltage VDD). You must connect to a target device to use PICkit 3.
    

    The PIC12F683 is wired to the PicKit3 like this:
    PIC12F683 wired to the PicKit3

    I'm not sure what this error means, or how to fix it. Does anyone have any advice as to what my next steps should be?

     

    Last edit: Helen Wang 2018-03-27
  • Keith

    Keith - 2018-03-27

    Hello Jane and Welcome to the Group. I started in a very similar vane with MPLAB but frankly I found mandarin chinese much easier.

    I feel your best way forward would be to download and install Great Cow Basic and use that with its built in compiler which will talk directly to your PKit3.

    I an quickly put some code together for your 12F675 device which will get you up and running with a 'Hello World' LED FLash.

    Drop a line back here when you have installed your GCB GUI and I'll post the Code for you.

    Hope this helps

    Regards
    Keith

     
  • Keith

    Keith - 2018-03-27

    Code for GCB and 12F683 LED Flash

    (Enjoy !)

     

    Last edit: Keith 2018-03-27
  • David Stephenson

    Looks to me like you need to power the 16F683 fromthe pickit3., but it's difficult to be sure.
    In the IPE it requires going into the advanced settings (password:microhip) and setting the Vdd.

     
  • stan cartwright

    stan cartwright - 2018-04-06

    If anyone want's Chinese translated, my dughter in law can read and translate. She is Chinese.
    She's from near north korea border. Her dialect is Jin. Seems to read film subtitles and food labels ok. The thread mentioned mandarin, sorry.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.