//my firsr 8x8 dot_matrix display test 25-12-2022
#define DELAY 1000
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};
dirf = 0x30; dirk = 0x107;
*dirf = 0xff; *dirk = 0xff;
outf= 0x31; outk = 0x108;
while(1)
{
*outf=twodata[0];
*outk=twodir[0];
for(j=0;j<DELAY;j++);
*outk=0xFF;
for(j=0;j<DELAY;j++);
*outf=twodata[1];
*outk=twodir[1];
for(j=0;j<DELAY;j++);
*outk=0xFF;
*outf=twodata[2];
*outk=twodir[2];
for(j=0;j<DELAY;j++);
*outk=0xFF;
*outf=twodata[3];
*outk=twodir[3];
for(j=0;j<DELAY;j++);
*outk=0xFF;
*outf=twodata[4];
*outk=twodir[4];
for(j=0;j<DELAY;j++);
*outk=0xFF;
}
}
void loop() {
// put your main code here, to run repeatedly:
}