I'm trying to set up and test an 8051 development board. I'm using Keil uVision 4, with some code examples included with the dev board. The included hex file examples upload to the 8051 and work perfectly.
My problem is in Keil (4.72.9.0), when I try to build a new hex file from a uVision project file, there is an error with the 8051.h library. The 8051.h file is listed as a Source Group 1 item.
Error text: compiling LED.c... 8051.h(29): error C129: missing ';' before '__at' Target not created
Here is my code:
/********** Blink LED ***********/ #include "8051.h" sbit led=P2^0; void delay(unsigned int time); void main(void) { while(1) { led = led; delay(40000); delay(20000); delay(20000); delay(20000); /* led=1; delay(20000); led=0; delay(20000); */ } } void delay(unsigned int time) { while(time--); }
Do I have bad 8051.h files, or what fix may be necessary to correct this? I have tried multiple 8051.h files.
Any guidance appreciated.
Hi,
I am new to the 'embedded C' world. Can anyone please give me entire program or a link for blinking LED program in C language for ARM Cortex M0,ARM Cortex P and ARM Cortex 3.
I am using µvision v16a IDE. Please let me know if i need to provide any other information.
Thanks in advance :)