Sei sulla pagina 1di 8

INFORME#7

CONTADORES

ETN-601

1. OBJETIVO GENERAL El objetivo principal de este laboratorio es el de aplicar la teora y mtodo de sntesis de los sistemas secuenciales para la realizacin de contadores sncronos y asncronos, as como la aplicacin de los circuitos que tienen integrada esta operacin. 2. OBJETIVOS ESPECIFICOS Ms especficamente los objetivos del laboratorio son: Aplicar el mtodo de sntesis de sistemas secuenciales para implementar contadores asncronos. Sintetizar circuitos que puedan contar en diferentes cdigos. Realizar sistemas de aplicacin utilizando circuitos integrados de mayor complejidad. Implementar el VHDL para la implementacin de los circuitos en una tarjeta ALTERA. 3. COMPONENTES UTILIZADOS Se usaron los siguientes componentes para la realizacin de este laboratorio: 3 Protoboard 1 Dip Switch 8 canales Circuitos integrados TTL como ser: 2 -74LS00 (NAND 2 entradas) 2 -74LS32 (OR 2 entradas) 2 -74LS08 (AND 2 entradas) 2 -74LS161 (CONTADOR) 2- 74LS48 (DECOD 4 a 7 segmentos) 2 -74LS85 (Comparador de 4 bits) 2 - 74LS76 (FF-JK) 2 Displays 7-segmentos (Ctodo comn) Leds de diversos colores Fototransistor Resistencias (varias) 4. DISEO E IMPLEMENTACIN
a.1) APLICACIN Y DISEO DE CONTADORES SINCRONOS Disee con FF-JK mediante su ecuacin fundamental un contador que genere el cdigo Aiken.
LIMBERG OLIVER MARDONEZ CORTEZ

INFORME#7

CONTADORES

ETN-601

(CODIGO AIKEN 2421) Estado presente Estado siguiente y4 0 1 0 1 0 1 0 1 0 1 Y1 0 0 0 0 1 1 1 1 1 0 Y2 0 0 0 1 0 1 1 1 1 0 Y3 0 1 1 0 1 0 0 1 1 0 Y4 1 0 1 0 1 0 1 0 1 0

BN
0 1 2 3 4 11 12 13 14 15

#
0 1 2 3 4 5 6 7 8 9

y1 0 0 0 0 0 1 1 1 1 1

y2 0 0 0 0 1 0 1 1 1 1

y3 0 0 1 1 0 1 0 0 1 1

Tabla de excitacin previa J-K Qn Qn+1 0 0 1 1 0 1 0 1 J K 0 1 X X X X 1 0

Sintetizamos el circuito con Flip flop JK

J1K1 J2K2 J3K3 J4K4


0 1 2 3 4 11 12 13 14 15

0 O O O 1 X X X X X

X X X X X 0 0 0 0 1

0 0 0 1 X 1 X X X X

X X X X 1 X 0 0 0 1

0 1 X X 1 X 0 1 X X

X X 0 1 X 1 X X 0 1

1 X 1 X 1 X 1 X 1 X

X 1 X 1 X 1 X 1 X 1

D I AGR AM AS D E K AR N AUGH
J1 0
0

J2 0 0
0 1

J3 0 1
0 1

J4 1 X
0 1

y4 y 3 1y 2 y

y4 y 3 1y 2 y

y4 y 3 1y 2 y

LIMBERG OLIVER MARDONEZ CORTEZ

y4 y 3 1y 2 y

0
1

0
3

0
2 7

1
3

0
2 7

X
3

X
2 7

X
3

1
2 7

1
4

X
5

X X
13

X
6

X
4

X
5

X X
13

X
6

1
4

X
5

X X
13

X
6

1
4

X
5

X X
13

X
6

X
12

X
X
8 9

X
15 14

X
12

X
X
8 9

X
15 14

0
12

1
X
8 9

X
15 14

1
12

X
X
8 9

1
15 14

X
11

X
10

1
11

X
10

X
11

X
10

X
11

X
10

J1=y2

J2=y3y4

J3=y4+y1y2

J4=1

INFORME#7
K1 X
0

CONTADORES
K2 X
2 0

ETN-601
K3 K4 X
2 0

y4 y 3 1y 2 y

y4 y 3 1y 2 y

y4 y 3 1y 2 y

Sintetizando:

J CLK

2 74LS08

U2:B
4 6 5 74LS08

J CLK

9 6 12

9 8 10 74LS08

5 1 74LS32 16

J CLK

U2:C

4 6 4 Q 15

VCC

J CLK

9 6

U3:B(CLK)
8

74LS76

LIMBERG OLIVER MARDONEZ CORTEZ

y4 y 3 1y 2 y

X
1

X
3

X
7

X
1

X
3

X
2 7

X
0

X
1

1
3

0
7

1
1

1
3

X
2 7

X
4

X
5

X 1
13

X
6

1
4

X
5

X 1
13

X
6

X
4

X
5

X 1
13

X
6

X
4

X
5

X 1
13

X
6

0
12

0
X
8 9

0
15 14

0
12

0
X
8 9

0
15 14

X
12

X
X
8 9

0
15 14

X
12

1
X
8 9

X
15 14

0
11

X
10

X
11

X
10

1
11

X
10

1
11

X
10

K1=y2(y3y4)

K2=y3y4+y1y2

K3=y3y4

K4=1

U1:A
Q 15

U2:A
1 3

?
1

1 16

14

RESET

74LS76

U1:B
Q 11

10

74LS76

U4:A
1 3 2 74LS32

U4:B

U3:A

14

74LS76

U3:B
Q 11

CLOCK

12

10

PRESET

INFORME#7

CONTADORES

ETN-601

c.1) APLICACIN DE CONTADORES Disee un contador digital de revoluciones (0 a 99) de un motor DC, que cuando S=0 se carga el valor de revoluciones en el que se detendr el motor y cuando S=1 debera girar el motor hasta detenerse automticamente. El conteo de revoluciones debe visualizarse en displays de 7 segmentos. Diagramando el proceso de conteo:

Seal del motor (revoluciones del motor) Cuando llegue a 9

Seal de inhibicin del motor 0 1

CONTADOR DE UNIDADES (0 - 9) 9 9

CONTADOR DE DECENAS (0 - 9)

MUX 2A1 MUX 2A1

CU=B

0 1

CD=A

COMPARADOR

COMPARADOR

S S0 99 revoluciones S1 AB revoluciones

DECODIFICADOR 4A7

DECOFICADOR 4A7

Segn el enunciado cuando S=0 => AB revoluciones, pero esto se corrige con un inversor o asumiendo la lgica negativa.

Sintetizando el circuito con circuitos integrados:

LIMBERG OLIVER MARDONEZ CORTEZ

INFORME#7

UNIDAES
3 4 5 6 D0 D1 D2 D3 Q0 Q1 Q2 Q3 RCO 14 13 12 11 15

7 10 2 9 1

ENP ENT CLK LOAD MR

U5:A
74LS08

U7:A(A) 74LS163

U7:A U3:A
3 2 74LS32 74LS00

LIMBERG OLIVER MARDONEZ CORTEZ


3
3 1

M OT OR
DECENAS
3 4 5 6 D0 D1 D2 D3 Q0 Q1 Q2 Q3 RCO 14 13 12 11 15

COMP. UNIT.

U5:C
10 1Y 74LS163 2Y 4 6 5 74LS00 3Y 4Y 9 9 12 7 4

MUX U3:B

7 10 2 9 1 ENP ENT CLK LOAD MR 7 6 5

QA<B QA=B QA>B 74LS85

A0 A1 A2 A3 B0 B1 B2 B3 A<B A=B A>B

10 12 13 15 9 11 14 1 2 3 4

74LS08

1A 1B 2A 2B 3A 3B 4A 4B

2 3 5 6 11 10 14 13

U5:B
4 5

CONTADORES

A/B E 6 74LS157 74LS08

1 15

DECOD

DECOD

S-0

=> 99 revoluciones

COMP. DEC.

7 1 2 6 4 5 3

A B C D BI/RBO RBI LT 74LS48

QA QB QC QD QE QF QG

13 12 11 10 9 15 14

7 1 2 6 4 5 3

A B C D BI/RBO RBI LT 74LS48

QA QB QC QD QE QF QG

13 12 11 10 9 15 14

S-1 S
7 6 5 QA<B QA=B QA>B 74LS85

=> AB revoluciones

A0 A1 A2 A3 B0 B1 B2 B3 A<B A=B A>B

10 12 13 15 9 11 14 1 2 3 4

stop decenas (A)

1 0 1 0

stop unidades (B)

0 0 0 1

ETN-601

INFORME#7

CONTADORES

ETN-601

5. RESULTADOS Y CONCLUSIONES Pto_a1) APLICACIN Y DISEO DE CONTADORES SINCRONOS CONTADOR AIKEN El circuito implementado en el laboratorio cumple con su funcin correctamente, cuenta en el cdigo de forma ascendente. Pto_c1) APLICACIN DE CONTADORES CONTADOR DE REVOLUCIONES DEL MOTOR El contador cumple correctamente su funcin, cuenta 99 vueltas y AB vueltas. Para el laboratorio se utilizo un motor electromagntico de 6v, se logro perfectamente el conteo de las vueltas y la seal de inhibicin del motor. Pero no se logro detener el motor, aunque para ello habra que implementar otro circuito que proporcione una tensin contraria a la de giro momentneamente para detener el motor en un valor fijo de revoluciones.

6. VHDL
Pto_a1) APLICACIN Y DISEO DE CONTADORES SINCRONOS CONTADOR AIKEN library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity sec_FF is port(clock,reset : in std_logic; A :out std_logic_vector(3 downto 0)); end sec_FF; architecture BODI of sec_FF is signal count :std_logic_vector(3 downto 0); begin process(clock,reset) begin if reset='1' then count<="0000"; elsif Rising_edge(clock) then if count="1001" then count<="0000"; else count<=count+1; end if; end if; end process; with count select A <= "0000" when "0000", "0001" when "0001", "0010" when "0010", "0011" when "0011",
LIMBERG OLIVER MARDONEZ CORTEZ

INFORME#7

CONTADORES "0100" when "0100", "1011" when "0101", "1100" when "0110", "1101" when "0111", "1110" when "1000", "1111" when "1001", "1000" when others;

ETN-601

end BODI;

Pto_c1) APLICACIN DE CONTADORES


CONTADOR DE REVOLUCIONES library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity sec_FF is port(clock,reset,S : in std_logic; cargaU,cargaD:in std_logic_vector(3 downto 0); Ad,Au:out std_logic_vector(6 downto 0)); end sec_FF; architecture BODI of sec_FF is signal countU,countD :std_logic_vector(3 downto 0); begin process(clock,reset) begin if reset='1' then countU<="0000";countD<="0000"; elsif (clock'event and clock='1') then if S='1' then if (countU="1001"and countD="1001") then countU<="1001";CountD<="1001"; else if CountU="1001" then CountD<=countD+1;CountU<="0000"; else CountU<=CountU+1; end if; end if; else if (countU=cargaU and countD=cargaD) then countU<=cargaU; countD<=cargaD; else if CountU="1001" then CountD<=CountD+1;CountU<="0000"; else CountU<=CountU+1; end if; end if; end if; end if; end process; --para el display with countU select Au <= "1111110" when "0000",--0 "0110000" when "0001",--1

LIMBERG OLIVER MARDONEZ CORTEZ

INFORME#7

CONTADORES
"1101101" when "0010",--2 "1111001" when "0011",--3 "0110011" when "0100",--4 "1011011" when "0101",--5 "1011111" when "0110",--6 "1110000" when "0111",--7 "1111111" when "1000",--8 "1111011" when "1001",--9 "0000000" when others;

ETN-601

with countD select AD <= "1111110" when "0000",--0 "0110000" when "0001",--1 "1101101" when "0010",--2 "1111001" when "0011",--3 "0110011" when "0100",--4 "1011011" when "0101",--5 "1011111" when "0110",--6 "1110000" when "0111",--7 "1111111" when "1000",--8 "1111011" when "1001",--9 "0000000" when others; end BODI;

LIMBERG OLIVER MARDONEZ CORTEZ

Potrebbero piacerti anche