• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2]
Author Topic: Probing gpio pins from userspace using /dev/mem  (Read 18618 times)
puterboy
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #15 on: October 26, 2010, 08:02:15 AM »

But I'd need some kind of hardware device to sample the output of the pins, right?
There is no way to just try to write to a pin and see if it can be set from software? Maybe some error message if something goes wrong?
I'm not too hot with designing my own hardware  Lips sealed

Something like
Set pin 1 to 1
Read pin 1: 1. OK
Set pin 2 to 1
Read pin 2: 0. ERROR
woops, line 2 is broken.


Well the only way to tell if the read/write actually happens in hardware is by sending & sampling signals.
You can use a cheap (<$10 digital voltmeter) to measure the voltage on the pins in response to you setting them to 0/1 ( you can use my write program to send out a very slow pulse by changing the speed to say 1 sec intervals)
You can check the input by putting in alternatively 0 or 3.3 volts (2 1.5 volt batteries in series between ground and the pin will work or use the internal 3.3 (not 5v) signal if it is broken out for you on the sdio connector (or open the plug and go inside to access the 3.3v test pin somewhere).

Or you can just let the pin float if it is not attached to a pull-up/pull-down resistor and you will see the inputs change fast from 0 to 1
Logged

MarkF
Full Member
***

Karma: 7
Posts: 144


View Profile
« Reply #16 on: October 26, 2010, 11:10:15 AM »

Another possibility, if you built the interface that is pictured above in this thread, would be to loop the signals back on themselves.  IE. Attach two pins to each other and define one as in the other as out and when you change the out, the in should change. etc. Smiley
Logged

Mark

Zup
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #17 on: October 26, 2010, 11:07:43 PM »

Okay. I was thinking about maybe building the adapter in the thread and connect some LEDs. That should work right?
>But I'm not sure where to get ground. From somewhere inside the case?
Oh wait I get it. The ground pin is a pin set for input right?

About connecting pins to themselves..what if I oops and connect two set output pins to each other? That doesn't sound too good.

Guess I should check the ribbon cable between the boards first as a warm up. Just a resistance check for each pin or something.
« Last Edit: October 26, 2010, 11:20:46 PM by Zup » Logged

MarkF
Full Member
***

Karma: 7
Posts: 144


View Profile
« Reply #18 on: October 27, 2010, 05:29:50 AM »

There are power and grounds coming out of the SD card interface.  Check out this link for the SD card connector pin-out.
Logged

Mark

puterboy
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #19 on: October 27, 2010, 10:10:02 AM »

About connecting pins to themselves..what if I oops and connect two set output pins to each other? That doesn't sound too good.
Guess I should check the ribbon cable between the boards first as a warm up. Just a resistance check for each pin or something.

That is unlikely to cause permanent damage. After all, the GPIO pins are *bidirectional* by nature. As long as you stay away from too high a voltage, the pins are pretty robust.

Remember the pin voltages are 3.3V not 5V highs.
Logged

Pages: 1 [2]
Print
Jump to: