Stefanovic
Newbie level 6
Hello everybody, i'm new here and i hope we'll have a long relationship
here is my problem, i tried to configure a PIC18F4550 fuses but i can't
And here is the logg
I really need your help
thank you.
here is my problem, i tried to configure a PIC18F4550 fuses but i can't
Code:
#include <htc.h>
#define SELECT LATC6
// PIC18F4550 Configuration Bit Settings
__CONFIG(PLLDIV_1 & CPUDIV_OSC1_PLL2 & USBDIV_1);
__CONFIG(FOSC_EC_EC & FCMEN_OFF & IESO_OFF);
__CONFIG(PWRT_OFF & BOR_ON & BORV_3 & VREGEN_OFF);
__CONFIG(WDT_ON & WDTPS_32768);
__CONFIG(CCP2MX_ON & PBADEN_ON & LPT1OSC_OFF & MCLRE_ON);
__CONFIG(STVREN_ON & LVP_ON & ICPRT_OFF & XINST_OFF);
__CONFIG(CP0_OFF & CP1_OFF & CP2_OFF & CP3_OFF);
__CONFIG(CPB_OFF & CPD_OFF);
__CONFIG(WRT0_OFF & WRT1_OFF & WRT2_OFF & WRT3_OFF);
__CONFIG(WRTC_OFF & WRTB_OFF & WRTD_OFF);
__CONFIG(EBTR0_OFF & EBTR1_OFF & EBTR2_OFF & EBTR3_OFF);
__CONFIG(EBTRB_OFF);
int i =0;
bit FLAG=0;
unsigned char conv_val=0x00;
void init_spi (void) {
//----config port spi-----
ADCON1=0x07; //portb<4:0> as digital input
LATC=0x00; //clear portb & c
LATB=0x00;
TRISB=0x01; //RB0(SDI) input, RB1 (SCK) output
TRISC=0x00; //RC7(SDO) en sortie , RC6(CS) en sortie
.
.
.
.
And here is the logg
Code:
CLEAN SUCCESSFUL (total time: 50ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/safwen/MPLABXProjects/PIC18_SPI_DAC.X'
make -f nbproject/Makefile-default.mk dist/default/production/PIC18_SPI_DAC.X.production.hex
make[2]: Entering directory `C:/Users/safwen/MPLABXProjects/PIC18_SPI_DAC.X'
"C:\Program Files (x86)\HI-TECH Software\PICC-18\9.80\bin\picc18.exe" --pass1 SPI_DAC.c -q --chip=18F4550 -P --outdir=build/default/production -N31 --warn=0 --runtime=default,+clear,+init,-keep,-download,+stackwarn,-config,+clib,-plib --opt=default,+asm,-asmfile,-speed,+space,9 --cp=16 -Blarge --double=24 --mode=lite -g --asmlist "--errformat=%%f:%%l: error: %%s" "--msgformat=%%f:%%l: advisory: %%s" "--warnformat=%%f:%%l warning: %%s"
SPI_DAC.c:19 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:19 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:19 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:20 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:20 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:20 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:21 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:21 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:21 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:22 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:22 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:22 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:23 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:23 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:23 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:24 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:24 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:24 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:25 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:25 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:25 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:26 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:26 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:26 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:27 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:27 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:27 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:28 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:28 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:28 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:29 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:29 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:29 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:30 warning: wrong number of preprocessor macro arguments for "__CONFIG" (1 instead of 2)
__CONFIG:30 warning: wrong number of preprocessor macro arguments for "___mkstr" (0 instead of 1)
___mkstr:30 warning: wrong number of preprocessor macro arguments for "___mkstr1" (0 instead of 1)
SPI_DAC.c:19: error: closing quote expected
SPI_DAC.c:20: error: Unknown macro ();) used in __CONFIG()
SPI_DAC.c:20: error: ")" expected
SPI_DAC.c:20: error: ";" expected
SPI_DAC.c:20: error: closing quote expected
SPI_DAC.c:21: error: closing quote expected
SPI_DAC.c:22: error: closing quote expected
SPI_DAC.c:23: error: closing quote expected
SPI_DAC.c:24: error: closing quote expected
SPI_DAC.c:25: error: closing quote expected
SPI_DAC.c:26: error: closing quote expected
SPI_DAC.c:27: error: closing quote expected
make[2]: *** [build/default/production/SPI_DAC.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
SPI_DAC.c:28: error: closing quote expected
SPI_DAC.c:29: error: closing quote expected
SPI_DAC.c:30: error: closing quote expected
make[2]: Leaving directory `C:/Users/safwen/MPLABXProjects/PIC18_SPI_DAC.X'
make[1]: Leaving directory `C:/Users/safwen/MPLABXProjects/PIC18_SPI_DAC.X'
BUILD FAILED (exit value 2, total time: 555ms)
I really need your help
thank you.