Hello,
i've just downloaded the new MPLAB X IDE from Microchip and i'm trying to compile the very simple C program.
Here's the code:
and after compilling this code i have the following errors:
Can someone help me why i have these errors ?
In the beginning i tried to put #include<pic16f877a.inc> and i have the same errors
Thank you
i've just downloaded the new MPLAB X IDE from Microchip and i'm trying to compile the very simple C program.
Here's the code:
Rich (BB code):
#include <htc.h>
#include <pic.h>
void main()
{
TRISB.F7 = 0; //Makes RB7 a output pin
do
{
PORTB.F7 = 1; //Turns ON relay
Delay_ms(1000); // 1000 mS delay
PORTB.F7 = 0; //Turns OFF realy
Delay_ms(1000); //1000mS delay
}while(1);
}
Rich (BB code):
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `E:/PIC-Code/Relay-Test/Relay-test.X'
make -f nbproject/Makefile-default.mk dist/default/production/Relay-test.X.production.hex
make[2]: Entering directory `E:/PIC-Code/Relay-Test/Relay-test.X'
"C:\Program Files\Microchip\xc8\v1.12\bin\xc8.exe" --pass1 --chip=16F877A -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -obuild/default/production/Relay-Test.p1 Relay-Test.c
Relay-Test.c:6: error: struct/union required
Relay-Test.c:10: error: struct/union required
Relay-Test.c:11: warning: function declared implicit int
Relay-Test.c:12: error: struct/union required
(908) exit status = 1
make[2]: *** [build/default/production/Relay-Test.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `E:/PIC-Code/Relay-Test/Relay-test.X'
make[1]: Leaving directory `E:/PIC-Code/Relay-Test/Relay-test.X'
BUILD FAILED (exit value 2, total time: 562ms)
In the beginning i tried to put #include<pic16f877a.inc> and i have the same errors
Thank you