This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

5V INPUT TOLERANT IN LM4F232

I READ IN DATASCHEET :

GPIO signals have alternate hardware functions. The following table lists the GPIO pins and their analog and digital alternate functions. All GPIO signals are 5-V tolerant when configured as inputs except for PB0 and PB1, which are limited to 3.6 V.

For read input with 5v is just setting for example :

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG); 

GPIOPinTypeGPIOInput(GPIO_PORTG_BASE ,  GPIO_PIN_2 );

 

????????

  • You've gotten 2 of 3 - to read the Port/Pin you will need, "GPIOPinRead()" or its ROM version.

    If you know that many/most of your input signals are indeed 5V - may prove beneficial to employ resistive divider to limit the level "felt" @ MCU to 3V.  In addition - the series R in this combination serves to further protect MCU's input. 

    Size/cost savings by relying upon MCU's, "input protection" circuitry may prove poor investment.  Such MCU components/structures are normally intended for brief signal excursions - may suffer if subjected to extended inputs in excess of VDD.  (our experience) 

    Further - by providing this "extra" protection - you can easily accommodate the input of higher level signals - and I bet you that day will arrive.  You'd accommodate these higher level inputs by changing either the series or ground tied R - or both.  At the minimum - you could provide for 2 such R's per input - and order DNF for the ground one and install a 0-ohm for the series R.  (still - I'd protest)

    Same resistive, voltage divider technique insures proper input into the more limited Port B pins...