By using VHDL language to design digital systems, most of the design work can be completed on the computer, thus shortening the system development time and improving work efficiency. The following introduces a scheme for designing a traffic light controller based on VHDL, and gives the source program and simulation results.
1 System Functions and Requirements
The traffic light controller controls the traffic at the intersection of two main roads. There are many vehicles at the intersection. The straight-ahead signal and the left-turn signal are displayed separately. The travel time of the two main roads a and b is equal. The green light indicating straight-ahead is on for 30 seconds, and the green light indicating left-turn is on for 12 seconds. When the green light turns to red, the yellow light is on for 3 seconds so that the vehicle can stop within the stop line. The corresponding yellow light is also on for the last 3 seconds of the red light signal to remind the driver to prepare to start. Sensors are equipped at the intersection of the two main roads to detect whether there are vehicles passing. When there are vehicles on both main roads, the main road a is automatically in the state of green light and main road b is red light, and then the traffic is switched in turn. When there are no vehicles on main road a, the main road b is automatically in the state of green light and main road a is red light; vice versa, to improve traffic efficiency.
2 Design and Simulation
According to the functions and requirements of the traffic light controller, its overall circuit is divided into two modules: frequency divider and signal controller. The frequency of the external pulse oscillator is selected as 32 768 kHz, and the frequency divider is used to divide the signal into 1 Hz signals. The 1 Hz signal is used as the counting pulse of the signal controller. The frequency divider and signal controller modules of the traffic light controller are designed with VHDL. On the QuartusⅡ development platform, the VHDL programs of the two modules are compiled separately, and then the schematic input method is used to form the overall block diagram shown in Figure 1.
The VHDL program of the signal controller is as follows:
[page]
Among them, Sa, Sb are the signals of the sensors at the intersections a and b respectively; aR, aY, aG, aLR, aLY, aLG represent the signals for controlling the straight red light, yellow light, green light, and left turn red light, yellow light, and green light of the main road a respectively; bR, bY, bG, bLR, bLY, bLG represent the signals for controlling the straight red light, yellow light, green light, and left turn red light, yellow light, and green light of the main road b respectively; aPR, aPG, bPR, bPG are pedestrian signals, and enl is the enable signal. When enl=0, the red lights at the intersections a and b are on at the same time, which is convenient for handling special situations. The program is compiled and simulated using QuartusⅡ, and the simulation waveform obtained is shown in Figure 2. After program download and experimental verification, the system function meets the requirements.
The traffic light controller is designed based on VHDL, which has fewer peripheral circuits, low power consumption, high reliability, easy modification of system functions and high design efficiency.
Previous article:Cost-effective AC induction motor slip control optimization solution
Next article:Embedded code stream analysis design based on FPGA and RTOS
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- #idlemarket#Selling GigaDevice GD32 E231C-START development board
- Goodbye 2019 ~ Hello 2020 - Looking back at 2019 and planning for 2020
- 【Home Smart Dashboard】Project Submission
- FPGA design ideas and techniques: data interface synchronization
- Together: About the GD32L233 development board unpacking test
- It is said that uC/OS system is free. Is it true?
- Last two days! Free review - Pingtouge scenario-based Bluetooth Mesh gateway development kit
- EEWORLD University Hall----Research and development of high-speed motors
- How to choose between different chips in TI's Sub-1GHz product line?
- What are the benefits of using an op amp to drive a MOS tube? Who knows? Tell me