• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: USB GPIO  (Read 6445 times)
pauldy
Newbie
*

Karma: 0
Posts: 17


View Profile
« on: April 13, 2009, 04:08:07 PM »

I'm looking to see if anyone has found any cheap USB accessible GPIO that might work with this device.  I came across a few options most of them very expensive for what you get.

http://www.fivemanconspiracy.com/node/45

This is the closest I found to what I would like to use, looks like much of the io is tied up with various functions related to the chip operation itself.  If it was pure gpio it would be perfect.
Logged

kim.toms
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #1 on: April 15, 2009, 05:27:17 PM »

A project I intend to get working is to use a one-wire network attached to the USB port, using a DS9490 as an interface.  Details of this project, including the code (written in ruby) is available at http://github.com/kim-toms/thermostat/tree/master

GPIO for the one-wire interface is available from http://hobby-boards.com/  The one-wire network is comparatively slow, so it depends on the throughput you need.  I'm going to use it to control a furnace and monitor a few thermometers.

I currently have the code working on a PC under ubuntu, the sheevaplug will let me turn that off, and use less electricity.
Logged

tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« Reply #2 on: April 15, 2009, 10:58:40 PM »

Hi,  Thanks for sharing the info!

I am interested in using my plug for a very similar purpose..

Once i get my filesystem/kernel in order, the first think i'll work on is getting the GPIO pins from the plug linked up with the kernel driver for dallas 1-wire (or i2c). That should let me do everything without any extra hardware, which is the reason i bought the plug to begin with Smiley

-tmk
Logged

karurosu
Global Moderator
Full Member
*****

Karma: 0
Posts: 116



View Profile WWW
« Reply #3 on: April 16, 2009, 09:14:52 AM »

The link you sent for the USB GPIO looks nice, one of the reason I want a sheeva plug is to develop a control computer, which needs a lot of GPIO pins.
Do you think there is a way to interface with the module (the FTDI chip) in the sheeva? (maybe with python?)
Logged

pauldy
Newbie
*

Karma: 0
Posts: 17


View Profile
« Reply #4 on: April 17, 2009, 11:59:02 PM »

I've since come across these, who knew?

http://www.ftdichip.com/Products/EvaluationKits/DIPModules.htm

It is basically the same chip used to allow the serial console on the device.  They have a version that gives access to 4 8 bit ports giving you 32 pins of io with headers that should be easy to wire wrap to for prototyping.  My only concern with these is that they only quote pricing in British pounds and I have no idea what the potential pitfalls are of ordering something overseas like that.
Logged

karurosu
Global Moderator
Full Member
*****

Karma: 0
Posts: 116



View Profile WWW
« Reply #5 on: April 18, 2009, 08:20:08 AM »

I just found an awesome device to do this:
http://www.schmalzhaus.com/UBW/index.html

With firmware D you have a virtual com port that you can instruct to read individual I/O or write to them.

The best part is that you can go to microchip's website and order some free samples, you can build your own for less than 10 usd!
Logged

pauldy
Newbie
*

Karma: 0
Posts: 17


View Profile
« Reply #6 on: April 20, 2009, 01:27:09 PM »

I just found an awesome device to do this:
http://www.schmalzhaus.com/UBW/index.html

With firmware D you have a virtual com port that you can instruct to read individual I/O or write to them.

The best part is that you can go to microchip's website and order some free samples, you can build your own for less than 10 usd!

I looked at this and looks like a viable alternative, I ended up going with the ftdi device thought after vacillating for a while over the idea they were foreign company and how much pain would be involved with the wait I searched the part number in google.  Mouser had 6 in stock 2 bucks a piece cheaper so I placed my order it just made sense as the drivers are available and ready to go.
Logged

pauldy
Newbie
*

Karma: 0
Posts: 17


View Profile
« Reply #7 on: April 21, 2009, 11:16:52 PM »

A pleasant surprise upon figuring out what pins were required to enable bus power on the device, I plug it in and am greeted with the following.

Code:
Apr 22 01:01:34 debian kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2
Apr 22 01:01:34 debian kernel: usb 1-1: configuration #1 chosen from 1 choice

I hop on in the /dev dir  and find the following files

Code:
crw-rw---- 1 root root 189,  0 Jan 27  2000 usbdev1.1
crw-rw---- 1 root root 254,  0 Jan 27  2000 usbdev1.1_ep00
crw-rw---- 1 root root 254,  1 Jan 27  2000 usbdev1.1_ep81
crw-rw---- 1 root root 189,  1 Apr 22 01:01 usbdev1.2
crw-rw---- 1 root root 254,  2 Apr 22 01:01 usbdev1.2_ep00
crw-rw---- 1 root root 254,  4 Apr 22 01:01 usbdev1.2_ep02
crw-rw---- 1 root root 254,  6 Apr 22 01:01 usbdev1.2_ep04
crw-rw---- 1 root root 254,  8 Apr 22 01:01 usbdev1.2_ep06
crw-rw---- 1 root root 254, 10 Apr 22 01:01 usbdev1.2_ep08
crw-rw---- 1 root root 254,  3 Apr 22 01:01 usbdev1.2_ep81
crw-rw---- 1 root root 254,  5 Apr 22 01:01 usbdev1.2_ep83
crw-rw---- 1 root root 254,  7 Apr 22 01:01 usbdev1.2_ep85
crw-rw---- 1 root root 254,  9 Apr 22 01:01 usbdev1.2_ep87

The ones with creation times showing 01:01 we not there before.  I will have more time to play with it tomorrow but so far it appears as if this device will make gpio on the device pretty easy if you have a wire wrap kit and don't mind connecting a few pins for bus power.  It appears as if drivers are included in the kernel.
Logged

shane
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #8 on: April 25, 2009, 09:58:09 PM »

I just received my plug and spent today getting it setup.
I plan doing some general IO using the flexel chip and the usb board.
Very cheap on ebay.
http://www.web4robot.com/USBLab.html

It has a few preconfigured modes including one with 2 14bit A2D inputs 8 general IO ports and a couple of analogue outs.

My biggest problem with this is that the plug has only one USB port.
I want to use a USB 3G broadband modem for network access and I don't want to have to use a usb hub.

I'm sure I read somewhere in the docs that there are two USB ports - is one of them simply missing a socket?

I wonder if the plug can provide sufficient power for the USB modem too.
Logged

shadowace
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #9 on: April 28, 2009, 08:44:13 AM »

There is both a standard USB port and a "mini" USB port on the plug.  Not sure if they have the same functionality.  I just got my plug yesterday and haven't played with it yet.
Logged

tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« Reply #10 on: May 02, 2009, 12:41:45 AM »

I'm looking to see if anyone has found any cheap USB accessible GPIO that might work with this device.  I came across a few options most of them very expensive for what you get.

http://www.fivemanconspiracy.com/node/45

Thought i'd update the thread; I picked up one of these modules, and so far it works well.

I /also/ got the GPIO working on the board itself, but my application would benefit from not having to cobble together an SDIO->wire interface.. something more permanent is better.

On the usb stick, there are 12 usable GPIO pins, broken into a set of 8 and a set of 4. It does not appear that you can use all 12 at once though. The first 8 are in lieu of the normal serial function, and the second 4 you can use even if you're using the rest of the chip for serial IO. To get at the second 4 you have to change the eeprom, which doesn't seem to be documented under linux. They provide a windows flasher, but i don't have a windows box to test it on.

The programming is (as the marketing indicates) easy, using libftdi. There are bit-bang examples in the libftdi distribution.

I still need to see what sort of response time i can get out of it, to see if it will work as a dallas 1-wire master. The commands are just sent over USB, so it will depend on the speed of the bus, and the baudrate that the FTDI chip is running at (when you write GPIO bits, the new state takes effect when the baud clock ticks to the next signal)

The datasheet also mentions that when in bitbang mode, the baudrate is multiplied by 4.

Quote
There is both a standard USB port and a "mini" USB port on the plug.  Not sure if they have the same functionality.  I just got my plug yesterday and haven't played with it yet.
The mini-usb is for console/jtag access, not for devices.

-tmk
« Last Edit: May 02, 2009, 12:55:20 AM by tmk » Logged

k9sql
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #11 on: May 26, 2009, 11:05:30 AM »

How about something like this:

<http://www.sparkfun.com/commerce/product_info.php?products_id=762>

About $25 US, a PIC controller, 16 GPIO lines, and a USB interface.
Logged

karurosu
Global Moderator
Full Member
*****

Karma: 0
Posts: 116



View Profile WWW
« Reply #12 on: May 27, 2009, 09:30:40 AM »

How about something like this:

<http://www.sparkfun.com/commerce/product_info.php?products_id=762>

About $25 US, a PIC controller, 16 GPIO lines, and a USB interface.


You can build your own at the link I posted a couple of post above, and you can get the chips for 7 usd at microchip.com (used to be free, but they started charging for samples), the rest, well, you can salvage an old USB drive or card reader.
Logged

Pages: [1]
Print
Jump to: