On Tue, 17 May 2005 05:31:46 -0700, Rajiv Ghanta wrote:
hi there,
my current project involves designing a circular sonar-sensor array to be
incorporated onto a mobile robot. the hardware design i had in mind was
simple - the sensors would communicate with a PIC via I2C, which would
then transmit the readings to the laptop on the robot. i managed to
implement the I2C interface between the PIC and the sensors. i now need
to establish communication between the PIC and the laptop on the robot.
the laptop has two ports, a USB port and a parallel port. i'm pretty sure
it's much easier to try to develop a parallel port interface. could
somebody guide me through this process? i don't know if this complicates
matters, but the laptop on the robot is running a real-time operating
system called QNX. if there are any other details i can provide, please
let me know.
I'm not at all familiar with QNX - you'd have to look up parallel port
drivers, but implementing a parallel interface is almost trivial. Heck,
it might even let you talk directly to the hardware, albeit you'd still
need a device that you can take ownership of, if you're multitasking.
Check some of these references:
http://www.google.com/search?q=PC+parallel+port+interface
That should tell you everything you need to know on the PC/hardware side.
In a nutshell, you need one 8-bit bidirectional port on the PIC - I
haven't actually used a PIC, but I'm sure they have at least 8 parallel
lines, and at least one handshaking input and one handshaking output.
There are five handshaking lines on the PC, so you can do pretty much
anything you want to, like,
"I have data"
"I'm ready for data"
"OK, here's the data"
"Got it!"
"OK, got your ack."
<idle>
Which you can do both directions.
Hope This Helps!
Rich