You are not logged in.

#1 2005-06-19 00:37:27

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 481

Interfacing a microcomputer via USB

I need to move a lot of data from an ADNS-3080 to an 8051 class microcomputer, out to an x86 computer running windows or linux.

Here's my problem:

I've never written device drivers before. I need to make a windows driver or a linux kernel module that will allow me to capture video, and then write the appropriate code on the 8051 microcomputer to interface with that driver.

Anybody know of a good resource for a driver writing newbie?

Offline

#2 2005-06-19 10:59:02

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Interfacing a microcomputer via USB

For info about USB: http://www.linux-usb.org/
Handy kernel source browser: http://lxr.linux.no/source/

The Linux Device Drivers book: http://lwn.net/Kernel/LDD3/

Offline

#3 2005-06-19 15:37:56

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 481

Re: Interfacing a microcomputer via USB

Thank you sir, those look like excellent information sources.

I know this is a Linux forum, but does anybody know about the flip side of the computing coin? I'm hoping to be able to have support in both Windows and Linux.

Offline

#4 2005-06-19 18:50:46

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Interfacing a microcomputer via USB

If you bought Windows you've also bought support for it. Try those channels instead.

Offline

#5 2005-06-19 20:45:23

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Interfacing a microcomputer via USB

Rofl. Nobody at MS tech support is going to know anything about device drivers!  The extent of their knowledge will be "That seems like a driver problem, please content the developer of the driver." ;-)

Dusty

Offline

#6 2005-06-19 20:48:32

z4ziggy
Member
From: Israel
Registered: 2004-03-29
Posts: 573
Website

Re: Interfacing a microcomputer via USB

u might wanna try the M$ DDK for drivers samples.

Offline

#7 2005-06-19 21:22:21

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 481

Re: Interfacing a microcomputer via USB

I've started reading the linux information posted above, and so far this is really a lot simpler than I thought it would be. I've given up trying to do the windows route. I just installed arch on my logic lab computer, triple boot with win98 and winxp.

Offline

#8 2005-06-19 21:47:11

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 481

Re: Interfacing a microcomputer via USB

btw, in case anybody cares, here's my setup. Upper left is a 5v homebrew power supply. Middle left is the 8051 class computer, complete with external flash, ram, and port expander. Middle is a simple breadboard for various glue. Lower right is a freebie mouse from an AMD tech tour, based on an ADNS-2051 chip.

http://www.mstcforum.com/uploads/images … 51-001.jpg

And here's what coarse grained cloth looks like to an optical mouse:

http://www.mstcforum.com/uploads/images … 51-001.jpg

It's the crossing of two threads, the white spot is the high point at the overlap.

Offline

#9 2005-06-19 22:59:12

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Interfacing a microcomputer via USB

woah... optical mouse tricks? what are you doing exactly, I'm curious... if you're doing alot of signal processing, I'd suggest a more specific DSP chip over a general computer... the TIs are good for that

Offline

#10 2005-06-20 01:16:28

kleptophobiac
Member
From: Sunnyvale, CA
Registered: 2004-04-25
Posts: 481

Re: Interfacing a microcomputer via USB

Nah, not doing any signal processing onboard. The 8051 is just acting as a data shuffler from the ADNS to a standard x86 computer. Agilent ADNS chips operate on a very simple serial bus. The pictured ADNS-2051 uses a clock line and a data line (bidirectional) for communication. A read/write bit followed by seven address bits followed by a 100us pause followed by eight bits establishes the clock and address. Depending on read or write, the next eight bits on the data line are controlled by the 8051 for writes and the ADNS for reads.

The ADNS-3080 has separate TX and RX lines that make this work a little easier, so I would no longer need a CTS switch.

Anyway, I work in a metallurgy lab. We're researching the flow of metals through grooves, and how geometry and chemical diffusion (and thus alloy drift) affect flow velocities. Right now I'm using a standard CCD video camera on a C mount to capture video of events. I max 50 fps of uncompressed video - damned huge. I can't capture more than 750 frames before my system needs to flush its buffers.

The problem with this system is that flow events are not completely predictable (by visual inspection) and so capturing the flow through the groove isn't guaranteed, because I have to pounce the spacebar to start capturing, and I have a limited capture window. What's more, is that the stream of data is huge, and only a very small portion of the data is useful. Finally, at 50 fps, I only get between 4 and 6 data points.

The ADNS-3080 can capture 6400 fps, and its serial bus is fast enough to communicate a useful portion of those. I haven't been real precise about calculating exact framerate yet. Each frame is exactly 1 KB of pixel data, and it's more data than the parallel port can handle. At greater framerates and smaller resolutions, I should be able to get up to 32 data points with much greater timing precision.

I'll have a program on the host computer reading the images and stitching them into video, which I will then analyze on the host machine.

A fun project!

Offline

#11 2005-06-20 03:21:37

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Interfacing a microcomputer via USB

A fun project!

No joke...it sounds awesome! Nerdy as hell, but awesome  big_smile

Offline

Board footer

Powered by FluxBB