// Connect four LEDs to port A bit 0 to bit 3. Glow LSB 4 LEDs only (bit 0 to bit 3)
#include <stdint.h>
#define aport (*(volatile uint8_t*)0x22)
#define addr (*(volatile uint8_t*)0x21)
void setup() {
// put your setup code here, to run once:
addr |= (1<<0) |(1<<1) | (1<<2) | (1<<3);
}
void delayy(void){
volatile uint32_t i;
for(i = 0; i < 100000; i++);
}
void loop() {
// put your main code here, to run repeatedly:
aport |= (1<<0) |(1<<1) | (1<<2) | (1<<3);
delayy();
aport &= ~((1<<0) | (1<<1) | (1<<2) | (1<<3));
delayy();
}