Building error

General discussion on mikroC.
Post Reply
Author
Message
dalgarin
Posts: 4
Joined: 18 Jun 2005 06:41

Building error

#1 Post by dalgarin » 18 Jun 2005 06:47

Whe I press de build projects button de compiler tell me this message:

"Undeclared identifier [Adc_Read] in espression.

The part of code of this instruction is:

......

Code: Select all

while(1)
	{

		// Read el ADC 0 (AN0)
		ValorADC = Adc_Read(0);
....

Thanks.
David.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Building error

#2 Post by zristic » 18 Jun 2005 08:49

You are probably using the chip which does not have AD converter.

dalgarin
Posts: 4
Joined: 18 Jun 2005 06:41

Is a PIC184550 and a PIC16F877A

#3 Post by dalgarin » 18 Jun 2005 10:20

The program is for a 18F4550, but with an 16F877 dont work.

Thanks
David

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: Is a PIC184550 and a PIC16F877A

#4 Post by pizon » 18 Jun 2005 13:45

Try to restart mikroC. If this fails, try with another MCU (e.g.16F877A);
pizon

dalgarin
Posts: 4
Joined: 18 Jun 2005 06:41

I try with 16F877A

#5 Post by dalgarin » 19 Jun 2005 14:36

I try with 16F877A and the problem persists. Who I can include a ADC Library?

Thanks
David

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: I try with 16F877A

#6 Post by pizon » 20 Jun 2005 08:12

ADC library is included in all MCUs that have the A/D module. Try building the ADC example(s) supplied with mikroC. If this fails, try to purge the search path list (<Tools> -> <Options...> -> <Search Path>). If this doesn't help, re-install mikroC.
pizon

dalgarin
Posts: 4
Joined: 18 Jun 2005 06:41

It's work

#7 Post by dalgarin » 20 Jun 2005 08:43

I editting the P18F4550.mlk and I include "#pragma Setlib(ADClib_A_C)", and it's work.

Thank,
David

Post Reply

Return to “mikroC General”