Professional Documents
Culture Documents
Instituto Politécnico Nacional: Unidad de Aprendizaje: Dispositivos Lógicos Programables
Instituto Politécnico Nacional: Unidad de Aprendizaje: Dispositivos Lógicos Programables
Actividad: Práctica 5
Decodificador de Botones
Multiplexor
entity VELOCIMETRO is
Port ( BUTTON1 : in STD_LOGIC;
BUTTON2 : in STD_LOGIC;
BUTTON3 : in STD_LOGIC;
BUTTON4 : in STD_LOGIC;
BUTTON5 : in STD_LOGIC;
BUTTON6 : in STD_LOGIC;
BUTTON7 : in STD_LOGIC;
BUTTON8 : in STD_LOGIC;
LED1 : out STD_LOGIC;
LED2 : out STD_LOGIC;
LED3 : out STD_LOGIC;
LED4 : out STD_LOGIC;
LED5 : out STD_LOGIC;
LED6 : out STD_LOGIC;
LED7 : out STD_LOGIC;
LED8 : out STD_LOGIC;
a : out STD_LOGIC;
b : out STD_LOGIC;
c : out STD_LOGIC;
d : out STD_LOGIC;
e : out STD_LOGIC;
f : out STD_LOGIC;
g : out STD_LOGIC;
MULTIPLEXOR : in STD_LOGIC);
end VELOCIMETRO;
a <= DIN or BIN or (CIN and AIN) or ((not CIN) and (not AIN));
b <= DIN or (not CIN) or ((not BIN) and (not AIN)) or (BIN and AIN);
c <= DIN or CIN or (not BIN) or AIN;
d <= ((not DIN) and CIN and (not BIN) and AIN) or ((not DIN) and (not
CIN) and BIN) or ((not CIN) and (not AIN)) or (BIN and (not AIN)) or DIN;
e <= ((not CIN) or BIN) and (not AIN);
f <= DIN or CIN or ((not BIN) and (not AIN));
g <= DIN or (CIN xor BIN) or (BIN and (not AIN));
--LEDS
LED1 <= BUTTON1;
LED2 <= BUTTON2;
LED3 <= BUTTON3;
LED4 <= BUTTON4;
LED5 <= BUTTON5;
LED6 <= BUTTON6;
LED7 <= BUTTON7;
LED8 <= BUTTON8;
end Behavioral;
Circuito Generado por Software
Simulación
Cuando tenemos el botón 1 encendido (35 millas/h) enciende el respectivo
LED
Aparece en el display el número 3 cuando el multiplexor está en estado alto,
cuando pasa a estado bajo cambia al número 5.
Referencias
Floyd, T. L. (2006). Fundamentos de Sistemas Digitales. Madrid: Pearson Educación.