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.

why my c-compiler can't read my cod?

Status
Not open for further replies.

sanna

Member level 2
Joined
Jul 19, 2007
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,658
warning [361] function declared implicit int

I can't understand why my compiler can not read the cod for seting up microprocessors pins! I have my code in MPLAB and my compiler is hi-tech(picc-lite).
here is the lines it gives me errors. Thanks you for all your help.



SET_TRIS_a(0x1B); // A0,A1,A3
SETUP_WDT(WDT_2304MS) //2 SEC INTERUP

//INIT


SET_ADC_CHANNEL(1);
LEVEL=read_adc(); //read channel 1


wait_ms(250);
SETUP_ADC_PORTS(sAN0 | VSS_VDD); //SET AN0 AS ANALOG INPUT
SETUP_ADC_PORTS(sAN1 | VSS_VDD); // SET AN1 AS ANALOG INPUT
SETUP_ADC_PORTS(sAN3 | VSS_VDD); //SET AN3 AS ANALOG INPUT
SETUP_ADC(ADC_CLOCK_INTERNAL);
wait_ms(250);

OUTPUT_LOW(SIGNAL); //PIN 5,OUTPUT



Warning [361] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 39.1 function declared implicit int
Warning [361] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 40.1 function declared implicit int
Error [192] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 40.11 undefined identifier "WDT_2304MS"
Error [195] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 45.1 expression syntax
Warning [361] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 46.7 function declared implicit int
Warning [361] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 49.1 function declared implicit int
Warning [361] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 50.1 function declared implicit int
Error [192] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 50.17 undefined identifier "sAN0"
Error [192] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 50.24 undefined identifier "VSS_VDD"
Error [192] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 51.17 undefined identifier "sAN1"
Error [192] C:\Documents and Settings\sajir\Desktop\PIC_test\main.c; 52.17 undefined identifier "sAN3"
 

function declared implicit int

G'day,

These errors all look like they are caused by not including the correct headers.
You can import header files with the following:
Code:
#inlcude "header.h"

You should find which headers contain the prototypes for the functions you are using and which contain definitions of the macros/constants you are using here and include them at the top of the .c file

Darren J.
 

hi-tech c error 192 undefined

ya.....and if u write header, dnt forget to add as a part of the project...
regards
 

function declared-implicit-int

Your code was write in CCS PICC. If you compile this code with CCS compiler it should work.

Cristi
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top