// Connect 8 leds to portA. connect 8 push button switches to portB
// press the third switch--> 3rd led, delay, 1st led delay, 7th led, delay, 4th led
#include "ecen.h"
void setup(){
init_portA();
init_portB();
}
void loop(){
volatile long k;
if(inputB() == 0x08){
outputA(0x08);
for(k=0;k<=200000;k++);
outputA(0x02);
for(k=0;k<=200000;k++);
outputA(0x80);
for(k=0;k<=200000;k++);
outputA(0x10);
for(k=0;k<=200000;k++);
}
else{
outputA(0x00);
}
}