可能是我找错方向了,我一直在搜时钟,所以都无法使用,现在改为万年历就有好多例子 ,但好多都是并口的,不知有没有串口的示例, 下面是本论坛下载的一个程序,看 这个程序是否可以做3232的字体,但看字面意思好像是图片,应该和字库是一样的吧
void displaypicture_12864(uchar y,uchar x,uchar *picture,uchar hight,uchar wide)
{
uchar line,row;
writecom_12864(0x36);
if(wide%8==0)
{
wide=wide/8;
}
else
{
wide=wide/8+1;
}
for(line=0;line<hight;line++)
{
if(y+line>31)
{
writecom_12864(0x80+y+line-32);
writecom_12864(0x80+x+8);
}
else
{
writecom_12864(0x80+y+line);
writecom_12864(0x80+x);
}
for(row=0;row<wide;row++)
{
writedat_12864(picture[line*wide+row]);
}
}
writecom_12864(0x30);
} |