[Fudan Micro FM33LG0 Series Development Board Review] LCD Usage and Truth Table Tool Instructions
[Copy link]
This post was last edited by AE007 on 2021-11-29 02:04
This test is of FM33LG0 LCD module, and LCD truth table tool can be used to quickly define the display data register data corresponding to COM and SEG . Use a 4COM-9SEG LCD segment code LCD screen and rewrite the official routine.
LCD Overview
The LCD display driver module is used to drive segment code LCD screens and can support 4 , 6 , and 8COM . The maximum display segments are 128 segments ( 4COM ), 180 segments ( 6COM ), and 224 segments ( 8COM ).
Key Features:
Maximum supported display segments: 8×40 , 6×42 , 4×44
1/3 bias , 1/4 bias
16 levels of grayscale adjustable
LCD driver supports two modes: on-chip resistor type and off-chip capacitor type
Supports flashing function, and the flashing frequency is adjustable
Support intermittent lighting function, lighting and extinguishing time can be configured
Support all-on and all-off functions
Low power consumption, LCD driver can work in Active mode, Sleep mode and DeepSleep mode
Supports Type A and Type B LCD driving waveforms (configurable)
Typical frame refresh rate 64Hz
Usage Process
1. Wiring instructions:
COM pins: 4COM must be connected to COM0-3 in sequence
SEG pins: do not have to be used continuously, you can use SEG0-SEG2-SEG3... etc. Note that SEG29-31 and COM are multiplexed, and unused pins should not be initialized as SEG functions.
2. Configure LCD truth table:
Fill in the following content according to the LCD truth table and the connected pins
The generated file is in the same directory as LCD truth table.exe
The .xml file is the configuration file information of the interface, which is designed to facilitate customers to directly import it the next time they use it without further configuration.
The .h file contains the data of the display registers corresponding to COM and SEG of Fudan microchip .
3. Copy the .h file into the LCD example
4. GPIO is initialized according to the actual connection
5. LCD initialization
6. Use COM and SEG to display the register data
SET_VALUE_XXX will light up the specified segment of the LCD, and RESET_VALUE_XXX will turn off the specified segment of the LCD. After controlling the LCD value and calling the corresponding field, the LCD display data register can be updated with the data in DISPDATA[] to realize LCD display control. For example, if you want to display the number 1 on the LCD
SET_VALUE_1B ; // Display the first segment code B
SET_VALUE_1C ; // Display the first segment code C
FL_LCD_WriteData(LCD, FL_LCD_DATA_REG0, DISPDATA[0]); // Refresh buffer
FL_LCD_WriteData(LCD, FL_LCD_DATA_REG1, DISPDATA[1]); // Refresh buffer
FL_LCD_WriteData(LCD, FL_LCD_DATA_REG2, DISPDATA[2]); // Refresh buffer
FL_LCD_WriteData(LCD, FL_LCD_DATA_REG3, DISPDATA[3]); // Refresh buffer
7. There is also a function in the code to quickly display numbers
First define the digital tube display array 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f,0x6f, //0~9 // Digital tube display array
//------------ The first "8 " character ----------
if( (Result&0x01) == 0x01 ) { SET_VALUE_1A;} //1A
if( (Result&0x02) == 0x02 ) { SET_VALUE_1B;} //1B
if( (Result&0x04) == 0x04 ) { SET_VALUE_1C;} //1C
if( (Result&0x08) == 0x08 ) { SET_VALUE_1D;} //1D
if( (Result&0x10) == 0x10 ) { SET_VALUE_1E;} //1E
if( (Result&0x20) == 0x20 ) { SET_VALUE_1F;} //1F
if( (Result&0x40) == 0x40 ) { SET_VALUE_1G;} //1G
Summarize
In this experiment, it was found that Fudan Micro's chip has the following advantages: 1. The routine library is very complete; 2. The SEG pins of the LCD module can be flexibly configured to facilitate wiring; 3. The chip can operate the LCD module at low power consumption ; 4. The LCD truth table tool can quickly define the display data register data corresponding to COM and SEG , saving a lot of time.
The routines and LCD tools are posted at the end of the article. If you have any questions, please leave a message.
LCD真值表.zip
(23.26 KB, downloads: 61)
LCD 4COM示例 - 傅工开源.rar
(10.18 MB, downloads: 150)
|