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 microcontroller 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:
simulate this circuit – Schematic created using CircuitLab
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?