We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using LPC2148 for my development purpose. I am trying to set PINs 15 and 16 as input and initially make it low:
#include <lpc214x.h>
#define LED1 (1 << 10)
#define LED2 (1 << 11)
#define BUTTON1 (1 << 15)
#define BUTTON2 (1 << 16)
int main(void)
{
// Set buttons as input
IO0DIR |= ~(BUTTON1) | ~(BUTTON2);
IO0PIN |= ~(BUTTON1) | ~(BUTTON2);
}
Even though doing this I find that my LPC2148 PINs 15 and 16 are high. I am doing the right way or am missing something?