Created
September 3, 2016 14:04
-
-
Save SaheblalBagwan/94e270ed5a083a2b1ca575958f1ca953 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> | |
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) | |
{ | |
P2 = 0xff; /* Turn ON all the leds connected to P2 */ | |
DELAY_ms(500); | |
P2 = 0x00; /* Turn OFF all the leds connected to P2 */ | |
DELAY_ms(500); | |
} | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment