soft latching power switch

This commit is contained in:
Jeff Wang 2019-03-21 21:03:49 -04:00
parent 606ac5c2f8
commit 7dddcb0902

View File

@ -95,6 +95,11 @@ int main()
KeyInit();
P3_4 = 0; //turn on led backlight
//set (P3_2) as push pull output
P3_2 = 1; //latch on
P3M1 &= ~(0x4);
P3M0 |= (0x4);
i = 0;
j = 0;
// LOOP
@ -106,6 +111,10 @@ int main()
for (key_i = 0; key_i < 5; key_i++){
LCD_OutNibble(keys[key_i]);
}
//turn off?
if (keys[0] == 8 && keys[4] == 8){
P3_2 = 0;
}
TERMIO_PutChar(',');
//counter