Mein Programm funktioniert nun einwandfrei!
Nochmals vielen vielen Dank für deine Unterstützung! =D>
Das Problem lag wirklich an den Binären Zahlen. Für K2 und K1 habe ich nun Hexadezimalzahlen eingesetzt und siehe da, es funktioniert. Gott bin ich glücklich!!
Hier der gesammte code:
Code:
#include "asuro.h"
unsigned char taste;
int main(void)
{
Init();
while(1){
do {taste = PollSwitch();} while (taste != PollSwitch() );
if ((taste == PollSwitch()) & taste == 0x01) {StatusLED (GREEN);}
else if ((taste == PollSwitch()) & taste == 0x02) {StatusLED (RED);}
else if ((taste == PollSwitch()) & taste == 0x04) {FrontLED (ON);}
else if ((taste == PollSwitch()) & taste == 0x08) {BackLED (OFF,ON);}
else if ((taste == PollSwitch()) & taste == 0x10) {BackLED (ON,OFF);}
else if ((taste == PollSwitch()) & taste == 0x20) {BackLED (ON,ON);}
else {StatusLED(OFF);BackLED(OFF,OFF);FrontLED(OFF);}
}
while(1);
return 0;
}
Gruß zoerby
Lesezeichen