I meet problems:
- how to make all IO as input pull up??? like
P0DIR=0xFF;
P1DIR=0xFF;
P0CON = 0x50;
P0CON = 0x51;
..........??
how can I make all pins pull up? it seems only one pin can be pull up.
-
how can I enable all pins wake up when LOW? the key will connect pin to GND when pressed.
OPMCON= 0x00; // unlock needed?
WUOPC0 = 0XFF;// WUOPC1 = 0XFF;// OPMCON = 0x06;// lock?
-
how to enter standby? like following?
PWRDWN = 0x04;
delay(100); ................
-
is read the pin value like this?
unsigned char pin0value= P0;
unsigned char pin1value= P1;
the pin value I read is in change(not pull up all pins sucessfully?)
This is a simple function but I still can not make it working.......... so please help.