Created
September 3, 2016 14:07
-
-
Save SaheblalBagwan/eb446d21ebdc716914458c6c7fc41a60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <reg51.h> | |
sbit LED = P2^0; // Bling the single LED connected to P2.0 | |
void DELAY_ms(unsigned int ms_Count) | |
{ | |
unsigned int i,j; | |
for(i=0;i<ms_Count;i++) | |
{ | |
for(j=0;j<100;j++); | |
} | |
} | |
int main() | |
{ | |
while(1) | |
{ | |
LED = 1; /* Turn ON the LED connected to P2.0 */ | |
DELAY_ms(500); | |
LED = 0; /* Turn OFF the LED connected to P2.0 */ | |
DELAY_ms(500); | |
} | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment