RISC OS News on Drobe
RISC OS Search
containing
"..your knowledge seems to be below par"
Welcome back guest  |  Login  |  Register Saturday 30th August 
Login

drobe.co.uk
About Drobe
RISC OS News
Drobe Features
Alternatives
Bookmarks
Riscos.org.uk
Auctions
Events (shows)
AU issues
Tech Material
Wallpaper
Movies
File archives
SH eBooks
FAQs
Changelog

Interact
Forums
Online chat
Your webspace
BBC Emu(games!)
User gallery
RSS news &
comments
Submit news
Contact us

Quick Links
Open directory
Nutshells
ANS archives
ArcSite
RO Repository
Announce
RISCOS Ltd.
Castle

NTK
The Inquirer
The Register
OSNews
Slashdot
Google

Alternatives
NetBSD
ARM Linux
Iyonix Linux

Found Apps
 RISC OS Software !Avalanche
 RISC OS Software !Darts
 RISC OS Software !CFuncAnal
 RISC OS Software !TranTIFF+
 RISC OS Software !Dustbin
 RISC OS Software !NurseW
 RISC OS Software !Tally
 RISC OS Software !VideoLog
 RISC OS Software !USBKick
 RISC OS Software !Spr2Jpeg
Recent users
dkb is a RISC OS User dkb
tduell is a RISC OS User tduell
IanK is a RISC OS User IanK
oshvision is a RISC OS User oshvision
VinceH is a RISC OS User VinceH
DaveW is a RISC OS User DaveW
bluenose is a RISC OS User bluenose
JMBarber is a RISC OS User JMBarber
hubersn is a RISC OS User hubersn
bavison is a RISC OS User bavison


Why donate?

Serving: 15GB
Fuel: caffeine
0 users online
24 guests
150 active accts 24329 comments

Webstats

 
RISC OS News Article
Driver for USB IO kit started
Published: 7th Mar 2006, 23:40:09GMT  Source: drobe.co.uk
By Chris Williams
Page 1 of 1
Plus coping with two USB stacks
Velleman USB IO kitA draft version of a driver for a USB based hardware interface board has been produced for the Castle stack. Dave Higton was offered a Velleman IO kit as a challenge by a colleague to produce a suitable driver for. Earlier this week Dave asked for interested RISC OS using electronics enthusiasts to contact him for a copy of the software.

The kit is available from outlets such as Maplin, and is designed to control external devices and instruments from a computer. It features five digital inputs, two analogue inputs, eight digital outputs, and two analogue outputs.

Engineer Dave said: "I have managed to get it to work. But it's not finished yet."

Dave added it should be a straight forward process to produce a version of the driver software for the Simtec USB stack. Up to four units can be used at once on one computer; the limit being due to the way the boards uniquely identify themselves to the host machine.

He explained: "What I have written is a demo programme: click the icons, and watch the digital outputs go on and off - they have LEDs. For a real application, you'd want something different.

"The point of asking people with an interest to contact me is that I may be able to provide information that will help them write their applications.

"The inputs and outputs are quite standard interface levels, except that the digital outputs are from a ULN2803A, which means they are open collector Darlington outputs capable of controlling up to 50V and several hundred milliamps."

Previously, Dave produced a driver for a USB radio and controlled his central heating from an A3010.

Writing software for both USB standards
He has created USB driver software for both the Castle and Simtec stacks, which are software incompatible with each other.

Dave said: "Initialising the USB pipes is entirely different in the two stacks; the Castle one is far easier and less lines of code. The Simtec stack is not well documented in terms of examples, or in terms of a recipe of steps to go through to open, use and close a pipe."

A pipe in this case is a communications channel between the USB stack and a particular piece of functionality in the USB device, along which data and messages are exchanged. Dave also identified a fault in the Castle USB stack which made it impossible to create a pipe to a particular type of device functionality, known as an interrupt mode output endpoint. This was eventually fixed in RISC OS 5.11 allowing Dave to finish his USB radio driver.

He continued: "Sending a USB message is different in the two stacks, but the difficulty is handled by different procedures of the same name and same specification. Sending data isn't hard. Lack of documentation was an issue in both cases, though trial and error was easier with the Castle stack because it deals with streams, very much like file handling, so there aren't many options to try. Much the same comments apply to receiving data."

When a program finishes, it must release the USB related resources which it may have acquired from RISC OS. Dave also found a bug in the Castle stack which causes resources to be wasted when the USB radio is unplugged while the relevant software is still running; repeating this a couple of hundred times would result in the USB system running out of 'handles' - identification numbers attached to acquired resources - which would lead to further problems until the machine is restarted.

Dave continued: "The Simtec USB HID Input module grabs the radio and won't let go, so it is currently not possible to use this application along with a USB keyboard or mouse, for example. However, Matt Edgar at STD tells me that this is being worked on. It wouldn't surprise me if there is a new Snafu [firmware] release in the near future."

Links
Dave's website

Related articles
Early Soundblaster Live Iyonix driver released
Iyonix software speed boost driver released
PostScript 3 driver mulled

This article has been linked to, or is available in the following formats:  
 
 
 
 
 
[Printable] [Digg this] [Blog search]


piemmm(valued user) 
Face
8/3/06 7:49AM
I built one of these boards over xmas, as well as the programmer. Cool to see them making their way to RISC OS as well.
druck(valued user) 
Face
8/3/06 9:22AM
Fantastic, I'll be able to get out my boxes of scavenged electronic components which have sat in a cupboard since I used to hook them up to the BBC Micro's user and analogue ports. I never had much sucess getting complex (or even fairly simple) circuits to work, but I did managed to control motors, detect switch inputs, and display analogue meters on screen. It should be enough I/O to recreate a lego clone of the Beebs floor turtle everyone yearned for back in the 80s, but cost the earth.
davehigton (+3.2)
9/3/06 9:38PM
I've put the first Castle stack version up on my web site just now. http://www.apts04.dsl.pipex.com
davehigton (+1.0)
10/3/06 10:16PM
... and I've added the Simtec version too.
 

Top Tip

Wallpaper

Download wallpapers for your desktop and contribute your own to our database
 
Headline news
Wakefield 2008 show photos
28th Apr 2008

Wakefield 2008 show live news
26th Apr 2008

Who would want an A9home PDA?
24th Apr 2008

RISC OS 6.10 available to Select subscribers
24th Apr 2008

Gallery photo


From: Acorn Rooms

Older news
Animation and typing applications really released
24th Apr 2008

Wakefield 2008 show preview
22nd Apr 2008

R-Comp unveils new PDF authoring package
22nd Apr 2008

NetSurf bags GBP10K investment from Google
21st Apr 2008

Apple Mac VirtualRiscPC leaves beta
20th Apr 2008

Blu-ray disc burn breakthrough
14th Apr 2008

PDF import support for ArtWorks
13th Apr 2008

Wakefield 2008 show theatre line-up revealed
13th Apr 2008

Animation software collection falls into R-Comp's hands
9th Apr 2008

Features
A9home: two years on
4th Dec 2007

A9home DIY laptop: first pictures
1st Dec 2007

Software hosted by Drobe: Your guide
5th Nov 2007

 

Top | Design and concept © Fudgecake Design, 1999 - 2001. Content © The Drobe Team, 1999 - 2008. 
Click here for more information and terms and conditions.