AtomSoft
Well-Known Member
This code wont work:
Change it to :
I say it wont work because its always high since pulled high so you have to check for low. Did you change the definition to:
#define KeyPORT (~((PORTA>>2)&0x0F))
Code:
//--- main loop
do {
if(Button(&PORTA,2, 1, 0)) {
MainMenu();
}
else {
read_temp();
}
} while (1);
Change it to :
Code:
//--- main loop
do {
if(KeyPORT == ENTER) {
MainMenu();
}
else {
read_temp();
}
} while (1);
I say it wont work because its always high since pulled high so you have to check for low. Did you change the definition to:
#define KeyPORT (~((PORTA>>2)&0x0F))
Last edited: