514 views|1 replies

410

Posts

3

Resources
The OP
 

【GigaDevice GD32H759I-EVAL】 External 5-inch LCD display test [Copy link]

 This post was last edited by TL-LED on 2024-6-1 14:20

Test driver's 5-inch display with a resolution of 800x480.

1. Hardware Circuit

1.1、Development board LCD circuit interface part

1.2 Design of adapter board

1.2.1 Schematic diagram

1.2.2 PCB effect diagram

1.2.3、Physical picture

2. Driver

2.1. Display screen timing parameters

The driver mainly modifies the iLCD timing configuration part

Look at the display manual, the following parameters are modified in the driver

2.2. Program part

2.2.1、gd32h759i_lcd_eval.c

#include "gd32h759i_lcd_eval.h"
#include "gd32h759i_eval_exmc_sdram.h"
#include <string.h>

#define LCD_FRAME_BUFFER         ((uint32_t)0xC0000000)
#define BUFFER_OFFSET            ((uint32_t)0x7F800)

static font_struct *current_font;
static uint16_t current_textcolor = 0x0000;
static uint16_t current_backcolor = 0xFFFF;
static uint32_t current_framebuffer = LCD_FRAME_BUFFER;
static uint32_t current_layer = LCD_LAYER_BACKGROUND;

static void lcd_char_draw(uint16_t xpos, uint16_t ypos, const uint16_t *c);
static void lcd_vertical_char_draw(uint16_t xpos, uint16_t ypos, const uint16_t *c);
static void pixel_set(int16_t x, int16_t y);

#define HORIZONTAL_SYNCHRONOUS_PULSE  48 
#define HORIZONTAL_BACK_PORCH         88 
#define ACTIVE_WIDTH                  800 
#define HORIZONTAL_FRONT_PORCH        40 

#define VERTICAL_SYNCHRONOUS_PULSE    3 
#define VERTICAL_BACK_PORCH           32 
#define ACTIVE_HEIGHT                 480 
#define VERTICAL_FRONT_PORCH          13 

2.2.2, main.c

#include "main.h"

void cache_enable(void);

int main(void)
{
	uint8_t x=0;
	uint32_t sd=0;
	uint32_t yd=0;
	cache_enable();
	systick_config();
	init_usart(115200);
	init_led();
	gd_eval_lcd_init();
	while(1) 
	{
		switch(x)
		{
			case 0: lcd_clear(LCD_COLOR_WHITE);  break;
			case 1: lcd_clear(LCD_COLOR_RED );  break;
			case 2: lcd_clear(LCD_COLOR_GREEN);  break;
			case 3: lcd_clear(LCD_COLOR_BLUE);  break;
			case 4: lcd_clear(LCD_COLOR_YELLOW);  break;
			case 5: lcd_clear(LCD_COLOR_MAGENTA);  break;
			case 6: lcd_clear(LCD_COLOR_BLACK);  break;
		}
		x++;
		if(x>6)
		{
			x=0;
		}
		lcd_string_display(1, "GD32H759 TLI LCD TEST!");
		
		delay_1ms(1000);
	}
}

void cache_enable(void)
{
    /* enable i-cache */
    SCB_EnableICache();

    /* enable d-cache */
    SCB_EnableDCache();
}

3. Operation

Run the video:

5lcd

4. Test source code

gd32h759_prj_20240601.rar (809.71 KB, downloads: 3)
This post is from Domestic Chip Exchange

Latest reply

Thanks for sharing the technical knowledge. It has broadened my horizons and helped me a lot. Thanks again.   Details Published on 2024-6-1 20:55
 
 

721

Posts

4

Resources
2
 

Thanks for sharing the technical knowledge. It has broadened my horizons and helped me a lot. Thanks again.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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