夜先锋av资源网站,国产精品极品美女在线观看免,欧美亚洲精品电影在线观看,日韩在线精品强乱一区二区三区

首頁 資訊 > 創(chuàng)新 > 正文

全球今熱點:【愛普特 APT32F110 ev board 試用測評連載】+ LCD顯示驅(qū)動


(資料圖片僅供參考)

測試下斷碼LCD顯示屏顯示。

一、硬件部分

1.1、LCD相關(guān)的硬件部分電路圖:

1.2、斷碼顯示屏的邏輯表

二、驅(qū)動代碼

2.1、lcd.c

//lcd.c#include?#include?#include?#include?#include?#include?#include?#include?#include?#include?"iostring.h"#include?"board_config.h"uint8_t?SendData[32]?=?{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32};static?uint8_t?s_RtcSec?=?0;void?init_lcd(void){int?iRet?=?0;uint8_t?i;uint8_t?j=0;uint32_t?wSegMsk?=?0x0Cfffffc;//lcd?seg2->26uint8_t??wComMsk?=?0x0f;//lcd?com0->3csi_lcd_config_t?tLcdCfg;csi_lcd_gpio_init(wSegMsk,?wComMsk);//LCD?GPIO???:com0-com3???seg2-seg31???4*30tLcdCfg.byClkSrc?=?LCD_CLKSRC_ISOSC;//LCD?????ISOSCtLcdCfg.byFreq?=?80;//LCD?????=40Hz,????:30~100HztLcdCfg.byVlcd=?LCD_VLCD_IN_3V2;//VLCD????3.2VtLcdCfg.byDutyBias=?LCD_DUTY1_4_BIAS1_3;//LCD?Duty?=?1/4,?Bias?=?1/3tLcdCfg.byDead=?LCD_DEAD_2PHASE;//LCD?????,??3?????,?????????tLcdCfg.byDrvNet=?LCD_DRVNET_PWLEV1;//LCD????(????),???4?,??PWLEV0?>?PWLEV1?>?PWLEV2?>?PWLEV3tLcdCfg.byDpEn=?DISABLE;//????????tLcdCfg.byInt=?LCD_INTSRC_NONE;//?????,??iRet?=?csi_lcd_init(LCD,?&tLcdCfg);if(iRet?==?CSI_OK)csi_lcd_start(LCD);//csi_lcd_set_blink(LCD,?LCD_BLINK_SEG8,?LCD_BLINK_FRE_F2,?2);//LCD??????????LCD_BLINK_FRE_F2,??????????csi_lcd_write_data(LCD,?SendData,?2,?22);for(i?=?2;?i?9){j=0;}}

2.2、main.c

#include?#include?#include?#include?"demo.h"#include?"led.h"#include?"key.h"#include?"lcd.h"/*?Private?macro-----------------------------------------------------------*//*?externs?function--------------------------------------------------------*/extern?void?system_init(void);extern?void?board_init(void);extern?void?user_demo(void);/*?externs?variablesr------------------------------------------------------*//*?Private?variablesr------------------------------------------------------*/int?main(){uint8_t?key_val;??system_init();board_init();init_led();init_key();init_lcd();my_printf("Hello?World~~~~~~~\n");//print?messagewhile(1){lcd_test();}return?0;}

三、顯示效果

關(guān)鍵詞: 顯示效果

最近更新

關(guān)于本站 管理團隊 版權(quán)申明 網(wǎng)站地圖 聯(lián)系合作 招聘信息

Copyright © 2005-2018 創(chuàng)投網(wǎng) - www.ossf.org.cn All rights reserved
聯(lián)系我們:39 60 29 14 2@qq.com
皖I(lǐng)CP備2022009963號-3