Você está na página 1de 9

ESCUELA SUPERIOR POLITCNICA DE

CHIMBORAZO.

FACULTAD DE INFORMTICA Y ELECTRNICA.


ESCUELA DE INGENIERA ELECTRNICA EN CONTROL Y REDES
INDUSTRIALES.
SEMESTRE: OCTAVO
MATERIA: SISTEMAS EMBEBIDOS
TMA: TAREA EN CASA, FLIP_FLOP, COMPARADOR, DISPLAY.

ALUMNO:

Riobamba-Ecuador

FLIP-FLOP:
En este circuito se presenta la actuacin de un flipflop con reset asncrono el cual captura un
dato con el flanco de reloj y la pata de reset lo vuelve a su valor original inmediatamente. Para la
estructura de programacin se utiliza la sentencia de pregunta IF.

GRAFICO1: Operacin del flipflop

TABLA DE VERDAD DEL CIRCUITO

CODIGO DEL PROGRAMA


library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity flip_flop is
port(
clk : in STD_LOGIC;
reset : in STD_LOGIC;
d : in STD_LOGIC;
q : out STD_LOGIC
);
end flip_flop;
--}} End of automatically maintained section
architecture flip_flop of flip_flop is
begin
process(clk,reset)
begin
if(reset='1')then
q<='0';
elsif(clk'event and clk='1')then
q<=d;
end if;
end process;
end flip_flop;

CAPTURA DE PANTALLA DEL PROGRAMA FLIPFLOP.

CIRCUITO COMPARADOR.

En este circuito se utiliza sentencias de compuertas lgicas como son las: AND, OR, XOR,
NAND, NOT. Para lo cual se ha realizado la tabla de verdad que a continuacin se
presenta y tambin su respectivo diagrama lgico con las compuertas citadas
anteriormente.
En este circuito se compara entre la multiplicacin de A0*A1 COMPARADO CON B0*B1.
DIAGRAMA:
A0
A1
B0
B1

X A=B
Y A>B
Z A<B

DIAGRAMA EN COMPUERTAS LOGICAS

TABLA DE VERDAD

A
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1

A
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1

B
0
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1

B
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

X Y Z
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1

0
1
1
1
0
0
0
0
1
1
0
0
1
1
1
0

0
0
0
0
1
0
1
1
0
0
0
1
0
0
0
0

CODIGO DEL PROGRAMA:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity comparador is
port(
a1 : in STD_LOGIC;
a0 : in STD_LOGIC;
b1 : in STD_LOGIC;
b0 : in STD_LOGIC;
x : out STD_LOGIC;
y : out STD_LOGIC;
z : out STD_LOGIC
);
end comparador;
--}} End of automatically maintained section
architecture comparador of comparador is
begin
process(a1,a0,b1,b0)--[poner las entradas]
begin
-- azul
if(a1='0' and a0='0' and b1='0' and b0='0') OR
(a1='0' and a0='1' and b1='0' and b0='1') OR
(a1='1' and a0='1' and b1='1' and b0='1')
then x <='1';
y <='0';
z <='0';
else if (a1='0' and a0='0' and b1='0' and b0='1') OR
(a1='0' and a0='0' and b1='1' and b0='0') OR
(a1='0' and a0='0' and b1='1' and b0='1') OR
(a1='0' and a0='1' and b1='1' and b0='0') OR
(a1='0' and a0='1' and b1='1' and b0='1') OR
(a1='1' and a0='0' and b1='1' and b0='0') OR
(a1='1' and a0='0' and b1='1' and b0='1')
then x <='0';
y <='0';
z <='1';
else x <='0';
y <='1';
z <='0';

end if;
end if;
end process;
-- enter your statements here -end comparador;

CAPTURA DE PANTALLA DEL PROGRAMA COMPARADOR.

CIRCUITO BCD
En este circuito se presenta un sumador completo, el cual sumara tres bits y
dependiendo d cual sea la combinacin que sume este indicara si la suma lleva acarreo
o no la lleva, est compuesto de 3 entradas las cuales se sumaran y dos salidas en la
primera salida indica si la suma lleva acarreo y la segunda salida dir el resultado de la
suma.
TABLA DE VERDAD.
A B C S
A
0 0 0 1
0 0 1 0
0 1 0 0
1 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0

S S
B C
0 0
1 0
0 1
0 0
0 0
0 0
0 0
0 0

S
D
0
0
0
1
0
0
0
0

S
E
0
0
0
0
1
0
0
0

S S
F G
0 0
0 0
0 0
0 0
0 0
1 0
0 1
0 0

DISPLAY DE 7 SEGMENTOS

CODIGO DEL PROGRAMA

S
H
0
0
0
0
0
0
0
1

library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity BCD is
port(
A : in STD_LOGIC;
B : in STD_LOGIC;
C : in STD_LOGIC;
--D : in STD_LOGIC;
SA : out STD_LOGIC;
SB : out STD_LOGIC;
SC : out STD_LOGIC;
SD : out STD_LOGIC;
SE : out STD_LOGIC;
SF : out STD_LOGIC;
SG : out STD_LOGIC;
SH : out STD_LOGIC
);
end BCD;
--}} End of automatically maintained section
architecture BCD of BCD is
begin
process(A,B,C)--[poner las entradas]
begin
if (A='0' and B='0' AND C='0' )
then SA <='1';
elsIF (A='0' and B='0' AND C='1' )
THEN SB <='1';
elsIF (A='0' and B='1' AND C='0' )
THEN SB <='1';
elsIF (A='0' and B='1' AND C='1' )
THEN SB <='1';
elsIF (A='1' and B='0' AND C='0' )
THEN SB <='1';
elsIF (A='1' and B='0' AND C='1' )
THEN SB <='1';
elsIF (A='1' and B='1' AND C='0' )
THEN SB <='1';
ELSE SH <='1';
end if;
end process;
-- enter your statements here --

end BCD;

CAPTURA DE PANTALLA DEL PROGRAMA SUMA CON ACARREO

Você também pode gostar