Main content:
Design a washing machine controller, which requires the washing machine to have three states: forward, reverse, and pause. Set the working time of the washing machine, and make the washing machine complete within working hours: start at a timed forward rotation for 20 seconds pause for 10 seconds reverse for 20 seconds pause for 10 seconds and return to "forward rotation for 20 seconds pause for 10 seconds ......When the timer arrives, it will stop and sound at the same time.
Basic requirements: 1. Design an electronic timer to control the washing machine as follows** Timing start Forward rotation for 20 seconds Pause for 10 seconds Reverse for 20 seconds Pause for 10 seconds The timing has not arrived and return to "Forward rotation for 20 seconds Pause for 10 seconds ......Stop when the time comes;
2. If it arrives at the right time, it will stop and send out an audio signal;
3. Use two digital tubes to display the preset time (minutes) of washing, and display the washing process according to the countdown mode until the time is stopped; The washing process starts with a "start" signal;
4. Three LED lights indicate three states: "forward rotation", "reverse rotation" and "pause".
First, the overall design idea
, Rationale
The design of the washing machine controller is mainly the design of the timer. It consists of an FPGA and peripheral circuits that form the electrical control part. The FPGA receives the control commands of the keyboard, controls the water intake, drainage, water level and working status of the washing machine, and controls the display of the working status and sets the DC motor speed, forward and reverse rotation control, brake control, start-stop control and motion status control. The programming of the chip is designed using modular VHDL (Hardware Description Language), and the design is divided into three layers of implementation, and the top layer realizes the function of the entire chip. The top and middle layers are mostly implemented by VHDL's component instantiation statements. The middle layer is composed of brushless DC motor control, operation mode selection, washing mode selection, timer, display control, keyboard scanning, water level control, speed setting, forward and reverse control, start-stop control and other modules for the DC motor control board, which call the underlying modules respectively.
Edit.
Edit.
use ieee.std_logic_1164.all;entity encode is port( bcd : in std_logic_vector(3 downto o); a,b,c,d,e,f,g: out std_logic );end encode;architecture rtl of encode issignal temp:std_logic_vector(6 downto 0);beginThe information is based on this