Skip to content

Instantly share code, notes, and snippets.

@danhuynhdev
Last active September 25, 2016 04:18
Show Gist options
  • Save danhuynhdev/913eed60907fe50315f7cbdb9af8fa2d to your computer and use it in GitHub Desktop.
Save danhuynhdev/913eed60907fe50315f7cbdb9af8fa2d to your computer and use it in GitHub Desktop.
while (1)
{
switch (PINB) {
case 0b11111110 : {
x=0b10000000;
for (i=0 ; i<7 ; i++ ) {
PORTA=x;
delay_ms(100);
x=x>>1;
}
break;
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment