Académique Documents
Professionnel Documents
Culture Documents
CURSO:
Electrnica Digital
DOCENTE:
Ing. Juan Carlos Cuadros
TEMA:
AREQUIPA- PER
2012
CONTADOR DE RIZO MDULO 10
Th
CLK
Q
Ts: Tiempo de establecimiento
tPLH
Th : Tiempo de retencin
tPLH : Tiempo de retraso de propagacin
En Xilinx:
CLK
Q
PROGRAMACIN:
Para realizar la programacin usamos de gua la teora, y pudimos ver que para
realizar un contador de rizo mdulo 10 necesitamos 4 FlipFlops, es asi que
empezamos a realizar la programacin, empezando con CLK que vendr a ser
la seal de reloj para nuestro primer FlipFlop con salida Q0; la cual ser la
seal de reloj para el siguiente FlipFlop y asi sucesivamente.
Para aplicar el reseteo al contador usamos primero un if en el cuarto FlipFlop
el que nos indicaba que si J=0 y K=0 su salida(Q3) sea cero y as todas las
salidas sean cero, ya que si al igual que a los otros flipflops primero ponamos
la condicin del flanco de bajada, Q3 no hubiera cambiado a cero con J=0 y
K=0 como lo habran hecho los dems flipflops , luego de esto recin se puso
CLK=Rel
oj
J=0
K=
J=1
K=
Q0=not
Q0
Q0=0
Q
0
Q0=Relo
j
J=0
K=
J=1
K=
Q1=not
Q1
Q1=0
Q
1
Q3 Q2 Q1
Q0
Q1=Relo
j
J=0
K=
J=1
K=
Q2=not
Q2
Q2=0
Q
2
J=0
K=
Q3=0
SI
N
O
Q2=Relo
j
Q
3
J=1
K=
Q3=not
Q3
Xilinx:
entity frecuenciadigital1 is
Port ( J : in STD_LOGIC;
K : in STD_LOGIC;
CLK : in STD_LOGIC;
Q0 : inout STD_LOGIC;
Q1 : inout STD_LOGIC;
Q2 : inout STD_LOGIC;
Q3 : out STD_LOGIC);
end frecuenciadigital1;
architecture Behavioral of frecuenciadigital1 is
signal
signal
signal
signal
temp: STD_LOGIC;
ad: STD_LOGIC;
ef: STD_LOGIC;
gh: STD_LOGIC;
begin
y:process(J,K,CLK,temp)
begin
if( CLK'EVENT AND CLK='0')then
if (J='0' and K='0') then
temp <= '0';
elsif (J='1' and K='1') then
temp <= not temp;
end if;
end if;
Q0 <= temp;
end process y;
x:process(J,K,Q0,ad)
begin
if (Q0'EVENT AND Q0='0') then
if (J='0' and K='0') then
ad <= '0';
elsif (J='1' and K='1') then
ad <= not ad;
end if;
end if;
Q1 <= ad;
end process x;
w:process(J,K,Q1,ef)
begin
if(Q1'EVENT AND Q1='0') then
if (J='0' and K='0') then
ef <= '0';
elsif (J='1' and K='1') then
ef <= not ef;
end if;
end if;
Q2 <= ef;
end process w;
z:process(J,K,Q2,gh)
begin
if (J='0' and K='0') then
gh <= '0';
elsif(Q2'EVENT AND Q2='0') then
if (J='1' and K='1') then
gh <= not gh;
end if;
end if;
Q3 <= gh;
end process z;
end Behavioral;
OJO: Como se sabe el Xilinx no reconoce el valor inicial, por lo que nosotros le
asignamos a las variables (Q3, Q2, Q1, Q0) como valor inicial cero, a partir de
la condicin de J=0 y K=0, dicha condicin fue aprovechada ms adelante
para aplicar el reseteo a nuestro contador.