16x16和32x32字符显示例程

16x16和32x32字符显示例程

ID:47103294

大小:58.50 KB

页数:12页

时间:2019-08-03

16x16和32x32字符显示例程_第1页
16x16和32x32字符显示例程_第2页
16x16和32x32字符显示例程_第3页
16x16和32x32字符显示例程_第4页
16x16和32x32字符显示例程_第5页
资源描述:

《16x16和32x32字符显示例程》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、#include"reg52.h"#defineWINDOW_XADDR_START0x0050//HorizontalStartAddressSet#defineWINDOW_XADDR_END0x0051//HorizontalEndAddressSet#defineWINDOW_YADDR_START0x0052//VerticalStartAddressSet#defineWINDOW_YADDR_END0x0053//VerticalEndAddressSet#defineGRAM_XADDR0x0020//GRAMHorizontalAddressSet

2、#defineGRAM_YADDR0x0021//GRAMVerticalAddressSet#defineGRAMWR0x0022//memorywrite/*LCDcolor*/#defineWhite0xFFFF#defineBlack0x0000#defineBlue0x001F#defineBlue20x051F#defineRed0xF800#defineMagenta0xF81F#defineGreen0x07E0#defineCyan0x7FFF#defineYellow0xFFE0sbitCS=P2^4;//片选sbitRES=P2^3;//复位s

3、bitRS=P2^0;//数据/命令选择sbitRW=P2^1;//数据口使用P1/*sbitCS=P2^2;//片选sbitRES=P2^0;//复位sbitRS=P2^5;//数据/命令选择sbitRW=P2^4;*///====================================================//voidmain(void);voidR61505_Initial(void);voidshow_colour_bar(void);voidWrite_Cmd_Data(unsignedcharx,unsignedinty);voidWr

4、ite_Cmd(unsignedcharDH,unsignedcharDL);voidWrite_Data(unsignedcharDH,unsignedcharDL);voiddelayms(unsignedinttt);voidshow_photo(void);voidShow_RGB(unsignedintx0,unsignedintx1,unsignedinty0,unsignedinty1,unsignedintColor);unsignedcharcodepic[];voidWrite_Data_U16(unsignedinty);staticvoidL

5、CD_SetPos(unsignedintx0,unsignedintx1,unsignedinty0,unsignedinty1);voidClearScreen(unsignedintbColor);voidLCD_PutChar8x16(unsignedshortx,unsignedshorty,charc,unsignedintfColor,unsignedintbColor);voidLCD_PutChar(unsignedshortx,unsignedshorty,charc,unsignedintfColor,unsignedintbColor);vo

6、idLCD_PutString(unsignedshortx,unsignedshorty,char*s,unsignedintfColor,unsignedintbColor);voidLCD_PutChar8x8(unsignedshortx,unsignedshorty,charc,unsignedintfColor,unsignedintbColor);voidPutGB1616(unsignedshortx,unsignedshorty,unsignedcharc[2],unsignedintfColor,unsignedintbColor);voidPu

7、tGB3232(unsignedshortx,unsignedshorty,unsignedcharc[2],unsignedintfColor,unsignedintbColor);//================================================//voidmain(void){CS=1;delayms(5);RES=0;delayms(5);RES=1;delayms(5);R61505_Initial();while(1){ClearScreen(Blue);//清屏//show_colour_bar();LCD_Put

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。