AnsweredAssumed Answered

LPC1347 VIL and VIH

Question asked by Mateusz Kiełbasa on Sep 7, 2017
Latest reply on Sep 10, 2017 by Kerry Zhou

Hi!,

 

I am a newbie and I am trying to understand Voltage Input Low (VIL) and Voltage Input High (VIH). I am using LPC1347 board. As the documentation says (http://www.nxp.com/docs/en/data-sheet/LPC1315_16_17_45_46_47.pdf ) the VIL equals 0.3VDD and VIH equals 0.7VDD. VDD equals 3.3V (The multimetr shows 3.22V), thus the VIL should be 0.966V and VIH 2.254V (approximately). I created simple program to check it out. The program switch on the board LED when PIN8 is HIGH. I also connected a potentiometer to change voltage on PIN8 dynamically and a multimeter to check current voltage. This program works, but... The LED turns on when voltage on PIN8 is about 1.6V. Lower voltage turns off the LED. So how to understand it?

When voltage is between VIL ans VIH it is floating. It may bounce arbitrarily between HIGH and LOW. So it is the reason that the PIN8 is still HIGH?

 

I will be greatfull for any answer!

Have a nice day!

 

 

int main(void) {

 

#if defined (__USE_LPCOPEN)
   // Read clock settings and update SystemCoreClock variable
   SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
   // Set up and initialize all required blocks and
   // functions related to the board hardware
   Board_Init();
   // Set the LED to the state of "On"
   Board_LED_Set(0, true);
#endif
#endif

 

   LPC_GPIO_PORT->DIR[0] &= ~(1 << 8);
   LPC_IOCON->PIO0[8] = IOCON_FUNC0 | IOCON_MODE_PULLDOWN;

   while (1) {
      if (LPC_GPIO_PORT->B[0][8] == 1) {
         LPC_GPIO_PORT->B[0][7] = 1;
      } else {
         LPC_GPIO_PORT->B[0][7] = 0;
      }
   }

   return 0 ;
   }

Outcomes