2713 views|9 replies

931

Posts

3

Resources
The OP
 

【CH579M-R1】+ driving LCD5110 display [Copy link]

 

After a day of debugging, the LCD5110 display finally drove successfully. The program was ported from STM32, and a logic analyzer was used to adjust the timing. During the debugging process, I made a low-level mistake and forgot to initialize the LCD5110. The timing was adjusted very well, but the LDC just had no display. I was puzzled and finally found the problem. The following figure shows the debugging process:

Here is a screenshot of adjusting the timing using a logic analyzer:

Below is the main.c code:

int main()
{
    UINT8 len,i,dir;
    
    
/* 配置串口1:先配置IO口模式,再配置串口 */   
    GPIOA_SetBits(GPIO_Pin_9);
    GPIOA_ModeCfg(GPIO_Pin_8, GPIO_ModeIN_PU);			  // RXD-配置上拉输入
    GPIOA_ModeCfg(GPIO_Pin_9, GPIO_ModeOut_PP_5mA);		// TXD-配置推挽输出,注意先让IO口输出高电平
    UART1_DefInit();
    
#if 1       // 测试串口发送字符串
    UART1_SendString( TxBuff, sizeof(TxBuff) );

#endif
/* 配置LED和PWM */
    GPIOA_ModeCfg(GPIO_Pin_6, GPIO_ModeOut_PP_5mA); // PA6 - PWM4(LED4)
    GPIOB_ModeCfg(GPIO_Pin_6, GPIO_ModeOut_PP_5mA); // PB6 - LED3
    PWMX_CLKCfg( 4 );
    PWMX_CycleCfg( PWMX_Cycle_64 );
	

    GPIOB_ModeCfg(GPIO_Pin_4, GPIO_ModeOut_PP_5mA); // PB4 - LED_G
    GPIOB_ModeCfg(GPIO_Pin_7, GPIO_ModeOut_PP_5mA); // PB7 - LED_Y
    GPIOB_InverseBits(4);

    LCD_init();           //LCD5110初始化
	display_main();       //显示主界面
	
    // 中断方式:接收数据后发送出去
    UART1_ByteTrigCfg( UART_7BYTE_TRIG );
    trigB = 7;
    UART1_INTCfg( ENABLE, RB_IER_RECV_RDY|RB_IER_LINE_STAT );
    NVIC_EnableIRQ( UART1_IRQn );

#if 1       // 查询方式:接收数据后发送出去
    while(1)
    {
/*        //串口测试
        len = UART1_RecvString(RxBuff);
        if( len )
        {
            UART1_SendString( RxBuff, len );            
        }
*/
		//PWM测试
        if(dir){
            i--;
            if(i == 0){
                dir = 0;
			    GPIOB_InverseBits(GPIO_Pin_4);
			}
        }
        else{
            i++;
            if(i == 64){
                dir = 1;
				GPIOB_InverseBits(GPIO_Pin_7);
			}
		}
        PWMX_ACTOUT( CH_PWM4, i, Low_Level, ENABLE);

//        PWMX_ACTOUT( CH_PWM7, 64-i, Low_Level, ENABLE);
        mDelaymS(10);
        //LED3闪烁测试
        time++;
        if(time > 50){
            time = 0;
            GPIOB_InverseBits(GPIO_Pin_6);

        }
    }
    
#endif    

#if 0      // 中断方式:接收数据后发送出去
    UART1_ByteTrigCfg( UART_7BYTE_TRIG );
    trigB = 7;
    UART1_INTCfg( ENABLE, RB_IER_RECV_RDY|RB_IER_LINE_STAT );
    NVIC_EnableIRQ( UART1_IRQn );
#endif    

//    while(1);    
}

This is the LCD display status:

This post is from Domestic Chip Exchange

Latest reply

So that’s it, got it!   Details Published on 2020-9-14 18:04
 
 

1w

Posts

204

Resources
From 3
 

Qinheng CH579M-R1 Development Board Review

Summary post: https://en.eeworld.com/bbs/thread-1140005-1-1.html

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

玩板看这里:

http://en.eeworld.com/bbs/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 
 

310

Posts

5

Resources
2
 

The OP has plenty of time. I see you applied for quite a few board reviews.

This post is from Domestic Chip Exchange

Comments

Indeed, there seems to be Nanxin SC8905.  Details Published on 2020-9-14 12:55
Indeed, there seems to be Nanxin SC8905.  Details Published on 2020-9-14 11:44
 
 
 

1452

Posts

1

Resources
4
 
Song Yuanhao posted on 2020-9-14 09:42 The OP has plenty of time. I see you have applied for quite a few board reviews

Indeed, there seems to be Nanxin SC8905.

This post is from Domestic Chip Exchange

Comments

Yes, I was lucky this time and got the opportunity to review both CH579M and SC8905 boards.  Details Published on 2020-9-14 12:52
 
 
 

1452

Posts

1

Resources
5
 

Is the time displayed below the screen the time called by the RTC?

This post is from Domestic Chip Exchange

Comments

I am going to use the DS1307 calendar module. This time is more convenient and does not need to be set when starting the computer.  Details Published on 2020-9-14 12:54
 
 
 

931

Posts

3

Resources
6
 
jinglixixi posted on 2020-9-14 11:44 Indeed, it seems that there is also Nanxin SC8905.

Yes, I was lucky this time and got the opportunity to review both CH579M and SC8905 boards.

This post is from Domestic Chip Exchange
 
 
 

931

Posts

3

Resources
7
 
jinglixixi posted on 2020-9-14 11:47 Is the time displayed below the screen the RTC called?

I am going to use the DS1307 calendar module. This time is more convenient and does not need to be set when starting the computer.

This post is from Domestic Chip Exchange

Comments

So that’s it, got it!  Details Published on 2020-9-14 18:04
 
 
 

931

Posts

3

Resources
8
 
Song Yuanhao posted on 2020-9-14 09:42 The OP has plenty of time. I see you have applied for quite a few board reviews

After retirement, apart from cleaning and going out for exercise, I basically spend my time playing with the board.

This post is from Domestic Chip Exchange

Comments

Ah, happiness!!!  Details Published on 2020-9-14 18:03
 
 
 

1452

Posts

1

Resources
9
 
hujj posted on 2020-9-14 12:55 After retirement, I basically spend my time playing with the board, except for cleaning and going out for exercise.

Ah, happiness!!!

This post is from Domestic Chip Exchange
 
 
 

1452

Posts

1

Resources
10
 
hujj posted on 2020-9-14 12:54 I am going to use the DS1307 calendar module. This time is more convenient and does not need to be set when starting up.

So that’s it, got it!

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

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

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