At present, with the rapid development of the information industry, all kinds of ships need to be equipped with more high-quality and inexpensive small and medium-sized information monitoring terminals, which are used to monitor meteorological conditions and obtain navigation information to ensure navigation safety.Such as ARM, MIPS, led the 32-bit processor in the applications of information monitoring terminal, shows great advantages, but generally in 32-bit processor embedded systems often need to configure the external FLASH and SDRAM, which makes the development and maintenance of the high cost of the whole system, the design adopts high performance low power AVR microcontroller and LCD module to design information monitoring terminal, with low cost, stable performance, clear display and good man-machine interface, can satisfy the demand for small and medium-sized information monitoring terminal of the ship.
1 overall design
Information monitoring terminal is mainly composed of display control board, keyboard, communication interface and liquid crystal display module. It has functions of data receiving and sending, data display, human-computer interaction and screen brightness adjustment, etc., and its composition is shown in figure 1.
The working process is as follows: after the system is initialized, the information monitoring terminal receives data from the communication interface in accordance with the set working mode, and then sends the data to the LCD display screen through the LCD controller, and responds to the user's operation instructions in real time through the keyboard and display screen.
2 hardware design
2.Liquid crystal display module and single chip microcomputer
The LCD module of choice is EW32F00BCW, a 5-inch, 320-by-240-bit LCD display with performance comparable to the original Japanese DMF50081. However, the price is much lower.The device adopts CCFL backlight display, the display mode is full reflection display, the display color is blue with white characters, and the external size is 139.0 w x 102.5 h x 13.2 DMM.
The microcontroller adopts ATMEL AVR enhanced microcontroller AT90CAN128.Its main performance is: CMOS technology and RISC architecture;Chip integrated 128 kB FLASH program memory, 4 kB EEPROM and 4 kB SRAM data storage: with JTAG interface;It integrates 8-bit and 16-bit timer/counter, A/D converter, SPI synchronous serial port, UART asynchronous serial port and independent CAN controller.And on the software effective support assembly language and C high - level language.
2.Display control circuit
The RA8835 is a low-cost, versatile LCD controller.It fully covers the existing functions of SED1335, enhances its stability, and has the advantages of newer process and lower power consumption.RA8835 has rich command functions and USES 4-bit data to send in parallel. It can support mixed display of text and graphics, and can present dynamic effects such as three-layer overlapping display of text and graphics, horizontal and vertical scrolling on the LCD screen.Figure 2 is the schematic diagram of the display control circuit. AVR MCU is directly connected to RA8835 through the control line and data line to control the display content and display mode.To store the display content and display it, the RA8835 needs one or two external display caches 62256.The keyboard USES 2x4 matrix interface, two lines are connected at the same time, there are four direction keys, and four function keys of confirm, return, menu and page turning.
2.Communication unit circuit
AT90CAN128 has a two-channel serial USART interface and outputs TTL level, one of which is converted to RS232 level by level conversion chip MAX232, and the other one is converted to RS422 level by level conversion chip MAX1482.Photoelectric isolation is added between the USART of AT90CAN128 and the level conversion chip, so that the input end and the output end are completely isolated in electricity without interference.AT9 0CAN128 has a built-in CAN controller. The CAN bus transceiver circuit CAN be formed by simply connecting the sending end and receiving end of the controller to the CAN bus transceiver.CTM1050 is a high-speed CAN transceiver chip with isolation. The chip converts the logic level of CAN controller into the differential level of CAN bus and has the isolation function of DC 2500V and ESD protection.In general, RS232 communication is directly connected to the upper computer, and the distance is relatively short, so the voltage regulator is used for simple protection on RS232 level.When using RS485 and CAN communication, the general distance is long, and more in the cabin, lightning may cause bus damage, so in addition to the design level conversion, must also add isolation protection circuit.
2.Power supply unit circuit
3 software design
1) in the initialization of the system, it is required to complete the initialization of the I/O port, SPI port, asynchronous serial port, CAN port, etc., of the single-chip microcomputer. Meanwhile, the function modules of the single-chip microcomputer that are not used, such as JTAG port, trans port, etc., are also prohibited to reduce the power consumption of the whole machine.
2) after initialization, the slide position of MAX5437 should be set.
Because there is no EEPROM in it, the software USES the EEPROM of MCU to record the position information of the slide.Considering that the user may adjust the LCD contrast to fly, the program is designed to restore the factory Settings through keyboard operation.
3) use interrupt and query to respond to the keyboard.Because the keyboard line is connected to the MCU interrupt at the same time, the program does not have to query the keyboard state all the time, only after the interrupt is generated to scan the keyboard, thus improving the work efficiency of the MCU.
4 conclusion
Follow Me
Link:Tenco
没有评论:
发表评论