国产成人AV一区二区三区在线_国产成人精品无码免费看_国产成人无码无卡在线观看_国产精品成人A区在线观看_国产日韩精品欧美一区_国产亚洲精品自在久久蜜TV_久草热久草热线频97精品_久久久噜噜噜久久中文福利_久久婷婷五月综合色国产免费观看_日日狠狠久久偷偷色综合0,九一桃色在线观看,久久97精品久久久久久久不卡,国产成人精品亚洲精品

引用LCD_WriteCGRAM(*str);報(bào)錯(cuò):非法指針轉(zhuǎn)換

訪客2025-01-18 06:08:041

#include<reg51.h>#include"delay.h"#include"LCD1602.h"void LCD_WriteCGRAM(unsigned char *str);void main(){unsigned char str[]={0x00,0x00,0x1f,0x00,0x00,0x00,0x00,0x00};//字符“一”的代碼LCDInit();DelayXms(10); //多給1602一點(diǎn)時(shí)間,,讓它空閑下來LCD_WriteCGRAM( *str); while(1);}void LCD_WriteCGRAM(unsigned char *str){unsigned char i; LCDWriteCMD(0x40);//1,、找到字符存入CGRAM(字符發(fā)生存貯器)的首地址,,準(zhǔn)備寫入自建字符for(i=0;i<8;i++) //2,、寫入1個(gè)字符代碼到0x40-0x47H地址中{LCDWriteDate(str[i]);} LCDWriteCMD(0x80|0x05);//3、找到字符寫入DDRAM(數(shù)據(jù)存貯器)的地址,,準(zhǔn)備顯示LCDWriteDate(0x00); //4,、寫入自定義字符在CGROM中的代碼,找到字符}

你的

LCD_WriteCGRAM( *str);

錯(cuò)了,,調(diào)用函數(shù)時(shí),,要指針,不能加*了

正確的

LCD_WriteCGRAM( str);

文章評(píng)論