Files
SyncHome/trunk/workspace/MC8051-Test/main.c
2023-03-13 08:36:51 +00:00

27 lines
486 B
C

/*
* main.c
*
* Created on: 10.03.2016
* Author: q242695
*/
#include <at89x52.h>
#define LED P1_0
void delay(void){ // How to get 125mS..
int x = 10500; // The while statement consumes 11.89uS (11 clock cycles )
while(x--); // So 10500 * 11.89uS = nearly 125mS
}
void main(void){ // Main entry point
while(1){ // Forever loop
LED = 1; // Using identifiers make the code easy
delay(); // to understand
LED= 0;
delay();
}
}