We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi i am new with keil
when i start to use ADC in lpc2138 , this error appear for me i couldn't solve it " Error: L6218E: Undefined symbol main (referred from rtentry2.o)."
this is my code :
#include <lpc213x.h> #include <lcd.h> #include <stdio.h>
unsigned int read_adc();
void mian() { unsigned int adc_result; char buffer[16]; PINSEL1|=0x00800000; AD0CR=0x00200301; while(1) { adc_result=read_adc(); sprintf(buffer,"result=%d",adc_result); lcd_init(); lcd_gotoxy(0,0); lcd_print(buffer); }
} unsigned int read_adc() { int true; unsigned int result; AD0CR|=0x01000000; true=AD0GDR&1; while(!true) result=(AD0GDR>>5); result&=0x3FF; return result; }
void mian()
It is your typo! ==> main()
oooooooooooohhhhhh
special THX .