Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Status
Not open for further replies.

jtailor

Newbie level 5
Joined
Feb 2, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,354
Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi, all Gurus. As I am new to this micro controller programing, I started to learn some. I am using MPLAB IDE from Microchip. I copy the project code in C and pasted it in my IDE project. Now every time I build this project in MPLAB IDE, I found some error, warning and then it failed to build. I never have success. I don't know what is wrong. The code I paste in editing page is fine because the code texts change the color after I save it. But the building code in IDE is failing. I am using a free 45 days trial C compiler. The code is simple LED blinking. Can any one help me? Thanks a lot.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

MPLAB uses assembly source and not C
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi, all Gurus. As I am new to this micro controller programing, I started to learn some. I am using MPLAB IDE from Microchip. I copy the project code in C and pasted it in my IDE project. Now every time I build this project in MPLAB IDE, I found some error, warning and then it failed to build. I never have success. I don't know what is wrong. The code I paste in editing page is fine because the code texts change the color after I save it. But the building code in IDE is failing. I am using a free 45 days trial C compiler. The code is simple LED blinking. Can any one help me? Thanks a lot.

if you are using HI tech compiler in mplab so go tot ide where you wrote your code in c and right click->goto add to project and then build it i hope so it will build it...but be sure to have HI tech c compiler in mplab...
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

I think you still need to add a source file. Because you can never build a code whenever you don't have a source file. MPLab uses assembly and C.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi jtailor,

Did you correctly configure the project ? (ie. uC name, compiler selection, source directory and source files)
Please post your error codes (print-screen and save to jpg after compiling)

Thank you.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.


Here is the print screen image of the error code. Thank you again. And ya I am using the project wizard so it should be all done by wizard right? The uc name and all those things.

---------- Post added at 13:08 ---------- Previous post was at 13:05 ----------

Yes I did it as you described. But I am still having error. Thank you for your help though. And ya I have this Hi-tech c compiler for 45days trial.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi,

It is not ment for Hitech C if you are using one. This code belongs to CCS. I am sure you are compiling through Hi-Tech C. Please change the #include "16f84.C" to #include <pic.h> everything will be alright.

Thankyou.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi,

It is not ment for Hitech C if you are using one. This code belongs to CCS. I am sure you are compiling through Hi-Tech C. Please change the #include "16f84.C" to #include <pic.h> everything will be alright.

Thankyou.
Yes, I am using Hi-Tech C which I got it for 45days trial base. Any way I changed to <pic.h> I am still getting the error. (error # 499 ; 0. undefind symbol. I don't know what does that mean?)Ok if this code is not ment for Hitech and it is belongs to CCS, means what. Should I use diferent compiler? and if that is yes then what would you recomend?
Thank you again for your kind help.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

USE MikroC for PIC ....
IT's Best :D
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Hi jtailor,

Can you check that code you copy-past was written in Hi-tech or CCS ?

(Writing code to blink LED is pretty easy; what ever language you use, it' better to start by yourself. Follow beginner tutorial for you language. For each statement you write you can compile and check any error.)

Thank you,
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

You have not selected the processor. You have to select the processor from config and device. The #include <pic.h> pointed to that device which you have selected. Please post your code also. You have to select proper set of the controller in the main routine.
Thankyou

---------- Post added at 06:33 ---------- Previous post was at 06:30 ----------

Also include #include "delay.h" your code.
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

You have not selected the processor. You have to select the processor from config and device. The #include <pic.h> pointed to that device which you have selected. Please post your code also. You have to select proper set of the controller in the main routine.
Thankyou

---------- Post added at 06:33 ---------- Previous post was at 06:30 -
Also include #include "delay.h" your code.


Here is the code that I copied from web, one of the site from electronic projects. Since I don't have any idea so I might have done some stupid thing. But any way I thank you for helping me.
 

Attachments

  • Blinking LED with 16c84.txt
    187 bytes · Views: 61

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

hi

the code you posted is not belongs to either CCS or Hitech
if all the parameters are not defined in the library, this will not work
for such simple programs, you need not want to include many headers
this program you can simply write if you just look at the hitech manual
and i think there are many examples in the sample folder where you installed hitech

ml
 

Re: Having trouble to Programing PIC 16F84 in MPLAB IDE simulator.

Thank you for your help and the link.

---------- Post added at 09:37 ---------- Previous post was at 09:36 ----------

Thanks for your reply and help. I will try to go through the examples.

---------- Post added at 09:41 ---------- Previous post was at 09:37 ----------

Thank you so much.

---------- Post added at 09:43 ---------- Previous post was at 09:41 ----------

Thanks a lot.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top