Beagle-XM GPIO as input

Dear all,

I have been trying to find information how to use GPIO as input but so
far I have not found anything I could really understand.

Is there a simple way to use BB-XM expansion port GPIO pins in input
mode? Output mode is working easily with echo xxx > export etc...

Best regards,

Mikko

Hello Mikko,
normally, I write a C code setting the GPIOs registers which are
mentioned in Chapter 24 of the "OMAP35xx Applications Processor,
Technical Reference Manual". However, it should also work with a shell
script. I suggest that you take a look in topic 3 of the following
website:

http://bbfordummies.blogspot.com/2009/07/1.html

Best regards,
Frederico

Hi Mikko,

Thank you for answer freddylima & Juha.

> Same sysfs interface works for input:

echo XXX > export ; echo in > gpioXXX/direction ; cat gpioXXX/value

Great, it was easy after all!
As far as I understand the input GPIO external port signal have to be
1.8V, if possible, can you confirm this?

-Mikko

Thank you for answer freddylima & Juha.

Same sysfs interface works for input:

echo XXX > export ; echo in > gpioXXX/direction ; cat gpioXXX/value

Great, it was easy after all!
As far as I understand the input GPIO external port signal have to be
1.8V, if possible, can you confirm this?

Yes, all the GPIO signals on the expansion header are 1.8V.

Hi Fellows!

I am using the GPIO lines both as outputs and inputs. To convert the levels you have three choices:

  1. Lowest cost, a resistor divider to convert 5V or 3V3 to 1.8 V in INPUT mode (only).
  2. A level translator such as TI SN74LCC8T245. 8 lines, all as inputs or outputs at any time.
  3. “Automatic” translators available from ADI and TI. Each line “knows” its direction.

Pricewise 2 is maybe 5 times the cost of 1 and 3 is double that of 2 - if my memory serves me…

siñ