Created
October 22, 2019 21:03
-
-
Save d-boz-wtwh/ba89b46491c3d1d5c3914862d96b0f83 to your computer and use it in GitHub Desktop.
Microcontroller Projects
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<reg52.h> | |
void delay() | |
{ | |
unsigned int i,j; | |
for(i=0;i< 500;i++) | |
for(j=0;j< 1000;j++); | |
} | |
void main() | |
{ | |
while(1){ | |
delay(); P1=0x01; | |
delay(); P1=0x02; | |
delay(); P1=0x03; | |
delay(); P1=0x04; | |
delay(); P1=0x05; | |
delay(); P1=0x06; | |
delay(); P1=0x07; | |
delay(); P1=0x08; | |
delay(); P1=0x09; | |
delay(); P1=0x0A; | |
delay(); P1=0x0B; | |
delay(); P1=0x0C; | |
delay(); P1=0x0D; | |
delay(); P1=0x0E; | |
delay(); P1=0x0F; | |
delay(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment