#define DELAY 1500
#define DELAY1 250000
void setup() {
// put your setup code here, to run once:
volatile char *dir1;
dir1 = 0x30;
*dir1 = 0xff;
volatile char *dir2;
dir2 = 0x107;
*dir2 = 0xff;
}
void loop() {
// put your main code here, to run repeatedly:
volatile char *row = 0x108;
volatile char *col = 0x31;
volatile int s[]={0x00,0x3c,0x04,0x3c,0x20,0x3c,0x00,0x00};
volatile int h[]={0x00,0x24,0x24,0x3c,0x24,0x24,0x00,0x00};
volatile int i[]={0x00,0x3c,0x18,0x18,0x18,0x3c,0x00,0x00};
volatile int v[]={0x00,0x00,0x42,0x24,0x18,0x00,0x00,0x00};
volatile int a[]={0x00,0x00,0x18,0x24,0x7e,0x42,0x00,0x00};
volatile int n[]={0x00,0x00,0x22,0x2c,0x32,0x22,0x00,0x00};
volatile long dely,j,k,dely1;
while(1)
for(k=0;k<7;k++)
{
for(j=0;j<8;j++)
{
if(k == 0)*row = s[j];
if(k == 1)*row = h[j];
if(k == 2)*row = i[j];
if(k == 3)*row = v[j];
if(k == 4)*row = a[j];
if(k == 5)*row = n[j];
if(k == 6)*row = i[j];
*col = ~(1 << j);
for(dely=0;dely<8000;dely++);
*row = 0x00;
*col = 0xff;
}
for(dely1=0;dely1<200000;dely1++);
}
}