资源描述:
《基于c51的绘图型12864图形库文件文库》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、基于c51的绘图型12864图形库文件文库基于c51的绘图型12864图形库文件文库.txt#ifndef__c51_huitu12864_h#define__c51_huitu12864_h/*voidwr_data(uchardat);//写数据voidwr_command(ucharcommand);//写指令voidqingping(ucharcs);//清屏voidwr_onebytel(ucharx,uchary,uchardat);//在第X页Y列写一字节数据voidrd_data(void);//读数据voidrd_onebytel(ucharx,uchary)
2、;//在第X页Y列读一字节数据voidpoint(ucharx,uchary,ucharzheng);//在第X行Y列写一个点(zheng=1时表示点亮,0表示熄灭;0<=X<=63,0<=Y<=127)voidmian(ucharx,uchary,ucharxx,ucharyy,ucharzheng);//从坐标(X,Y)到(XX,YY)画一个矩形面zheng=1点亮0熄灭;xx>x,yy>y//voidline(ucharx,uchary,ucharhh,ucharyy,ucharzheng);//从坐标(X,Y)到(XX,YY)画一条线zheng=1点亮0熄灭;voidb
3、iankuang(ucharx,uchary,ucharxx,ucharyy,ucharkuan,ucharzheng);//从坐标(X,Y)到(XX,YY)画一个矩形边框,kuan表示边框宽度;zheng=1点亮0熄灭;xx>x,yy>yvoidyuan(ucharx,uchary,charr,ucharzheng);//以(X,Y)为圆心R为半径画圆面,zheng=1点亮0熄灭voidyuanbiankuang(ucharx,uchary,charr,ucharkuan,ucharzheng);////以(X,Y)为圆心R为半径画圆边框,kuan表示宽度,zheng=1点亮
4、0熄灭voidfanxian(ucharx,uchary,ucharxx,ucharyy);//从坐标(X,Y)到(XX,YY)的矩形区域内数据反显voidpointf(ucharx,uchary);//点(X,Y)反显voidyuanfanxian(ucharx,uchary,charr);//以(X,Y)为圆心R为半径圆形区域内数据反显ucharrd_point(ucharx,uchary);//读(X,Y)点得数据(返回值为uchar型)voidlcd_busy(void);//判忙voidlcd_init(void);//LCD初始化*///《《《《《使用本库必须先调用
5、此函数!》》》》》#include#defineucharunsignedchar#defineuintunsignedint#definelcddataP0//数据口sbitrs=P2^0;//数据指令控制sbitrw=P2^1;//读写控制sbite=P2^2;//使能sbitcs1=P2^3;//片选1sbitcs2=P2^4;//片选2sbitrest=P2^5;//复位voidwr_data(uchardat);voidwr_command(ucharcommand);voidqingping(ucharcs);voidwr_onebytel(ucha
6、rx,uchary,uchardat);voidrd_data(void);voidrd_onebytel(ucharx,uchary);voidrd_somebytel(ucharx,uchary,ucharz);voidpoint(ucharx,uchary,ucharzheng);voidmian(ucharx,uchary,ucharxx,ucharyy,ucharzheng);voidline(ucharx,uchary,ucharhh,ucharyy,ucharzheng);voidbiankuang(ucharx,uchary,ucharxx,ucharyy,uc
7、harkuan,ucharzheng);voidyuan(ucharx,uchary,charr,ucharzheng);voidyuanbiankuang(ucharx,uchary,charr,ucharkuan,ucharzheng);voidfanxian(ucharx,uchary,ucharxx,ucharyy);voidpointf(ucharx,uchary);voidyuanfanxian(ucharx,uchary,charr);ucharrd_point(ucharx,