//my firsr 8x8 dot_matrix display test 25-12-2022-07-01-23
//0 to 9 and ana
#define DELAY 10000
void setup() {
// put your setup code here, to run once:
volatile char *dirf,*dirk;
volatile char *outf,*outk;
volatile long i,j;
volatile char onedir[]={0x3f,0x00,0xfc,0xfc,},twodir[]={0x7f,0x8f,0xf7,0xf9,0xfe};
volatile char onedata[]={0x60,0x18,0x60,0x06},twodata[]={0x3c,0x04,0x3c,0x20,0x3c};
volatile char threedir[]={0x7f,0x8f,0xf7,0xf9,0xfe,},fourdir[]={0x07,0xf7,0x01};
volatile char threedata[]={0x38,0x04,0x3c,0x04,0x3c},fourdata[]={0x20,0x1c,0x02};
volatile char fivedir[]={0x7f,0x8f,0xf7,0xf9,0xfe},sixdir[]={0x7f,0x8f,0xf7,0xf9,0xfe,0xf0};
volatile char fivedata[]={0x3c,0x20,0x3c,0x04,0x3c},sixdata[]={0x3c,0x20,0x38,0x20,0x38,0x04};
volatile char sevendir[]={0x7f,0x80},eightdir[]={0x7f,0x89,0xf6,0x89};
volatile char sevendata[]={0x3c,0x04},eightdata[]={0x18,0x20,0x18,0x04};
volatile char ninedir[]={0x77,0x8f,0xf8},zerodir[]={0xbd,0xc3};
volatile char ninedata[]={0x18,0x24,0x04},zerodata[]={0x3c,0x42};
volatile char anadir[]={0x9f,0xEf,0xf7,0xfB,0x83,0x00,},anadata[]={0x38,0x10,0x7f,0xf8,0x04,0x01};
dirf = 0x30; dirk = 0x107;
*dirf = 0xff; *dirk = 0xff;
outf= 0x31; outk = 0x108;
while(1)
{
*outk=0x7f;
*outf=0x40;
for(j=0;j<DELAY;j++);
*outk=0xBF;
*outf=0xA0;
for(j=0;j<DELAY;j++);
*outk=0xDf;
*outf=0xE0;
for(j=0;j<DELAY;j++);
*outk=0xEF;
*outf=0xA0;
for(j=0;j<DELAY;j++);
}
}
void loop() {
// put your main code here, to run repeatedly:
}