51单片机关于数组处理的问题?
现在有100个数组,每个数组有6个元素。用矩阵数组还是用普通的数组写在程序里。还有就是用了矩阵数组该怎么读出来。如果用一般的数组,可以读出来,但是代码很多。能不能简化下!...
现在有100个数组,每个数组有6个元素。用矩阵数组还是用普通的数组写在程序里。还有就是用了矩阵数组该怎么读出来。如果用一般的数组,可以读出来,但是代码很多。能不能简化下!谢谢。
展开
展开全部
unsigned char code ASII_DATA[14][7]={//这个是举例的14x7的二维素组,你想用就把14改成100,7改成6就行啦!
//-
{0X1F,0X1F,0X1F,0X11,0X1F,0X1F,0X1F},
//,
{0X00,0X00,0X00,0X00,0X00,0X00,0X00},
///
{0X1F,0X1F,0X1F,0X1F,0X1F,0X1F,0X1F},
//0
{0X11,0X0E,0X0C,0X0A,0X06,0X0E,0X11},
//1
{0X1B,0X13,0X1B,0X1B,0X1B,0X1B,0X11},
//2
{0X11,0X0E,0X1E,0X1D,0X1B,0X17,0X00},
//3
{0X11,0X0E,0X1E,0X11,0X1E,0X0E,0X11},
//4
{0X19,0X15,0X0D,0X0D,0X00,0X1D,0X1D},
//5
{0X00,0X0F,0X0F,0X01,0X1E,0X1E,0X01},
//6
{0X11,0X0E,0X0F,0X01,0X0E,0X0E,0X11},
//7
{0X00,0X1E,0X1E,0X1D,0X1B,0X17,0X17},
//8
{0X11,0X0E,0X0E,0X11,0X0E,0X0E,0X11},
//9
{0X11,0X0E,0X0E,0X10,0X1E,0X0E,0X11},
//:
{0X1F,0X1B,0X1B,0X1F,0X1B,0X1B,0X1F}};
//读法
for(i=0;i<100;i++)
{
for(j=0;j<6;j++)
A= ASII_DATA[i][j];
}
//-
{0X1F,0X1F,0X1F,0X11,0X1F,0X1F,0X1F},
//,
{0X00,0X00,0X00,0X00,0X00,0X00,0X00},
///
{0X1F,0X1F,0X1F,0X1F,0X1F,0X1F,0X1F},
//0
{0X11,0X0E,0X0C,0X0A,0X06,0X0E,0X11},
//1
{0X1B,0X13,0X1B,0X1B,0X1B,0X1B,0X11},
//2
{0X11,0X0E,0X1E,0X1D,0X1B,0X17,0X00},
//3
{0X11,0X0E,0X1E,0X11,0X1E,0X0E,0X11},
//4
{0X19,0X15,0X0D,0X0D,0X00,0X1D,0X1D},
//5
{0X00,0X0F,0X0F,0X01,0X1E,0X1E,0X01},
//6
{0X11,0X0E,0X0F,0X01,0X0E,0X0E,0X11},
//7
{0X00,0X1E,0X1E,0X1D,0X1B,0X17,0X17},
//8
{0X11,0X0E,0X0E,0X11,0X0E,0X0E,0X11},
//9
{0X11,0X0E,0X0E,0X10,0X1E,0X0E,0X11},
//:
{0X1F,0X1B,0X1B,0X1F,0X1B,0X1B,0X1F}};
//读法
for(i=0;i<100;i++)
{
for(j=0;j<6;j++)
A= ASII_DATA[i][j];
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询