初级会员

- 积分
- 88
- 金钱
- 88
- 注册时间
- 2019-4-20
- 在线时间
- 11 小时
|
1金钱
本帖最后由 iDneW 于 2019-4-24 14:11 编辑
[mw_shl_code=c,true]#include "tftlcd.h"
#include "system.h"
#include "SysTick.h"
#include "led.h"
#include "usart.h"
#include "wkup.h"
void kai_display() //开机显示
{
FRONT_COLOR=RED;
LCD_ShowString(10,10,tftlcd_data.width,tftlcd_data.height,16,"LCD Test");
LCD_ShowString(10,30,tftlcd_data.width,tftlcd_data.height,16,"HELLO WORLD");
LCD_ShowString(10,50,tftlcd_data.width,tftlcd_data.height,16,"K_UP:Adjust");
}
/*******************************************************************************
* 函 数 名 : main
* 函数功能 : 主函数
* 输 入 : 无
* 输 出 : 无
*******************************************************************************/
int main()
{
LED_Init();
SysTick_Init(72);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //中断优先级分组 分2组
USART1_Init(115200);
TFTLCD_Init();
while(1)
{
kai_display();
printf("time: 5\r\n");
led1=1;
delay_ms(1000); //隔1秒显示计数
printf("time: 4\r\n");
led1=0;
delay_ms(1000);
printf("time: 3\r\n");
led1=1;
delay_ms(1000);
printf("time: 2\r\n");
led1=0;
delay_ms(1000);
printf("time: 1\r\n");
led1=1;
delay_ms(1000);
printf("进入系统待机模式\r\n");
Enter_Standby_Mode();
}
}[/mw_shl_code]
进入待机模式以后 LED也灭了 不是cpu停止工作了吗,为什么屏还亮着 还有显示
刚学希望大家指教
|
最佳答案
查看完整内容[请看2#楼]
LCD也有自己的low power mode, MCU进入Stand by Mode之前需要再下对应command.
Back light如果要暗下来, 需要在控制背光的pin脚加上对应的下拉(或上拉)电阻, 去把背光切掉.
|