8251, but because the communication baud rate of 8251 is not high, it cannot be used in the system with high crystal oscillator. This makes it impossible to use the ">8251 chip to send and receive data in the system that requires high operating speed and high-speed data transmission and reception. Moreover, 8251 needs to have MAX3100 support..." />

Design of GPS positioning system based on MAX3100 and OLED

Publisher:丝路老君Latest update time:2010-09-20 Source: 山西电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

In the single-chip microcomputer application system, serial data communication usually uses the chip "8251", but because the communication baud rate of 8251 is not high, it cannot be used in the system with high crystal oscillator. This makes it impossible to use the 8251 chip to send and receive data in the system that requires high operating speed and high-speed data transmission and reception. Moreover, 8251 needs MAX3100 to support high-speed communication. The maximum communication baud rate can reach 230KBPS, low power consumption, support low voltage, and the system size is small after design. It is better than using an external clock 8253 to provide an external clock signal. MAXIM's new UART chip MAX3100

It just fills this gap. MAX3100 supports high-speed communication, with the highest communication baud rate up to 230KBPS, low power consumption, and low voltage support. The system size after design is small, which is less than half the size of the printed board designed with external clock 8253. It can also make software design more reliable.

Organic light emitting display (OLED) is a new generation of flat panel display technology that is more advanced than liquid crystal display technology, and is recognized by the industry as the next generation display technology with the most development prospects. Compared with liquid crystal display technology, organic light emitting display (OLED) has the advantages of ultra-lightness, high brightness, wide viewing angle, self-luminescence, fast response speed, wide temperature range, strong shock resistance, low power consumption, and flexible display. Therefore, OLED screens are rapidly expanding their application share in the portable electronic product market and can be used in harsh outdoor environments such as communications, surveying and mapping, railways, and weapons.

1 Main working principle

The system is mainly composed of AT89C52 single-chip microcomputer, MAX3100 universal asynchronous receiver and transmitter, GPS-OEM board, OLED display screen, etc. AT89C52 single-chip microcomputer receives NEMA statements sent by GPS-OEM board through MAX3100, calculates positioning information (including: latitude, longitude, altitude, speed, date, time, heading, satellite status, etc.) through software programming, and displays it on the OLED display screen. And through MAX3100, these positioning information are output as RS232 standard serial port data. The system circuit schematic diagram is shown in Figure 1.

2 Data communication between MCU and GPS-OEM board

The data communication between the microcontroller and the GPS-OEM board is realized through the MAX3100 universal asynchronous receiver and transmitter, in which the microcontroller oscillation frequency is selected to be 11.0592MHz. First, the MAX232 level conversion chip is used to realize the bidirectional conversion between RS232 level and TTL level, because the serial port level of the GPS OEM board is in line with the RS232 standard level, while the MAX3100 uses the TTL level.

The DIN pin of MAX3100 is the serial data input terminal, and DOUT is the serial data output terminal. The rising edge of the serial clock latches the DIN data, and the DOUT data is synchronously output by the falling edge of the serial clock. The serial data sequences of the DIN and DOUT pins of MAX3100 are both 16-bit data, where the first two bits of the DIN data sequence represent the data type of the string. When the first two bits are "1, 1", it indicates a write command, when the first two bits are "0, 0", it indicates read data, and when the first two bits are "1, 0", it indicates write data.

The initialization configuration of MAX3100 is completed by the microcontroller through the write command sequence. The command sequence includes parity bit, data bit, stop bit, baud rate setting, data word length, check FIFO, interrupt enable and other information. MAX3100 has its own baud rate generator, and its oscillator can use a crystal oscillator with a frequency of 1.8432 MHZ or 3.6864 MHZ. The baud rate is determined by the last 4 bits B0~B3 of the write command sequence.

When the microcontroller receives the serial port data from the GPS OEM board, it is completed by reading the MAX3100 data sequence. When the microcontroller reads data from the MAX3100, it needs to write a 16-bit word (0000H) to DIN, and then read the 16-bit word from DOUT. The upper eight bits are: the status of the receive/send buffer, the data error/overflow status, the receive/check bit status and the CTS status. The lower eight bits are the serial port data received from the GPS OEM board.

When the microcontroller sends the final positioning data, it is completed by writing a data sequence to the MAX3100. When the microcontroller writes data to the MAX3100, a 16-bit word is written to DIN, in which the high eight bits are set to: write flag, enable TX output, RTS pin setting, and transmission check bit setting. The low eight bits are the data to be transmitted.

3 OLED display screen displays positioning information

The display screen of the display module is 128 columns and 64 rows. It has 1 row driver and 2 column drivers. The row driver has 64 row outputs, and each column driver has 64 outputs. As long as the power is provided, the drive signal and synchronization signal can be generated. The external signal of the module is only related to the column driver. The column driver has a built-in 64×64-bit display memory. The display status of each pixel on the display screen corresponds to each bit of the display memory. The data of the display memory is directly used as the driving signal for the graphic display. It is displayed when it is "1" and not displayed when it is "0". The OLED display screen in the system displays positioning information such as latitude, longitude, altitude, speed, date, time, heading, satellite status, etc.

4 Software Design

4.1 Application of watchdog interrupt

Pins 6 and 7 of MAX706 are connected to P1.7 and reset pin of AT89C52 respectively. In the software program, a watchdog counter reset instruction is inserted every other program segment. In this way, if a dead loop or illegal code area is entered during program execution, the system will be reset to ensure normal operation of the system.

4.2 Delay processing

When the data to be sent is sent into the send buffer, since MAX3100 has to wait until T=1 when the send buffer is empty before it can receive another data to be sent, it is very necessary to add a suitable delay at this time to ensure that the data sent is accurate.

4.3 Create a font library

When realizing OLED display, the Chinese characters to be displayed are first organized into a Chinese character library, and the English characters or Arabic numerals are organized into a Western character library.

[page]

For example, for the Chinese character “效”, set the font size to Songti size 12, the corresponding dot matrix is ​​width × height = 16 × 16, and the corresponding 32 bytes of horizontal modulus using the modulus software are: {O×10, 0×20, 0×08, 0×30, O×08, 0×20, 0×7F, O×20, 0×14, 0×7E, 0×12, 0×44, 0×21, 0×C4, O×22, 0×44, O×62, 0×28, O x 14, 0×28, O×08, 0×10, 0×0C, 0×10, O×12, 0×28, 0×20, 0×CE, 0×C3, 0×04, O×00, 0×00}.

The Arabic numeral "1" is set to Songti size 12, and the corresponding dot matrix is ​​width × height = 8 × 16. The corresponding 16 bytes of horizontal modulus using modulus software are: {0×00, 0x0o, 0×00, 0×10, 0×70, 0×10, 0×10, O×10, 0×10, 0×10, 0×10, O×10, 0×7C, O×00, O×00}.

4.4 Key points of software design

When designing the software, there are two key parts: one is to process the GPS module data received by the serial port; the other is to display the required positioning information on the OLED display. The software flow chart is shown in Figure 2.


Define an 8-bit shift subroutine in MAX3100. The C language code is as follows:

The task of this subroutine is to complete two tasks by performing 8 shift operations on the DIN and DOUT pins of the MAX3100. The first is the receiving part. After the initialization configuration, the NEMA statement of the GPS module is received through RX and sent to the receiving buffer. The next is the sending part, which receives the SPI data and sends it to the sending buffer, and sends it out through TX in asynchronous serial.

When receiving a NEMA statement, it starts with the line beginning mark "$". Before further processing, the NEMA statement is a long string of byte streams. This information cannot be used before it is classified and extracted. Therefore, the information of each field must be extracted from the byte stream through a software program and converted into positioning information such as latitude, longitude, altitude, speed, date, time, heading, satellite status, etc.

Displaying a certain location information at a certain position on the OLED display is done through software settings, where Row represents the starting row of the location to be displayed, Column represents the starting column of the location to be displayed, and a represents the serial number in the established Chinese character library and Western character library. The C language code is as follows:

5 Conclusion

This system combines the advantages of MAX3100's efficient asynchronous transceiver communication, and absorbs its advantages of low power consumption, small size, fast transmission, ultra-thinness, high brightness, wide viewing angle, self-luminous, fast response speed, wide temperature range, strong shock resistance, and low power consumption. The battery-powered portable GPS positioning system has been designed and developed and has been successfully applied to products with good results.

Reference address:Design of GPS positioning system based on MAX3100 and OLED

Previous article:Application of embedded computers in lightning monitoring systems
Next article:Design of Radar Pulse Pre-selector Based on FPGA

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

Interesting arrangement of sub-pixels in OLED screens
Unconsciously, the series of screen technology analysis articles is coming to an end. We still have two major sections to introduce to readers: arrangement and liquid crystal migration. Similar to the introduction of the display layer structure, which was separated into two articles on OLED and LCD, we have also separ
[Mobile phone portable]
Interesting arrangement of sub-pixels in OLED screens
The difference between OLED screen and TFT
OLED relies on its own light to display images, does not require a backlight, is not affected by ambient light, and generally has a lifespan of about 5,000 times. TFT is an active matrix liquid crystal, which requires the brightness of the backlight to display images and is affected by the surrounding light. It
[Power Management]
Samsung S21 leak: will use BOE OLED screen
       SamMobile quoted sources as saying that the next-generation flagship Samsung Galaxy S21 will use BOE OLED screen.   It is reported that after nearly a month of negotiations, Samsung Mobile and BOE reached a cooperation intention, which means that the Samsung Galaxy S21 is expected to use BOE OLED panels.   Sour
[Mobile phone portable]
S3c2440 bare metal-spi programming-3.gpio simulation spi driver OLED
To operate OLED, connect to OLED through three lines (SCK, DO, CS). There is no DI here because 2440 will only transmit data to OLED without receiving data. gpio_spi.c implements gpio simulation spi and is responsible for spi communication. For OLED, there are special instructions and data formats. The data content to
[Microcontroller]
S3c2440 bare metal-spi programming-3.gpio simulation spi driver OLED
Application of OLED driver and module design in mobile phone screen
  Ten years after the discovery of the mechanism of electron light emission, organic light emitting diode ( OLED ) technology is finally commercialized in mobile phones, MP3 players and digital cameras. According to Display Search, since the first single-chip OLED driver in 2001, more than 17 million ICs were used in
[Power Management]
Application of OLED driver and module design in mobile phone screen
Design of OLED control system based on C8051F020 and USB
1 Introduction Compared with traditional LCD screens, OLED display modules have the characteristics of high brightness, high contrast, wide viewing angle, fast response speed, and low power consumption. Therefore, with the development of highly integrated electronic products, OLED display modules are wide
[Microcontroller]
Apple will expand its OLED panel purchases this year, and BOE will join the supply list
Apple plans to release the next-generation smartphone iPhone 13 (tentative name) in September, and the entire series is expected to use OLED panels. The latest report from market research firm Omida pointed out that Apple will expand its OLED panel purchases this year, so it will revise its forecast purchase volume fr
[Embedded]
OLED/liquid crystal materials are rapidly increasing in volume, Wanrun shares' Q1 revenue and net profit both increased
On April 27, Wanrun Holdings released its Q1 performance forecast, stating that the company achieved operating income of 787 million yuan, a year-on-year increase of 17.69%; net profit attributable to shareholders of listed companies was 132 million yuan, a year-on-year increase of 6.08%. According to the data, Wanr
[Mobile phone portable]
OLED/liquid crystal materials are rapidly increasing in volume, Wanrun shares' Q1 revenue and net profit both increased
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号