//01 Display Right most Top LED
//02 Display Left most Top LED
//03 Display Right most bottom LED
//04 Display Left most bottom LED
//05 Display Topmost Row all LEDs
//06 Display Bottom most Row all LEDs
//07 Display Left most Column all LEDs
//08 Display Right most Column all LEDs
void setup() {
// put your setup code here, to run once:
direction();
}
void loop() {
// put your main code here, to run repeatedly:
code();
}
//*******************************************
void delay_()
{
volatile long i;
for(i=0;i<500000;i++);
}
void direction()
{
volatile char *dirf,*dirk;
dirf = 0x30; dirk = 0x107;
*dirf = 0xFF; *dirk = 0xFF;
}
void code()
{
volatile char *outf,*outk;
outf = 0x31; outk = 0x108;
//01 Display Right most Top LED
*outf = 0x01;//R
*outk = 0xFE;//C
delay_();
//02 Display Left most Top LED
*outf = 0x80;//R
*outk = 0xFE;//C
delay_();
//03 Display Right most bottom LED
*outf = 0x01;//R
*outk = 0x7F;//C
delay_();
////04 Display Left most bottom LED
*outf = 0x80;//R
*outk = 0x7F;//C
delay_();
//05 Display Topmost Row all LEDs
*outf = 0xFF;//R
*outk = 0xFE;//C
delay_();
//06 Display Bottom most Row all LEDs
*outf = 0xFF;//R
*outk = 0x7F;//C
delay_();
//07 Display Left most Column all LEDs
*outf = 0x80;//R
*outk = 0x00;//C
delay_();
//08 Display Right most Column all LEDs
*outf = 0x01;//R
*outk = 0x00;//C
delay_();
}