例如0xc3,0xc3,0xc3,0xc3,0xc3,0xe7,0xe7,0xff萌新只知道这是代表一帧的图像却不懂为什么是这样应该怎么才能知道他在这一帧代表的图像什么样的源代码这样的的时候他的图像是一个方向向左从右到左的箭头,那么如果想让它变为箭头方向向右从左往右应该怎么修改代码呢?希望大佬指点,谢谢
#include<stdio.h>#define uchar unsigned char
#define uint unsigned int
sbit RCK_PIN=P3^2;
char code DSY_CONTENT_8X8[]=
{
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf7,0xe3,0x81,0x00,0xc3,0xc3,
0xc3,0xc3,0xc3,0xc3,0xc3,0xe7,0xe7,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
uchar Scan_bit=0x01;
uchar Offset,Data_Index=0;
void Delay_MS(uint x)
{
uchar i;
while(--x)
for(i=0;i<120;i++);
}
void int0()interrupt 1
{
TH0=-1000/256;
TL0=-1000%256;
Scan_bit=_cror_(Scan_bit,1);
putchar(Scan_bit);
while(TI==0);
putchar(DSY_CONTENT_8X8[Offset+Data_Index+8]) ;
while(TI==0);
putchar(DSY_CONTENT_8X8[Offset+Data_Index]) ;
while(TI==0);
Data_Index=(Data_Index+1)%8;
RCK_PIN=1;
RCK_PIN=0;
}
void main()
{
TMOD=0X01;
IE=0X82;
TH0=-1000/256;
TL0=-1000%256;
TCON=0X00;
TI=1;
while(1)
{uchar i;
for(i=0;i<32;i++)
{Offset=i;
TR0=1;
Delay_MS(50);
TR0=0;
}
}
}
|