Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TRABAJO COLABORATIVO No 1
SISTEMAS DIGITALES SECUENCIALES
Grupo: 90178-30
Tutor:
RUIZ CARLOS EMEL.
INGENIERIA EN ELECTRONICA
UNIVERSIDAD NACIONAL ABIERTA Y A DISTANCIA UNADOCTUBRE 2013
INTRODUCCIN
CONTENIDO
Portada
Introduccin
Objetivos
DESARROLLO DE LA ACTIVIDAD
Conclusiones
Anexos
Bibliogrficas.
OBJETIVOS
Entradas
Sensores
Lgica de
control
Interface de
potencia
Temporizador
Salidas
Motores
SW
SW1
SW2
555
Lgica de
control
QN
Interface de
potencia
T
0
0
1
1
0
0
1
1
QN
0
1
0
1
0
1
0
1
QN+1
0
0
0
1
1
0
1
1
J
0
0
0
0
1
0
1
0
K
0
1
0
0
0
1
0
0
salida con un nivel alto por espacio de tres segundos. Una vez termina la
temporizacin se coloca en nivel bajo la salida del temporizador lo que
provoca un RESET en el Flip-Flop que conmuta el estado pasando Q=0,
que ocasiona que el motor recupere el giro en el sentido original.
Calculo del periodo de oscilacin del 555 de 3 seg.
A partir de las especificaciones se emplea la siguiente formula, para lo cual
se considera un condensador C=10uF.
Fase 3: Verificacin
CDIGO:
--------------------------------------------- Carrito Seguidor de Lneas-------------Evasor de obstculos-------------------------------------------------------library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.NUMERIC_STD.ALL;
entitycomplis
Port ( s_fcc, s_fcd, s_fci, reset, ss, c, i, d : in STD_LOGIC;
clk: inout STD_LOGIC;
e1, e2, e3, e4 : out STD_LOGIC);
endcompl;
architectureBehavioral of complis
constant N : integer := 28; -- tamao de bits para bajar de frecuencia
signal a: std_logic;
signalq_reg, q_reg1, q_reg2, q_next, q_next1, q_next2 : unsigned (N-1
downto 0);
signalsel : std_logic_vector (1 downto 0);
begin
process (s_fcc, s_fcd, s_fci,c,d,i,clk,ss,reset)
begin
if (reset = '0') then
---- GIRA ADELANTE
e1<= '0';
e2<= '1';
e3<= '0';
e4<= '1';
if (ss= '1') then
if (s_fcc = '1' ) then
a<= '1';
if(clk'event and clk = '1' ) then
q_reg <= q_next;
endif;
q_next<= q_reg + 1;
sel<= std_logic_vector(q_reg(N-1 downto N-2));
case selis
when "00"=>
---- retrocede
e1<= '1';
e2<= '0';
e3<= '1';
e4<= '0';
when "01" =>
--- gira derecha
e1<= '0';
e2<= '1';
e3<= '1';
e4<= '0';
whenothers =>
---- GIRA ADELANTE
e1<= '0';
e2<= '1';
e3<= '0';
e4<= '1';
end case;
endif;
if (s_fcd = '1') then
a<= '1';
if(clk'event and clk = '1' ) then
whenothers =>
e1<= '0';
e2<= '1';
e3<= '0';
e4<= '1';
sel<="00";
a <='0';
end case;
endif;
if (s_fci = '1') then
a<= '1';
if(clk'event and clk = '1' and a = '1') then
q_reg2 <= q_next2;
endif;
q_next2 <= q_reg2 + 1;
e4<= '1';
q_next2 <= q_reg2;
whenothers =>
e1<= '0';
e2<= '1';
e3<= '0';
e4<= '1';
sel<="00";
a <='0';
end case;
endif;
else
if (c = '1' and d = '0' and i= '0') then
---- Seguir ADELANTE
e1<= '0';
e2<= '1';
e3<= '0';
e4<= '1';
endif;
if (c = '1' and d = '1' and i= '0') then
--- GIRAR DERECHA
e1<= '1';
e2<= '0';
e3<= '0';
e4<= '1';
endif;
if (c = '0' and d = '1' and i= '0') then
--- GIRAR DERECHA
e1<= '1';
e2<= '0';
e3<= '0';
e4<= '1';
endif;
if (c = '0' and d = '0' and i= '1') then
--- gira izquierda
e1<= '0';
e2<= '1';
e3<= '1';
e4<= '0';
endif;
if (c = '1' and d = '0' and i= '1') then
--- gira izquierda
e1<= '0';
e2<= '1';
e3<= '1';
e4<= '0';
endif;
endif;
elsif (reset = '1') then
e1<= '1';
e2<= '1';
e3<= '1';
e4<= '1';
endif;
endprocess;
endBehavior
CONCLUSIONES
ANEXOS
BIBLIOGRAFIA