PicKit3

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Hi,
I received the PicKit3 today and I have a few questions. In MPLab IDE, do you need to create project before you program the microcontroller? When I was using freescale microcontrollers, I could just write a .c file and program it with that file. I prefer to keep it as simple as possible since my program will only be about 100 lines.

Should I select the PicKit3 from the select programmer menu? If anyone knows of quick start guide in video format let me know, since I learn better from video rather sorting though tons of help files.

Also getting this error: "Target Device ID (000027a0) does not match expected Device
ID (000028a0)." when selecting PicKit3 as a programmer.
 

spinnaker

Joined Oct 29, 2009
7,830
Hi,
I received the PicKit3 today and I have a few questions. In MPLab IDE, do you need to create project before you program the microcontroller? When I was using freescale microcontrollers, I could just write a .c file and program it with that file. I prefer to keep it as simple as possible since my program will only be about 100 lines.

Should I select the PicKit3 from the select programmer menu? If anyone knows of quick start guide in video format let me know, since I learn better from video rather sorting though tons of help files.

Also getting this error: "Target Device ID (000027a0) does not match expected Device
ID (000028a0)." when selecting PicKit3 as a programmer.
What is the big deal about creating a project? It is very easy.

You need to select the PickKit 3 from the programmer or debugger menu, whichever environment you are compiling.

You need to pick your target device. This is found under Configure/Select Device. Or it is done when you run the Project Wizard under Project.

You probably have the wrong device selected.
 

spinnaker

Joined Oct 29, 2009
7,830
Look for a publication called PICkit™ 3 Debug Express PIC18F45K20 – MPLAB® C Lessons. It is for the PIC18F45K20 but should apply. It will take you over the basics of MPLab and PIC programming.
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
It's giving me some errors when I try to compile. I noticed that a lot of tutorials want me to add a linker file. In the High Tech C compiler folders there is no linker file folder. Any ideas?
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
t06afre, In that guide, it wants me to select the C18 compiler. The MPLab CD came with the "High Tech C" compiler. I don't have the C18 compiler on my computer. Is the C18 compiler better than the High Tech C compiler that came with the the MPLab software?
 

t06afre

Joined May 11, 2009
5,934
Can you post the code for one of your examples? Before the C18 compiler was used in the debug express sample code. But it could be that Microchip has changed to HI-Tech C in the debug express examples. As HI-Tech now is owned by Microchip
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Here is a screenshot.

http://i51.tinypic.com/2q8swig.jpg

I'm testing the blink-led program.

As you can see there is no linker project folder like in the C18 version. Does this mean that we don't need to use linker files?

Maybe the easiest thing to do would be use the C18 version, since everyone seems to know how to get that one to work. Where can I download the free version of that?
 

t06afre

Joined May 11, 2009
5,934

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
I'm trying to program the PIC16F1827. I have no need to program the demo board. From the link you showed, it looks like I'll have to use the High Tech C compiler. Any ideas?
 

t06afre

Joined May 11, 2009
5,934
But the code you showed me where does it come from? Using HI-Tech C is not problem. I do it. But your code is for Micro-C. And it is many differences between Micro-C and HI-tech C. You have to port the code ;). For using HI-Tech C it is a folder named docs in the instal folder. Here you will find the manual and the quickstart.pdf among other documents
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Ah yeah :)

When you go to Configure and Configuration bits and set the register values, any ideas where that file is stored in the project?
 
Last edited:

t06afre

Joined May 11, 2009
5,934
They are at the end of header file always I think. But in HI-Tech C many MCUs share the same header file. You have to open the pic.h file to find out which header file that is used. Refer to the MCU datasheet for more info about the settings.
 
Last edited:

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Thanks for the help. I got the blink LED program working now :) And I've figured out everything that I need to start programming. This is my first time using Microchip and I'm excited about how much simpler everything was to setup and use. I used Freescale before and they are a pain in the neck. Have a good day.
 

t06afre

Joined May 11, 2009
5,934
Thanks for the help. I got the blink LED program working now :) And I've figured out everything that I need to start programming. This is my first time using Microchip and I'm excited about how much simpler everything was to setup and use. I used Freescale before and they are a pain in the neck. Have a good day.
Then I first started with PICs. I felt like a fish on land. It is normal that things start kind of slow.
 
Top