// connect 8 leds to port A
// connect 8 push button switches to port B
// press 3rd switch --> glow 0th LED, delay,......7th led, delay
#include "ecen.h"
void setup() {
init_portA();
init_portB();
}
void loop() {
//uint8_t i;
volatile long k;
if(inputB() == 0x08){
for(int i=0;i<8;i++){
outputA(1<<i);
for(k=0;k<=200000;k++);
}
}else{
outputA(0x00);
}
}