51单片机的位移我看人家显示字的东西上 字体走过来走过去 是用位移吗
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 22:24:22
51单片机的位移我看人家显示字的东西上 字体走过来走过去 是用位移吗
51单片机的位移
我看人家显示字的东西上 字体走过来走过去 是用位移吗
51单片机的位移我看人家显示字的东西上 字体走过来走过去 是用位移吗
肯定不是咯,哪有那么简单的事,你以为i--就能完成呢,每行每列都在移动呢.你得把每次扫描位置都得输入进去.比如下面“我是中国人”16*16点阵.前面的函数就不说了
{
{0x04,0x20,0x04,0x20,0x44,0x42,0x44,0x41,0x7F,0xFE,0x84,0x80,0x84,0x80,0x04,0x08},
{0x04,0x08,0xFF,0x10,0x04,0xE0,0x44,0x58,0x35,0x84,0x04,0x02,0x04,0x0F,0x00,0x00},/*"我",0*/
{0x01,0x00,0x01,0x02,0x01,0x04,0x01,0x08,0x7D,0x70,0x55,0x08,0x55,0x04,0x55,0xFC},
{0x55,0x22,0x55,0x22,0x55,0x22,0x7D,0x22,0x01,0x22,0x01,0x02,0x01,0x02,0x00,0x00},/*"是",1*/
{0x00,0x00,0x00,0x00,0x3F,0xE0,0x10,0x40,0x10,0x40,0x10,0x40,0x10,0x40,0xFF,0xFF},
{0x10,0x40,0x10,0x40,0x10,0x40,0x10,0x40,0x3F,0xE0,0x10,0x00,0x00,0x00,0x00,0x00},/*"中",2*/
{0x00,0x00,0x7F,0xFF,0x40,0x02,0x50,0x12,0x51,0x12,0x51,0x12,0x51,0x12,0x5F,0xF2},
{0x51,0x12,0x51,0x92,0x51,0x72,0x50,0x12,0x40,0x02,0x7F,0xFF,0x00,0x00,0x00,0x00},/*"国",3*/
{0x00,0x00,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x30,0x00,0xC0,0x03,0x00,0xFC,0x00},
{0x43,0x80,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x04,0x00,0x00},/*"人",4*/
}
可以的也可用循环
51单片机中串行通讯方式0,还是不要在单片机的这个小范围讨论。使用串行通讯方式0,必须要外接一个移位寄存器:74LS164(或74HC595)、74LS165等。 51单片机