#include "core.h"
void setup() {
init_port_F();
init_port_K();
}
void loop() {
volatile long j;
unsigned char in_K = 0x00;
char shifting;
/* Switches: [A15][A14][A13][A12][A11][A10][A9][A8]
0b00000100 -> A10 is INPUT for internal world */
/* LEDs: [A7][A6][A5][A4][A3][A2][A1][A0]
0b00001000 -> 0x08
add delay
shifting = 0
ob00100000 -> left shifting+2
add delay
0b10000000 -> left shifting+4
add delay
0b01000000 -> right shifting+3 */
/* Glow yellow LED, white LED, pink LED and purple led
sequentially when switch 3 is ON */
in_K = input_A10();
output_F(in_K);
for(j=0; j<100000; j++);
output_F(in_K << (shifting+2));
for(j=0; j<100000; j++);
output_F(in_K << (shifting+4));
for(j=0; j<100000; j++);
output_F(in_K << (shifting+3));
for(j=0; j<100000; j++);
}