Skip to content

Instantly share code, notes, and snippets.

@d-boz-wtwh
Created October 22, 2019 21:03
Show Gist options
  • Save d-boz-wtwh/ba89b46491c3d1d5c3914862d96b0f83 to your computer and use it in GitHub Desktop.
Save d-boz-wtwh/ba89b46491c3d1d5c3914862d96b0f83 to your computer and use it in GitHub Desktop.
Microcontroller Projects
#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