标题: 单片机12864显示屏问题, WriteCommand(AC_TABLE[8*row+col]);是什么意思啊 [打印本页]

作者: shenshaohai    时间: 2020-3-1 16:10
标题: 单片机12864显示屏问题, WriteCommand(AC_TABLE[8*row+col]);是什么意思啊
#include <reg52.h>
#include <intrins.h>
#include"LCD12864.h"
/**************************************************************


      //串/并方式控制
/*******************************************************************
              常量声明区
********************************************************************/            
unsigned char code AC_TABLE[]={                                           //坐标编码
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,
0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
};


void PutStr(unsigned char row,unsigned char col,unsigned char *puts)
{   
        WriteCommand(0x30);
        WriteCommand(AC_TABLE[8*row+col]);
        while(*puts != '\0')
        {
                if(col==8)
                {
                        col=0;
                        row++;
                }
                if(row==4) row=0;
                WriteCommand(AC_TABLE[8*row+col]);
                WriteData(*puts);
                puts++;
                if(*puts != '\0')
                {
                        WriteData(*puts);
                        puts++;
                        col++;
                }  
        }
}

这个        WriteCommand(AC_TABLE[8*row+col]);是什么意思啊 这个坐标怎么弄

作者: 黎明初至    时间: 2020-3-2 14:27
8*row+col;一共4行 8列。每行8列。
row行,col列
例如row=2,col=3
AC_TABLE[8*row+col]=AC_TABLE[8*2+3]=0x93,即向LCD写入0x93命令。
作者: adject    时间: 2020-3-2 17:21
这个是st7920的12864屏 坐标对应的汉字显示的坐标 16*16的汉字 12864 可以显示横向 8个 纵向4个汉字
作者: shenshaohai    时间: 2020-3-2 21:35
黎明初至 发表于 2020-3-2 14:27
8*row+col;一共4行 8列。每行8列。
row行,col列
例如row=2,col=3

为什么AC_TABLE[8*2+3]等于0x93啊 这里不明白
作者: haierzaifei11    时间: 2020-3-3 10:07
为什么AC_TABLE[8*2+3]等于0x93啊?
作者: shenshaohai    时间: 2020-3-3 15:53
haierzaifei11 发表于 2020-3-3 10:07
为什么AC_TABLE[8*2+3]等于0x93啊?

应该等于多少




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1