Diferencia entre revisiones de «Arduino»
Ir a la navegación
Ir a la búsqueda
Sin resumen de edición |
|||
| Línea 123: | Línea 123: | ||
http://learn.adafruit.com/all-about-leds?view=all | http://learn.adafruit.com/all-about-leds?view=all | ||
http://www.sentex.ca/~mec1995/tutorial/7seg/7seg.html | http://www.sentex.ca/~mec1995/tutorial/7seg/7seg.html | ||
http://www.ti.com/lit/ds/symlink/cd4511b.pdf | |||
http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html | |||
Revisión del 23:22 11 nov 2013
Projectes
Comptador
Per a fer aquest comptador utlitzem un Display BCD i un xip cd4511be
Si tenim en compte que el xip decodificador té aquestes entrades:
i el display aquestes:
Les connexions quedaran:
| Arduino | cd4511be |
|---|---|
| 2 | A |
| 3 | B |
| 4 | C |
| 5 | D |
| 5v | Vdd, LT, BL |
| GND | VSS, LE |
void setup()
{
for (int i=2;i<6;i++){
pinMode(i,OUTPUT);
}
}
void loop()
{
digitalWrite(2,0);
digitalWrite(3,0);
digitalWrite(4,0);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,1);
digitalWrite(3,0);
digitalWrite(4,0);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,0);
digitalWrite(3,1);
digitalWrite(4,0);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,1);
digitalWrite(3,1);
digitalWrite(4,0);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,0);
digitalWrite(3,0);
digitalWrite(4,1);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,1);
digitalWrite(3,0);
digitalWrite(4,1);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,0);
digitalWrite(3,1);
digitalWrite(4,1);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,1);
digitalWrite(3,1);
digitalWrite(4,1);
digitalWrite(5,0);
delay(1000);
digitalWrite(2,0);
digitalWrite(3,0);
digitalWrite(4,0);
digitalWrite(5,1);
delay(1000);
digitalWrite(2,1);
digitalWrite(3,0);
digitalWrite(4,0);
digitalWrite(5,1);
delay(1000);
}
Enllaços
http://learn.adafruit.com/all-about-leds?view=all http://www.sentex.ca/~mec1995/tutorial/7seg/7seg.html http://www.ti.com/lit/ds/symlink/cd4511b.pdf http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html

