5204 views|1 replies

5

Posts

0

Resources
The OP
 

[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

http://www.elecfans.com/uploads/allimg/171206/095Z362L-0.jpg

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)

This post is from Domestic Chip Exchange
 
 

5

Posts

0

Resources
2
 

There is a BUG in the digital display function. The following function needs to be modified

void LCD_Num_Data( uint8_t Num, uint8_t Show)
{
	unsigned char Result;

	Result = LCD_Table( Show & 0x0f );
    Num = 4 - Num;
	switch( Num )
	{
		case 0x01:
		//------------ 第1个"8"字符 ----------
		if( (Result&0x01) == 0x01 ) {	SET_VALUE_1A;}	else {RESET_VALUE_1A;}  //1A
		if( (Result&0x02) == 0x02 ) {	SET_VALUE_1B;}	else {RESET_VALUE_1B;}	//1B
		if( (Result&0x04) == 0x04 ) {	SET_VALUE_1C;}	else {RESET_VALUE_1C;}	//1C
		if( (Result&0x08) == 0x08 ) {	SET_VALUE_1D;}	else {RESET_VALUE_1D;}	//1D
		if( (Result&0x10) == 0x10 ) {	SET_VALUE_1E;}	else {RESET_VALUE_1E;}	//1E
		if( (Result&0x20) == 0x20 ) {	SET_VALUE_1F;}	else {RESET_VALUE_1F;}	//1F
		if( (Result&0x40) == 0x40 ) {	SET_VALUE_1G;}	else {RESET_VALUE_1G;}	//1G
		break;

		case 0x02:
		//------------ 第2个"8"字符 ----------
		if( (Result&0x01) == 0x01 ) {	SET_VALUE_2A;}	else {RESET_VALUE_2A;}	//2A
		if( (Result&0x02) == 0x02 ) {	SET_VALUE_2B;}	else {RESET_VALUE_2B;}	//2B
		if( (Result&0x04) == 0x04 ) {	SET_VALUE_2C;}	else {RESET_VALUE_2C;}	//2C
		if( (Result&0x08) == 0x08 ) {	SET_VALUE_2D;}	else {RESET_VALUE_2D;}	//2D
		if( (Result&0x10) == 0x10 ) {	SET_VALUE_2E;}	else {RESET_VALUE_2E;}	//2E
		if( (Result&0x20) == 0x20 ) {	SET_VALUE_2F;}	else {RESET_VALUE_2F;}	//2F
		if( (Result&0x40) == 0x40 ) {	SET_VALUE_2G;}	else {RESET_VALUE_2G;}	//2G
		break;

		case 0x03:
		//------------ 第3个"8"字符 ----------
		if( (Result&0x01) == 0x01 ) {	SET_VALUE_3A;}	else {RESET_VALUE_3A;}	//3A
		if( (Result&0x02) == 0x02 ) {	SET_VALUE_3B;}	else {RESET_VALUE_3B;}	//3B
		if( (Result&0x04) == 0x04 ) {	SET_VALUE_3C;}	else {RESET_VALUE_3C;}	//3C
		if( (Result&0x08) == 0x08 ) {	SET_VALUE_3D;}	else {RESET_VALUE_3D;}	//3D
		if( (Result&0x10) == 0x10 ) {	SET_VALUE_3E;}	else {RESET_VALUE_3E;}	//3E
		if( (Result&0x20) == 0x20 ) {	SET_VALUE_3F;}	else {RESET_VALUE_3F;}	//3F
		if( (Result&0x40) == 0x40 ) {	SET_VALUE_3G;}	else {RESET_VALUE_3G;}	//3G
		break;
		
	default:
		break;
	}
	
}

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
Homemade STEVAL-IPM05F 3Sh board: FOC motor control 400V/8A non-sensing/sensing Hall/sensing encoder and other reference programs...

This post was last edited by music_586 on 2019-4-4 19:06 This content was originally created by EEWORLD forum user musi ...

C language uses binary tree to parse polynomials and evaluate

It mainly realizes the analysis of polynomial data calculation. If there is a need to make a simple calculator based on ...

Zhouyi Compass Simulation Experiment 2——Environment and Routine Analysis

Zhouyi Compass Simulation Experiment 2——Environment and Routine Analysis In simulation experiment 1 (https://bbs.eewor ...

【Development and application based on NUCLEO-F746ZG motor】13. Parameter configuration - USART3 configuration

The function of this serial port on the development board is to communicate with ST-LINK, and then connect ST_LINK2 to t ...

[EEWorld invites you to play disassembly] PISEN fast charging power bank 10500mAh 22.5W

Quote: Thank you EEWorld for inviting you to the disassembly (fourth issue): popular power bank disassembly event. As w ...

Please tell me why this machine often burns the starting resistor at the customer's place

Please tell me why the resistor burned out and how to fix it? 627875627874627873

[Flower carving hands-on] Interesting and fun music visualization series of small projects (26) - LED hypercube

This post was last edited by eagler8 on 2022-10-5 08:59 I had the urge to do a series of topics on sound visualization. ...

Is it possible to perform socket communication without IP and port number?

When using socket communication, whether it is internal communication within the local machine or communication betwee ...

Development Background and Advantages of SiC Power Devices

SiC power components have higher withstand voltage, lower on-resistance, can operate at higher speeds, and can operate a ...

【Digi-Key Follow me Issue 2】Task Collection

I got the board quite late, and after completing the task, I got busy with a lot of other things so I didn't have time t ...

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list