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.

i want to start program PIC using C++..sample need..please

Status
Not open for further replies.

lockman_akim

Advanced Member level 1
Joined
Jul 12, 2010
Messages
466
Helped
76
Reputation
152
Reaction score
68
Trophy points
1,308
Location
Malaysia
Activity points
3,523
i want to start program a PIC using C++ in MPLab..i have an experience in BASIC programming..can anyone give me a smple program such as LED blinking..

tanx..
 

try mikroc pro for pic it is easy to understand and have many examples
 

Or microchip compilers... C18 for PIC18 .... C30 for dsPIC and PIC24 and C32 for PIC32 ..
 

ok..i have install MPLab 8.5 and the High Tech C compiler..
ok can someone give the step to start program in C..

i really appreciate who help me..
 

i really appreciate who help me..

the ones you should really thank are those who do NOT help you: those people are forcing you to go back to basic because that's precisely what you need at this time.
 

If you look into the folder of the compiler ( C18, C30 or even HI - TECH C), there are samples of C codings. If you need more... you can always go to microchip:

**broken link removed**

:D
 

in the sample file, they used include files such as "pic.h"
is that the normal thing i should do before start my program??
i have my own board with pic16f77a, so how can i start to declare the IO etc??
 

"pic.h" is header that includes every PIC. Decide which compiler you want to use. Then, read the reference manual in the compiler. Every version has their own way of defining their function. :)
 
HI,
Try

**broken link removed**

it has some basic pic c example programs with coments
 
yup. And of course, other header that is in Hi - Tech C that you use. :) I am using C18 and C30. Should be the same. just that the implemetation is different ~~
 

i am using 16f877a, and the compiler is Hi Tech C, so just put

#include "pic.h"

just like that??


Again, do you have any experience with C programming? I use microchip compiler and not hi-tech but try opening the pic.h file and see what it says. Probably you you find out that this header take care for you of including the right file for your PIC. If you dont have any experience with C, dont starto with microcontrollers, get a standard C compiler and make some basic programs. And do no have fear to make a mistake. If you are writing yourself a code, why don you just compile it and see what compiler says? If something very important is missing he is going to warn you dont worry.
 

ok..i will try to learn C without using uC..
can anyone suggest what software i can use to learn it??

it is any free software?? hehehehe :wink:
 

Sure for windows i would go for Dev C++: LINK

For linux Eclipse: LINK

Grab a tutorial and try understanding how it works.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top