Design of digital bus station system based on ARM7 and CPLD

Publisher:RadiantSoulLatest update time:2010-12-31 Source: 维库Keywords:CPLD  ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: A digital bus station system based on ARM7 and CPLD architecture is proposed. The system communicates with the bus control center in real time through the GPRS module, uses CA authentication to ensure the security of communication, and uses two SRAMs to form a high-speed cache with "ping-pong logic" to ensure the continuity of display data. It can realize the dynamic display of multiple line information in the same station, real-time vehicle arrival forecast, public information release, timely update of line information, and online system upgrade. It has the characteristics of good real-time performance, high security, and strong scalability.

In view of the shortcomings of existing printed bus stops, such as providing little information, being unable to provide vehicle arrival forecasts, and being troublesome to add or modify route information, this paper proposes a new digital bus stop system. The system is based on ARM7 and CPLD architecture, communicates with the bus control center via GPRS, and uses CA authentication to ensure the security of communication. It can realize real-time vehicle arrival forecasts, release public information (such as weather forecasts, important news, traffic conditions, emergency information), timely update of route information, and online system upgrades. It has the characteristics of good real-time performance, high security, and strong scalability, which helps to comprehensively improve the information service level of urban bus stops.

1 Overall structure and working principle of digital bus stop system

The system is divided into four parts: control center, kiosk terminal communication module, kiosk terminal control module, and kiosk terminal display module. The overall structure diagram is shown in Figure 1. The composition and working principle of each part are introduced as follows:

(1) Control center: responsible for monitoring the operation of buses in the city or a certain area, including information collection, information processing, real-time bus dispatch, platform display control and other functions. The control center establishes wireless communication with each kiosk terminal through GPRS to achieve relevant control of the kiosk terminal. In addition, the control center also updates the vehicle arrival time forecast in real time based on the GPS installed on the bus, combined with the vehicle speed and road condition information.

(2) Kiosk terminal control module: It consists of the core chip ARM and its peripheral devices. It receives the information frame sent by the control center through the GPRS module, executes the control command issued by the control center, and completes the font library search according to the display information sent by the control center, and writes into the high-speed data cache composed of two SRAMs. The two SRAMs use "ping-pong logic", that is, at a certain moment, the ARM chip writes display data to one SRAM, and the other is read by the CPLD at this time. The two are switched in turn to ensure the high speed of data and the continuity of display. To ensure the security of the system, each kiosk terminal has a key. This key is written when the device is initialized. The external interface cannot access this key information. ARM completes the decryption of the received information frame based on this key. If an information frame that cannot be verified is encountered, the system considers that the information frame has been tampered with and discards it. In addition, since each kiosk terminal needs to work continuously for a long time, in order to prevent the temperature from being too high and causing the system to malfunction or even cause a fire, each kiosk terminal is equipped with a heat dissipation device, including a temperature sensor and a cooling fan. ARM obtains the temperature inside the kiosk terminal through the temperature sensor. Once it finds that the temperature exceeds the set value, it immediately starts the cooling fan to ensure that the system can work for a long time.

(3) Kiosk terminal display module: It consists of CPLD, LED scanning drive circuit, and LED dot matrix display screen. CPLD reads data from the cache consisting of two SRAMs to complete the scanning drive process of the LED display screen. Its internal solidified digital logic generates screen display control signals, including serial data shift signals, data latch signals, row scanning signals, etc. The LED display screen row scanning circuit and column data circuit drive the LED display screen according to these signals.

System overall structure diagram

Figure 1 System overall structure diagram[page]

2 System Hardware Design

2.1 Kiosk terminal control module

The core chip ARM of the kiosk terminal control module is connected to the control center through the GPRS module, and completes the CA verification of the data frame (including control commands and display information) sent by the control center; it writes the Chinese character dot matrix information to be displayed into a high-speed data cache composed of two SRAMs using "ping-pong logic" to control the CPLD to accurately read the data in the cache. The GPRS module uses the BenQ M22 GPRS wireless module, which can realize automatic network connection and protocol processing without the support of a background computer. It uses the RS-232 serial port communication standard to communicate with ARM, with a baud rate of 57.6k. ARM uses the LPC2378 produced by NXP. The LPC2378 is an ARM7TDMI-S processor that can run at a working frequency of up to 72MHz. The chip has UART, hardware I2C, SPI and timer peripheral components [2]. Its rich on-chip and off-chip resources, fast responsiveness and high cost performance are very suitable for high-speed serial port communication and CA authentication. In addition, for safety reasons, ARM is also connected to a heat dissipation device, including a temperature sensor and a cooling fan. ARM monitors the temperature of the kiosk terminal in real time through the temperature sensor. Once the temperature exceeds the set value, the cooling fan is immediately started to ensure that the system can work uninterruptedly for a long time. The kiosk terminal control module also includes Flash, JTAG debugging port, etc.

2.2 Kiosk terminal display module

The kiosk terminal display module consists of CPLD, LED scanning drive circuit, and LED display dot matrix. The scanning drive circuit of the LED display is implemented by CPLD. CPLD reads the data in the cache, and its internal solidified digital logic generates screen display control signals, including serial data shift signals, data latch signals, line scanning signals, etc., to complete the scanning drive process of the LED display. The CPLD function is implemented by programming in the hardware description language VHDL, which can greatly shorten the development cycle, make the design flexible and easy to modify. At the same time, the high integration, high speed, high reliability, and short development cycle of CPLD greatly improve the circuit performance. Here, the CPLD uses the ALTERA MAXⅡ series EPM1270 chip, which has 116 I/O ports and 1270 logic units, and has high performance, low power consumption and other performance characteristics to meet the requirements.

3 System Software Design

3.1 CA Authentication

The control center and the kiosk terminal establish wireless communication through GPRS. In order to ensure the integrity of data during the communication process, this design uses CA message authentication based on the hmac-sha1 algorithm to ensure that the information is not illegally attacked or tampered with. Hmac-sha1 is a key-based message integrity verification method, and its security is based on the hash algorithm. It requires both parties to share a key, agree on an algorithm, and perform a hash operation on the message to form a fixed-length authentication code (MAC). The two parties to the communication determine the legitimacy of the message by verifying the authentication code. This algorithm is widely used for encryption, digital signatures, message verification, etc. It can effectively resist exhaustive attacks, prevent information frame data from being arbitrarily tampered with and subverted, and maximize the security of system operation.

The steps of CA authentication based on the hmac-sha1 algorithm are as follows:

Let K and N be the key and synchronization sequence number agreed upon by the control center and the kiosk terminal, respectively, B represents the size of the data block (in bits), and K0 is the key K of length B.

Sender

Step 1: Use the key K to find the corresponding length K0 of B.

Step 2: Use the hmac-sha1 algorithm to generate a message digest MAC code.

Step 3: N increases by 1 and updates the local N at the same time.

Step 4: Use DES digital signature technology to encrypt the message and message digest MAC code, and send them to the kiosk terminal.

Receiver

Step 5: First, decrypt the received data using the corresponding decryption algorithm, and then repeat the calculations in Step 1 and Step 2 to generate a MAC code. If it matches the received message digest MAC code, it indicates that the data is legal.

Step 6: If the received N is less than the locally stored N, it is a retransmission and can be synchronized or discarded. Otherwise, it means the data is fresh and legal. [page]

3.2 ARM Software Design

ARM is the core chip of the kiosk terminal. In order to ensure the speed and stability of the entire kiosk terminal system, its software design is based on the embedded real-time operating system μC/OS-Ⅱ[5]. This can make full use of the operating system's efficient task scheduling algorithm and make program development and expansion more convenient. Its task structure is shown in Figure 2.

ARM software overall structure diagram

Figure 2 ARM software overall structure diagram

After ARM is powered on or reset, the system is initialized first, including the initialization of the operating system and the initialization of hardware interrupts, timers, and communication interfaces. After the system is initialized, the following tasks are created in sequence:

Task_RS232Com: Serial port communication task, completes the communication with the GPRS module and receives the information frame sent by the control center;

Task_LEDControl: LED display control task, writes the data to be displayed (including route information and real-time vehicle arrival forecast, etc.) into the high-speed data cache composed of SRAM2 and SRAM3, and transmits the written address to CPLD to control CPLD to read the data in the cache;

Task_LineProcess: line information management task, saves the update of bus line information;

Task_TempProtect: Temperature protection task, which reads the temperature value provided by the temperature sensor regularly. Once it is found that the temperature exceeds the set value, the system immediately turns on the cooling fan to dissipate heat to ensure the normal operation of the system;

Task_update: system update task, complete system online upgrade;

3.4 CPLD Software Design

CPLD completes the scanning and driving process of the LED display screen by generating serial data shift signals, data latch signals, row scanning signals, etc. Its software design block diagram is shown in Figure 3, which mainly includes the following parts: (1) Clock generator: generates clock signals of various frequencies; (2) Read switching circuit: under the control of ARM, switches between two SRAMs to complete the reading of high-speed data cache; (3) Read address generator: enables CPLD to accurately address in the high-speed cache composed of two SRAMs; (4) Scan control circuit: generates corresponding scan control signals according to the data read in the cache, and sends them to the column data circuit and row scanning circuit through the LED drive circuit interface; (5) JTAG port: provides an interface for online debugging.

CPLD software design block diagram

Figure 3 CPLD software design block diagram

The digital bus shelter system based on ARM7 and CPLD proposed in this paper communicates with the control center in real time through the GPRS module and uses CA authentication to ensure the real-time and security of the system operation. It can effectively solve the many shortcomings of the existing bus shelters, such as the lack of information provided by the bus stop signs, the inability to provide vehicle arrival forecasts, and the trouble of adding routes or modifying route information. The real-time vehicle arrival forecast provided by the system enables passengers in the waiting area of ​​the bus station to view the route information and arrival time of all waiting vehicles through the LED display screen of the shelter terminal, so that they can know what is going on, which can effectively alleviate the anxiety of waiting passengers waiting for the bus; at the same time, public information release can provide weather forecasts, traffic conditions and other important information in a timely manner, bringing convenience to passengers' travel. In addition, the system has an online upgrade function, which is convenient for future system updates and maintenance. In short, the digital bus shelter system helps to comprehensively improve the information service level of urban bus stations and has broad application prospects in the construction of future urban intelligent transportation.

Keywords:CPLD  ARM7 Reference address:Design of digital bus station system based on ARM7 and CPLD

Previous article:Stability Design of FPGA/CPLD State Machine
Next article:Design of USB interface based on DSP platform

Recommended ReadingLatest update time:2024-11-16 20:27

Implementation of Remote Control Programming of XC9500 Series CPLD
Abstract: This paper briefly introduces the XC9500 series CPLD devices and their In-System Programming (ISP) performance. Then it describes the implementation method of remote control programming of XC9500 series CPLD devices, and focuses on the software and hardware design of implementing embedded ISP using a micro
[Embedded]
Implementation of Remote Control Programming of XC9500 Series CPLD
Design of a Programmable Wide-Band High-Precision CCD Signal Generator Based on CPLD
1 Introduction CCD (Charge Coupled Devices) is a new type of semiconductor device developed in the early 1970s. Currently, CCD is used as a photoelectric sensor . Due to its advantages of small size, light weight, low power consumption, low operating voltage and anti-burning, as well as its charac
[Medical Electronics]
Design of a Programmable Wide-Band High-Precision CCD Signal Generator Based on CPLD
Application of CPLD in signal filtering and anti-interference
1 Filtering and Anti-interference Overview The input signal of the single-chip microcomputer application system often contains various noises and interferences, which come from the measured signal source, sensors, external interference sources, etc. In order to improve the measurement and control accuracy, the
[Embedded]
Application of CPLD in signal filtering and anti-interference
Design of human-like arm prosthetic control system using microcontroller and CPLD devices
Prostheses are substitutes for missing limbs of the human body to compensate for the shape and function of the missing limbs. This article designs a control system for a human-like arm-shaped prosthesis for the situation of losing the entire arm. Users can compensate for some missing functions, achieve self-care and e
[Microcontroller]
Design of human-like arm prosthetic control system using microcontroller and CPLD devices
Cortex-M3 VS ARM7
To use a low-cost 32-bit processor, developers face two choices: processors based on the Cortex-M3 core or the ARM7TDMI core. How to make a choice? What are the selection criteria? This article mainly introduces some characteristics of the ARM Cortex-M3 core microcontroller that are different from the ARM7 to help you
[Microcontroller]
MCU and CPLD interaction transformer system test has a good way
1 Introduction BX signal transformer , BG track transformer and ZG silicon rectifier are the front end of railway signal electrical equipment. Their working stability and accuracy are directly related to driving safety. Reliable detection of transformer is the first step to strictly control quality. For manufacturers
[Power Management]
MCU and CPLD interaction transformer system test has a good way
Design of remote robot control system based on ARM7
1 Overall design The remote robot control system consists of three parts: robot intelligent control module, robot monitoring module, and remote control module. Its working process is that the remote PC sends control commands to the robot controller, the processor receives the command from the remote end and send
[Microcontroller]
Automatic line patrol wheeled robot control system based on CPLD and AT89S52
   1 Introduction   Wheeled mobile robot is an important part of the robot research field. It integrates mechanics, electronics, detection technology and intelligent control. Among various mobile mechanisms, wheeled mobile mechanism is the most common. The reason why wheeled mobile mechanism is widely used is mainly
[Microcontroller]
Automatic line patrol wheeled robot control system based on CPLD and AT89S52
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号