Skip to main content

Maquina Moore Ejemplo: Ascensor

entity behavioral is port (
Planta_Baja : in std_logic;
Piso_Uno    : in std_logic;
Piso_Dos    : in std_logic;
salidas     : out std_logic_vector(1 downto 0) -- para polarizar el motor, tierra y voltaje por eso se require los dos bits

);
end behavioral

architecture AscMoore of behavioral is
type ascEstados is (PB, 1, 2);
signal Estados, prox_estados AscEstados;
begin
Process(init, PB_UP, P1_UP, P1_DOwN, P2, P2_DOWN)
signal estado, prox_edo : AscMoore;
begin
Process (estado,Planta_Baja, Planta_Un, Planta_Dos)
begin
case estado is
when init =>
if Planta_Baja='1' then
Prox_estado <= PB_UP
else
Prox_estado <=init;
endif;

when PB_UP => prox_estado <= P1_UP;

when P1_UP =>
if Piso_Uno='1' then
Prox_estado <= P1_UP;
else
Prox_estado <= P1_DOWN;
endif;
when P1_DOWN => Prox_estado <= init;



Process (estado)
begin
case estado is
when init => salidas <= "00";
when PB_UP => salidas <= "10";
when P1_UP => salidas <= "10";
when P1_DOWN => salidas <= "01";
when P2 => salidas <= "00";
when P2_DOWN => salidas <= "01";
end case;
end Process;
end architecture;

Comments

Popular posts from this blog

ALU ( arithmetic logic unit ) vhdl codigo

library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity operaciones is port( clk: in std_logic; switch1,switch2,push1,push2: inout std_logic; display: out std_logic_vector (7 downto 0):="00000000"; leds, anodos: out std_logic_vector (3 downto 0):="0000"); end operaciones; architecture Behavioral of operaciones is signal barrido,bleds,modo: std_logic_vector (1 downto 0):="00"; signal break,break2: std_logic :='0'; signal mode,anod: std_logic_vector (3 downto 0):="0000"; signal contador: std_logic_vector (9 downto 0):="0000000000"; signal disp,disp1,disp2,disp3: std_logic_vector (7 downto 0):="00000010"; signal x,y,z,w: std_logic_vector (3 downto 0):="0000"; signal x2,y2,z2,w2: std_logic_vector (3 downto 0):="0000"; signal matr: std_logic_vector (3 downto 0):="0000"; signal dispa,disp1a,disp2a,disp3...

sumador con carry a bcd atmel89s51

ini: mov P1,0aah Inicio: mov P1, #095h mov a, P1 mov b, P1 swap a anl b, #00001111b anl a, #00001111b c0: cjne a, #00, c1 mov r0, a mov a, b jmp fin c1: cjne a, #01, c2 mov r0, a mov a, b jmp fin c2: cjne a, #02, c3 mov r0, a mov a, b jmp fin c3: cjne a, #03, c4 mov r0, a mov a, b jmp fin c4: cjne a, #04, c5 mov r0, a mov a, b jmp fin c5: cjne a, #05, c6 mov r0, a mov a, b jmp fin c6: cjne a, #06, c7 mov r0, a mov a, b jmp fin c7: cjne a, #07, c8 mov r0, a mov a, b jmp fin c8: cjne a, #08, c9 mov r0, a mov a, b jmp fin c9: cjne a, #09, c0 mov r0, a mov a, b jmp fin jmp Inicio fin: mov b, #00 cc0: cjne a, #00, cc1 add a, r0 jmp fin2 cc1: cjne a, #01, cc2 add a, r0 jmp fin2 cc2: cjne a, #02, cc3 add a, r0 jmp fin2 cc3: cjne a, #03, cc4 add a, r0 jmp fin2 cc4: cjne a, #04, cc5 add a, r0 jmp fin2 cc5: cjne a, #05, cc6 add a, r0 jmp fi...

Adobe Flash Player ( Standalone ) Installer

para descargar los instaladores Offline de Adobe Flash Player nos debemos dirigir a la siguiente direccion: https://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html donde podemos encontrar para Internet Explorer, serian los dos primeros, si queremos que sean para Chrome, Firefox, etc... seleccionamos el Adobe Flash Player Plug in. Internet Explorer EXE Firefox NPAPI EXE Opera, Chrome PPAPI EXE