soft latching power switch
This commit is contained in:
parent
606ac5c2f8
commit
7dddcb0902
@ -95,6 +95,11 @@ int main()
|
|||||||
KeyInit();
|
KeyInit();
|
||||||
P3_4 = 0; //turn on led backlight
|
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;
|
i = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
// LOOP
|
// LOOP
|
||||||
@ -106,6 +111,10 @@ int main()
|
|||||||
for (key_i = 0; key_i < 5; key_i++){
|
for (key_i = 0; key_i < 5; key_i++){
|
||||||
LCD_OutNibble(keys[key_i]);
|
LCD_OutNibble(keys[key_i]);
|
||||||
}
|
}
|
||||||
|
//turn off?
|
||||||
|
if (keys[0] == 8 && keys[4] == 8){
|
||||||
|
P3_2 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
TERMIO_PutChar(',');
|
TERMIO_PutChar(',');
|
||||||
//counter
|
//counter
|
||||||
|
Loading…
Reference in New Issue
Block a user