Author Topic: MPLAB IDE Build Errors  (Read 1087 times)

0 Members and 1 Guest are viewing this topic.

Offline jaden845Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
MPLAB IDE Build Errors
« on: August 25, 2012, 04:08:59 AM »
I am a new user to MPLAB IDE and am trying to understand the basics of programming so that I can:

1) turn a motor on and off using an NPN mosfet (circuit already complete)
2) control a motor using a H-Bridge circuit (circuit incomplete but I know how to make it)

My current problem:

I have installed MPLAB IDE V8.87, created a project for my pic18f4520 and added the relevant code. I am getting errors when I try building the code and I am unsure what they mean.

If anyone could assist me with these errors I would be grateful. (printscreens of errors and code attached)

Many thanks

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: MPLAB IDE Build Errors
« Reply #1 on: August 25, 2012, 03:26:02 PM »
The errors look to be a missing function prototype.
This is a C programming issue. Refer to a good C programming book.

Recommended is the K&R book which is the Standard (my 1st edition copy is over 20 years old and I still use it).
http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628

Online is The C Book:
http://publications.gbdirect.co.uk/c_book/

For addition info on using and programming PICs see this tutorial:
http://www.gooligum.com.au/tutorials.html

Just looked at the error again and I see you are trying to use MASM for a C program. The tutorial above should help you some but the MPLAB Help Topics will help more. Then use the Project Wizard to setup the project and have it use the correct compiler (the code looks to be written for the Microchip C18 compiler).

The C18 compiler does not come with MPLAB, you must download and install it separately (it is free and integrates directly with MPLAB).
« Last Edit: August 25, 2012, 03:32:48 PM by waltr »

Offline jaden845Topic starter

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 0
Re: MPLAB IDE Build Errors
« Reply #2 on: August 26, 2012, 03:09:23 PM »
Ok thanks for the information Waltr.

Will get on that tomorrow :)

 


Get Your Ad Here