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.

Need C code example for AT89s51/52/53 written in Keil

Status
Not open for further replies.

wakaka

Full Member level 4
Joined
Dec 7, 2005
Messages
237
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
2,931
Hi guys, i need c code example for AT89s51 or 52 or 53 using .....Keil C or SC51 compiler. Need the basic one, like LED blinking, delay, loop, PWM, Interrupt......
Starting to learn how to program the Atmel 8051.
plz help, thanks....
 

Re: C code example

Goto "C" section of this code library:
**broken link removed**

Regards,
IanP
 

C code example

ty, any other resources???
 


C code example

I'm writing the code using MIDE-51
actually i prefer examples which looks something like this :

#include < at892051.h > /* Include 89C2051 header file */

char const num[ ] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };

void wait (void)
{ ; /* wait function */
}

void main( void )
{
unsigned int i;
unsigned char j;

P1 = 0; /* initialize ZERO to P1 */

while(1){

for( j = 0; j < 8; j++ )
{
P1 = num[ j ];

for ( i = 0; i < 10000; i++ )
{
wait(); /* delay for half second */
}
}
}
 

C code example

anyone, thankx
 

Re: C code example

THANKS WKAKA ... BECAUSE I WAS LOOKING FOR C ++ CODE FOR PWM GENERATION..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top