Pickit3 Debugger Express Need Help Getting Started

Thread Starter

ShayneW

Joined Oct 23, 2017
13
Hello,
I am brand new to the microchip world and may have bitten off more than I can chew. I recently (about 6 months ago) bought a 44 pin pickit3 demo board with the pic18f45k20 chip.

I have downloaded the mplab x IDE v3.61 along with mplab IPE v3.61. I have tried to search the net high and low for information on how to get started with the lessons, but I am struggling to get lesson 1 done. Most all of the documents and forum(s) info that I have found dates back to 2011 timeframe and using C18 compiler, but I don't believe this is the latest version. I have downloaded the XC8 v.1.44, If I understand it correctly this is an 8bit compiler.

Q1. Is this the correct compiler that I need? (I also dowloaded the xc16 compiler, but for some reason it does not show up when I start a new project and it asks for which compiler to use)

I found the DS40001296C (44 pin demo board user guide revC (2015), but there is no code listed for the lessons, and it really isn't step by step for a noob like me. I also found PICkit™ 3 Debug Express, PIC18F45K20 – MPLAB,C Lessons (2009) document number DS41370C., which has the code listed, but it is missing information on the system header file, (I think) and other information

I guess what I need is an up to date spot to start to figure out what steps I need to take in order to work thru the lessons. Any help would be greatly appreciated.

Also I think I found all of the lesson files from a post somewhere on this forum, but a link to all of the lesson files would also be appreciated.
 

spinnaker

Joined Oct 29, 2009
7,837
If you bought the same kit I did then it came with a CD. I thought the lessons on there were very good. It includes code.

It was all on the CD. Did you get a CD?

I don't know if they updated it or not but the version I had used the old MPLab. I can package up the examples of what I have later if you need it.
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
But now that I look at the package closer, it says "Technical documentation (included on CD)... guess I should have looked closer when I bought it. Dang!
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
Max - Yes that is it... Thank you!.... In the documentation it calls for downloading MPLAB C Compiler for the PIC18, when I google that it takes it says it is no longer available, but I'm assuming that I still need to download the latest version " MPLAB C for PIC18 v3.47 upgrade or just use the standard versions? or has this been replaced with the XC8?
 

spinnaker

Joined Oct 29, 2009
7,837
Max - Yes that is it... Thank you!.... In the documentation it calls for downloading MPLAB C Compiler for the PIC18, when I google that it takes it says it is no longer available, but I'm assuming that I still need to download the latest version " MPLAB C for PIC18 v3.47 upgrade or just use the standard versions? or has this been replaced with the XC8?

You can use XC8.

1. Install MPLabx

2. Install the latest C compiler.

3. In the main.c file of the Hello LED example change #include "p18f45k20.h" to #include <xc,h>

4. Set the project properties xc8 include directory to where your include files are located. Usually C:\Program Files (x86)\Microchip\xc8\VERSION\include where VERSION is the version of your compiler.
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
Spinnacker - Thank you for the information, but I still must show my ignorance. I copied all of the lessons to a directory C:\Microchip\ 01 Hello LED. and I can see there is a Lesson 1 LED.mcp file.

So when I try to open the file, there is not a project file shown.

So I started a new project and copied the main.c program over into the source files. I commented out the # p18f45k20.h" and included the #include <xc,h>

But I don't have a header file, and I don't completely understand your comment #4. When I go to File/project properties/ in the complier toolchain it shows xc8 (v.144) [C;\program Files (x86)\Microchip\xc8\v.144\bin]

When using the lessons, should I start a new project or can I just open an existing project?

Sorry to ask such simple questions.
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
OK.. I imported the file and changed the #include <xc,h> in the includes section... now I have a squiggly line under the #include statement
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
No it was not a typo, but is was a typo .... I just copied your text in #11... changed to xc.h and it looks like progress... I have a "build successful" !
Thank you very much for your help.
 

Thread Starter

ShayneW

Joined Oct 23, 2017
13
Well onto lesson2 and stumped again... imported the lesson, changed the #include <xc.h> from the original # p18f45k20.h, also updated the include directories and the program can not find the #include "delays.h". I would have assumed that it would have been included in the directories... but you know what they say about assuming....

Can you guide me through the next hurdle?
 

spinnaker

Joined Oct 29, 2009
7,837
Remove delays.h

Replace any delay calls with __delay_ms and __delay_us accordingly.

I suggest you read through the documentation found in

C:\Program Files (x86)\Microchip\xc8\VERSION\docs
 
Top