void setup() {
// put your setup code here, to run once:
volatile char *dira, *dirb;
dira = 0x21; dirb = 0x24;
*dira = 0xFF; *dirb = 0xFF;
volatile char *outa, *outb;
volatile long i, j;
outa = 0x22; outb = 0x25;
while (1) {
for (i = 0; i < 8; i++) {
unsigned char p = 1 << i;
unsigned char q = 1 << 7 - i;
*outa = (p); *outb = ~(q);
*outa = 0x00;
*outb = ~(0x00);
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}