Created
May 15, 2017 21:30
-
-
Save HectorTorres/790b7f22d586f097ef0aa1a3436bdc68 to your computer and use it in GitHub Desktop.
Contador 7segmentos
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
void setup() | |
{ | |
DDRD=255; //Se declara todo el puerto como salida | |
} | |
void loop() | |
{ | |
//Al puerto "D" le asignamos los valores obtenidos haciendo una pausa de 1segundo entre cada numero | |
PORTD=0x7E; //0 | |
delay(1000); | |
PORTD=0x30; //1 | |
delay(1000); | |
PORTD=0x6D; //2 | |
delay(1000); | |
PORTD=0x79; //3 | |
delay(1000); | |
PORTD=0x33; //4 | |
delay(1000); | |
PORTD=0x5B; //5 | |
delay(1000); | |
PORTD=0x5F; //6 | |
delay(1000); | |
PORTD=0x70; //7 | |
delay(1000); | |
PORTD=0x7F; //8 | |
delay(1000); | |
PORTD=0x7B; //9 | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment