//connect 8 leds to port A and 8 push button switches to port button
//Press 1st switch and 7th switch one by one; glow 5th led for 30 sec
#include "ecen.h"
void setup(){
init_portA();
init_portB();
}
void loop(){
uint8_t in;
volatile long j;
in = inputB();
if(in == 0x02){
for(j=0;j<=50000;j++);
while(inputB()==0x00);
if(inputB() == 0x80){
outputA(0x02);
delay_ms(300);
outputA(0x00);
}
}
}