Part Number:TDC1000-C2000EVM
Hi!!! Everybody!!
I'm trying to attach 1 on/off keypad to GPIO3 of J6. As shown in the picture below;
I connected tried to short GPIO3 and GND but nothing happens. This is my code (whole code). ScanKeyPads() is called in "while" loop of the main.
#define KEYPAD_PxOUT P4OUT //Port4
#define KEYPAD_Px_IN P4IN //Port4
#define KEYPAD_PxDIR P4DIR //Port4
#define KEYPAD_PxSEL P4SEL //Port4
#define KEYPAD1_PIN BIT4 //P4.4 -->J6.GPIO3
#define KEYPAY2_PIN BIT5 //P4.5 -->J6.GPIO4
void ScanKeyPads()
{
if ((KEYPAD_Px_IN>>5)&0)
{
while(1);
}
}
Please let me know how to achieve this.
Also,
Is it good to call it in while loop of main?
because 1. The LCD (via I2C) is flickering. 2. The measurement result is introduced because of it.
Please help me again!!! I always thank you for your helps..
Best Regards,
Suh, Sukho