Society of Robots - Robot Forum
Software => Software => Topic started by: Ruby on June 14, 2013, 06:10:38 AM
-
Hi all. I am very new at PIC's so please be patience. I have bought pic18f2455 and pic18f2550 and pic6F877A. I have K150 and it's program to write the program to pic. The thing is I don't know which program I need to use to write program in C!!! And than I need a compiler to convert the program from C to HEX ; am I right?
I have already downloaded the MPLAB X IDE v1.80 but I have getting problems when I want to build the C.
Example:
#include <htc.h>
#include <pic.h>
#include <delay.c>
main()
{
TRISB=0; // declare portb as outpot
for(;;) // do forever
{
RB0=1; // LED ON
DelayMs(250); // delay for 0.25 seconds
RB0=0; // LED OFF
DelayMs(250);
}
}
Please HELP!!!!
-
I have getting problems when I want to build the C
Step 1: Copy and paste the actual errors you're getting. Else nobody will know what kind of problems you're having.
-
Like this....
Now I paid attention; is it possible that libraries are missing?
-
I see no error messages in that screen shot. I do see a missing "#" at the top of the file, though.
-
What about red exclamation points?
-
Ask yourself this: Why would someone ask you for what the error messages say when you're asking for help?
-
Getting started does take a bit of time and study.
I suggest this great tutorial on how to use and program PICs.
http://www.gooligum.com.au/tutorials.html (http://www.gooligum.com.au/tutorials.html)
Note: You do not need to buy anything to do most of the lesson. JUST MPLAB and its built-in Simulator.
Also note: MPLAB's Help is very good with tutorials. The Help is well worth reading.
-
Hi guys. I have downloaded "mikroC PRO for PIC" and everything goes ok. Leds are blinking :)
Thank you.
-
If you are looking for text editor that support C then try visual basics C++. This text editor has some good features, like the debugger.