This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

89C51 programming

Hi,

A real silly problem. I am currently learning how to program this guy, ATMEL 89C51. I had a LED on Port 1 pin 0. 4MHz crystal with 30pF caps to ground, resent to ground, grounded the uC, 5v to Vcc. And the my program can't compile.
==========
#include <AT89X51.H>
#include <stdio.h>
int main()
{
int x,led;
sbit led = P1 ^ 0;
while(1)
{ led = 1;
for (x=0;x<10000;x++);
;
led = 0;
for (x=0;x<10000;x++);
}
return(0);
}

/*
..\test.C(7): error C141: syntax error near 'sbit'
Target not created
*/

Someone tell me wats wrong? Do I have to configure the Ports ie. CWR? Like wat I have to do programming a 8255 PPI chip?

Thank you,

hengkc.geo@yahoo.com