Design of large capacity Chinese character fire floor display based on CAN bus

Publisher:大头玩家Latest update time:2010-11-25 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction

Fire Floor Display As an important part of the automatic fire alarm system, it is a digital fire alarm display device installed on the floor or independent fire zone. It is connected to the fire alarm controller through the alarm bus, and processes and displays the data on the alarm bus. The built-in single-chip microcomputer in the fire floor display judges, analyzes and processes the received bus information, converts the alarm detector address number into the corresponding fire location information (such as room number and room type, etc.), and displays it together with the fire type through the LCD, and sends out sound and light alarm signals to notify the personnel in the fire area.

At present, most of the existing fire floor displays in China use 51 single-chip microcomputers as MCU. Due to the limitation of ROM addressing space, most fire floor displays can only display the floor number and address number of the fire alarm, and cannot use intuitive Chinese character information to prompt the specific fire alarm location with different situations. If the Chinese character information is distributed to each floor display through the bus, the huge communication volume will bring a heavy load to the fire alarm system bus, resulting in low efficiency of the entire fire alarm system and delaying the fire alarm reporting time. This paper proposes a large-capacity Chinese character fire floor display based on CAN bus , which solves the above problems well.

2. General functional description of fire alarm system

In the fire alarm control system, the central fire alarm controller communicates with each unit in real time through the CAN bus and completes various control and alarm functions. Units are a general term for equipment such as fire detectors, manual alarm buttons, input and output modules, and floor displays. They are system terminals that directly detect fire signals and report them to the controller through channels. At the same time, they receive linkage information (starting the fire extinguishing device controlled by the input and output modules), display information (floor displays display fire information), etc. forwarded by various channel controllers to the units. Channels are a general term for equipment such as loop modules, switching modules, and bus control panels. They are channels between control devices and terminals, and are relay devices composed of topological networks. The overall structure of the fire alarm control system and the position of floor displays in the system are shown in Figure 1.

Fire alarm control system structure and floor display location display

Figure 1 Fire alarm control system structure and floor display location display

3 System Function and Hardware Description

3.1 Hardware Design of Chinese Character Floor Display

As shown in Figure 2, the Chinese character floor display includes a single-chip microcomputer and its peripheral circuits, a CAN bus module, a FLASH memory, a Chinese character LCD module, a UART interface, as well as lights, buttons, and a buzzer. The single-chip microcomputer can receive Chinese character information uploaded from the PC through UART and store it in the FLASH as a query database for address information. The CAN communication module composed of the CAN controller MCP2510 and the CAN bus driver PCA82C250 communicates with the fire alarm controller through the CAN bus. If a fire occurs, the single-chip microcomputer will record the fire alarm information, query the FLASH to obtain the Chinese character address information of the fire alarm, and scroll the fire alarm and information query results on the Chinese character LCD. At the same time, when a fire occurs, the fire alarm information can be quickly queried through the query key, the buzzer alarms, the mute key is used to mute, and the light-emitting diode alarms are lit. When there is no fire alarm, the self-check key self-check can be used to check whether each function can work normally.

Chinese character floor display structure diagram
Figure 2 Chinese character floor display structure diagram

3.2 FLASH memory circuit design

The SST29SF040 selected for FLASH is a high-speed programmable flash memory launched by SST. It complies with the JEDEC standard and has a storage structure of 512K×8 Bits. The chip erase and write time is fast, the whole chip erase only takes 70 milliseconds, the segment erase only takes 18 milliseconds, and the word programming write time is only 14 microseconds. It has high reliability and can be repeatedly written 100,000 times, and the data can be stored for 100 years without loss.

The capacity of SST29SF040 is 512K Bytes, while the ROM direct addressing range of the 51 series microcontroller is 64K Bytes. If it is used directly without processing, a lot of storage space will be wasted. We use a paging storage method to make full use of the FLASH storage space and greatly expand the ROM addressing range of the microcontroller. According to the calculation that each Chinese character information occupies 32 Bytes, theoretically, a maximum of 16384 fire alarm address information can be stored, which is enough to cope with most complex engineering environments. Figure 3 is the memory circuit. The highest address lines A16-A18 are connected to P1.0-P1.2 of the microcontroller, so the FLASH memory realizes an external storage structure of 8 pages, each page of 64K. When reading and writing FLASH each time, assigning different values ​​to P1.0-P1.2 can achieve different page selections. Assuming that page is the page number variable to be selected (0-7), the following statement can be used in Keil Cx51 to implement the page selection operation before reading and writing: P1 = (P1 & 0xf8) | page;

FLASH memory paging storage circuit
Figure 3 FLASH memory paging storage circuit

3.3 Design of Chinese Character LCD Display Module

We choose OJM2*8A Chinese character LCD module from Jinpeng Electronics as the display device. OJM2*8A Chinese LCD module contains GB 2312 15*15 dot matrix national standard first and second level simplified Chinese characters and 8*8 dot matrix and 8*16 dot matrix ASCII characters. Users can enter GB2312 area code or ASCII code to realize text display. Each Chinese character area code only takes up two bytes, which is 1/16 of the storage unit required by the original Chinese character dot matrix.

[page]

The Chinese character LCD module interface protocol is a request/response (REQ/BUSY) handshake mode. A high-level response to BUSY (BUSY = 1) indicates that the LCD module is busy with internal processing and cannot receive user commands; a low-level BUSY (BUSY = 0) indicates that the LCD module is idle and waiting to receive user commands. Sending commands to the LCD module can start at any time after BUSY = 0. First, put the current byte of the user command on the data line, and then send a high-level REQ signal (REQ = 1) to notify the LCD module to process the command or data on the current data line. After receiving the external REQ high-level signal, the LCD module immediately reads the command or data on the data line, and at the same time changes the response line BUSY to a high level, indicating that the module has received the data and is busy with internal processing of the data. At this time, the user's write operation to the module has been completed. The user can cancel the signal on the data line and do other work besides module display. You can also continuously query whether the response line BUSY is low (BUSY = 0?). If BUSY = 0, it means that the module has completed the write operation to the user and can send the next data. If a complete command to display Chinese characters is sent to the module, a total of 5 bytes are required, including coordinates and Chinese character codes. The module starts to execute the internal operation of the entire command after receiving the last byte, so the response BUSY high level (BUSY = 1) of the last byte lasts for a long time. The timing diagram of writing Chinese characters to the LCD module is shown in Figure 4.

Timing diagram of writing Chinese characters to LCD module
Figure 4 Timing diagram of writing Chinese characters to the LCD module

3.4 CAN bus Communication module design

We chose Microchip's MCP2510CAN controller and Philips' PCA82C250CAN transceiver to build a CAN bus communication module. MCP2510 supports CAN2.0A/B protocol and can receive and send standard frames, extended frames and remote frames under the 2.0 protocol. MCP2510 has three transmit buffers and two receive buffers, which can perform receive filtering and message management to prevent congestion caused by excessive transmission and excessive reception. Its biggest advantage is that it has an SPI port with a transmission rate of up to 5Mb/S, which saves MCU ports and improves communication speed. Philips' 82C250CAN bus transceiver can be seamlessly connected with MPC2510. It has high-speed mode, slope control mode and delay mode. After many experiments, it has been confirmed that it is most stable when working in slope control mode, and the speed can also meet the system's 10Kbps transmission rate.

CAN bus communication circuit
Figure 5 CAN bus communication circuit

The CAN bus communication module circuit is shown in Figure 5. The microcontroller is directly connected to the SPI port of MCP2510 through the I/O port, and the SPI interface protocol is implemented by software simulation . PCA82C250 serves as the interface between MCP2510 and the physical CAN bus. If the anti-interference ability of the system needs to be further improved, an optoelectronic isolator can be added between MCP2510 and PCA82C250.

4 System Software Design

Chinese characters Floor Display The main functions of the software are: 1. Write the Chinese character information file sent from the serial port to the FLASH storage. 2. Communicate with the fire alarm controller via CAN. If a fire alarm message is found, search for the Chinese character address information in the FLASH and display it on the Chinese character LCD. If there are multiple fire alarm messages, scroll and display each message.

Chinese character floor display software flow chart

Figure 6 Chinese character floor display software flow chart

Figure 6 is the software flow chart of the Chinese character floor display. Page (value 0-7) represents the FLASH page to be read and written, and count (value 0-65535) represents the address within each page. Page0-page6 is used to store Chinese character information downloaded through the serial port, and page7 is used to store dynamic information such as received fire alarms. Once a new fire alarm is received, the corresponding Chinese character information in the FLASH is queried and displayed on the LCD.

In order to quickly locate the Chinese character address information of the fire alarm, we use array structure storage. Although this will cause some empty addresses in the storage due to the unequal length of the actual fire alarm addresses, and the storage efficiency is not high, but because our search of the array is a fast search that can be directly located, there is no need to use complex data structures such as linked lists, and it also avoids complex search algorithms such as binary search. For the microcontroller, it is actually a relatively small space at the cost of relatively high time efficiency, which is still very worthwhile.

5 Conclusion

The large-capacity Chinese character fire floor display based on CAN bus proposed in this paper has better solved the defects of the existing fire floor display. For data storage requirements that are larger than the 64K addressing space of 51 single-chip microcomputer ROM, the paged storage access method can well solve this problem. By storing large-capacity data information in FLASH, it can avoid the fire alarm not being transmitted in time due to excessive communication data flow on the CAN bus, delaying the alarm timing. Moreover, the Chinese character information in FLASH can be erased and written online through the serial port, which is convenient for on-site debugging. At present, the product has been put into practical use, and users have reported that it is running well.

References

[1] Zhu Ming, Wang Shu. Design and implementation of a lower-level network for a large fire alarm system based on CAN bus. Fire Technology and Product Information, 2003, (12): 5-8

[2] Wang Lifeng, Wang Xiaoping, Geng Qingbo, Peng Xiwei. Design of guest room communication controller based on CAN bus. Microcomputer Information, 2005, (16): 3-7

[3] Xu Aijun, Peng Xiuhua (eds.). Keil Cx51 V7.0 MCU High-Level Language Programming and uVision2 Application Practice. Publishing House of Electronics Industry, 2004

Reference address:Design of large capacity Chinese character fire floor display based on CAN bus

Previous article:New voiceprint identification technology automatically identifies and judges the speaker's characteristics
Next article:Design of intelligent detection system based on nRF24L01 and Actel FPGA

Recommended ReadingLatest update time:2024-11-16 16:36

STM32 reads and writes internal Flash
I used the STM32F407ZGT6 chip to develop a project at work. The internal Flash has 1M. For data storage needs, and there is no external EEPROM, I want to store the data in the Flash. Therefore, I studied some operations of STM32F4 reading and writing internal Flash. The following is an introduction to Flash, part of
[Microcontroller]
STM32 reads and writes internal Flash
Part 1 of a casual talk on microcontroller peripheral modules, illustrating what Flash, SAR, and Sigma-Delta ADCs are
The analog-to-digital conversion module ADC is a bridge between analog quantities and digital quantities in the real world. Its conversion accuracy can often determine the quality of a product. Nowadays, ADCs are generally integrated into microcontrollers. How do we choose the appropriate product according to our appl
[Microcontroller]
The end of an era: Adobe Flash Player is discontinued
With the arrival of 2021, Adobe Flash Player also bids farewell. Adobe will no longer support Flash Player after December 31, 2020. In fact, as early as 2017, Adobe announced plans to phase out the Flash Player plug-in by the end of 2020. The company also recommends that content developers port Flash content to HTML
[Mobile phone portable]
Design of direct programming of DSP off-chip Flash based on CCS
introduction The key to the normal operation of DSP after loading is the correct burning of the original program code in Flash. The .out format file generated by CCS compilation cannot be used directly for Flash burning. In the technical documentation provided by TI, the .out file is first converted to a .h
[Embedded]
Wuhan Xinxin's 50nm high-performance SPI NOR Flash products are in full production
Wuhan Xinxin Integrated Circuit Manufacturing Co., Ltd. (hereinafter referred to as "Wuhan Xinxin"), a leading non-volatile memory supplier under Tsinghua Unigroup, announced that its SPI NOR Flash wide voltage product series XM25QWxxC using 50nm Floating Gate process has entered full-line mass production, with produc
[Mobile phone portable]
stm32 Flash emulation EEPROM
/* *The flash memory module of STM32 consists of three parts: main memory, information block and flash memory interface register. * For large capacity products, 2K bytes per page * Small and medium capacity products have only 1K bytes per page * */   /* * * Flash memory read * The built-in flash memo
[Microcontroller]
stm32 Flash emulation EEPROM
Embedded Linux Development (Thirteen) FLASH (3) s3c2440 external NAND FLASH
- JZ2440  S3C2440 ARM920T -built-in Steppingstone (4K-Byte SRAM) No rom -expansion MX29LV160DBTI: 2MB, parallel port NOR FLASH K9F2G08U0C: 256MB,NAND FLASH soc The S3C2440A is developed with ARM920T core, 0.13um CMOS standard cells and a memory complier. The ARM920T implements MMU, AMBA BUS, and Harvard
[Microcontroller]
STM32cube directly generates internal FLASH as a USB flash drive program precautions
Use STM32cube to configure the relevant pins and enable the Mass Storage Class function of USB The MSC_MEDIA_PACKET in USB_DEVICE can be set larger. Increasing the buffer can increase the speed. For external spi-flash, it should be larger than 4096 bytes. Increase the stack size, otherwise USB will not work properly u
[Microcontroller]
Latest Security Electronics 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号