//using array with seven segment 06-09-22
void setup() {
// put your setup code here, to run once:
volatile char *dir;
dir = 0x30;
*dir = 0xFF;
dir = 0x107;
*dir = 0xff;
}
void loop() {
// put your main code here, to run repeatedly:
volatile long i,j,k;
volatile char *out;
out = 0x108;
*out=0x01;
out = 0x31;
volatile char num[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x67};
for(i=1;i<10;i++)
{
*out = num[i];
for(j=0;j<400000;j++);
if(i == 9)
{
out = 0x108;
*out =0x02;
out= 0x31;
for(k=1;k<10;k++)
{
*out = num[k];
for(j=0;j<400000;j++);
}
}
}
}