Salve,
questo semplice listato
Code:
/*
* Tested con Freedom II
*
* LTlib_test_Cicalino
* MPLABX v4.01 - XC8 v1.44
* pic 18F4550
* 9 gennaio 2018
*/
#include <xc.h>
#include <LTlib.h>
#include <LTlib_delay.h>
#include <LTlib_delay.c>
#include <module_IO.h>
#include <module_IO.c>
#define cicalino PORTC_BIT0
int main (void){
IO_set_all_ports_as_inputs();
IO_set_port_direction(IO_PORTC,IO_BIT0_OUT);
while(1){
delay_s(2);
IO_write_port(cicalino,0x01);
delay_ms(10);
IO_write_port(cicalino,0x00);
}
}
che dovrebbe far funzionare il cicalino montato sulla Freedom II mi da l'errore nella riga "IO_write_port(cicalino,0x01);" quando lo compilo.
CLEAN SUCCESSFUL (total time: 62ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory '/Users/ezio/MPLABXProjects/LTlib_test_Cicalino.X'
make -f nbproject/Makefile-default.mk dist/default/production/LTlib_test_Cicalino.X.production.hex
make[2]: Entering directory '/Users/ezio/MPLABXProjects/LTlib_test_Cicalino.X'
"/Applications/microchip/xc8/v1.44/bin/xc8" --pass1 --chip=18F4550 -Q -G --double=32 --float=32 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 -I"../../Documents/Freedom II/LTlib_v_4.0.4/conf" -I"../../Documents/Freedom II/LTlib_v_4.0.4/inc" -I"../../Documents/Freedom II/LTlib_v_4.0.4/src" --warn=0 --cci --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-download,+config,+clib,-plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/main.p1 main.c
main.c:26: error: (192) undefined identifier "PORTC_BIT0"
Non riesco a capire come risolvere.
Lello