Fastest way to communicate with a PC
FredBlais
Posts: 380
Hi, I need to send three LONG values and receive three LONG values at a constant·rate of exactly 1kHz between the prop and a PC. Is the full duplex serial object is able to do it? What is the fastest known way of passing values btw a pc and the prop (if I wanted a comm faster than 1kHz)?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Let's not bicker and argue about who killed who."
115200 / 32 'bits per long long =
3600 / 3 'three longs = 1200hz
[noparse][[/noparse]edit]
oops, dave already got this one
Post Edited (laser-vector) : 8/3/2010 7:56:01 PM GMT
Dave, could you explain the (10 bits/byte) part?
Hahaha, indeed, it looked really strange [noparse]:)[/noparse]
Jason
I'm seeking a project for my final year EE, and I was wondering if developing an haptic feedback system with the prop would be do-able. I have recently worked with professional haptics, but they cost in the 10k-40k$ range. see
www.sensable.com/documents/images/PhantomDesktop_Large.jpg
These are 6-7 degree of freedom devices. A 3 dof system would need to send XYZ position to a remote computer and receive force feedback on the 3 dof. I've been told that data need to be isochronous at 1kHz for the system to behave realistically. On the computer side, scene graph API exist to use the haptic device. see www.h3dapi.org/
back to data transfer, I still wonder if the full duplex serial can do it. or maybe Micah usb host? Maybe there is an interface chip that could handle high speed serial transfer like firewire...
Post Edited (FredBlais) : 8/4/2010 2:37:43 AM GMT
PropBasic can send it at 230K4 Baud with a 5MHz xtal PLL set to 80MHz......TX_Baud CON "T230400"
I think this will catch/send all 3 longs in the time frame your after.
You'll need a buffer on both ends
You can also use a 6.25Mhz Xtal if code overhead slows things down.·= Prop at 100Mhz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
want speed?·want·to use the Propeller?·want to stay with BASIC___www.propbasic.com___
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Post Edited ($WMc%) : 8/4/2010 1:57:37 AM GMT
With a small scheduler and assembler code you can make a single cog do deterministic simultaneous transmit and receive at the rate Dave indicated 120,000 baud. Note however that 120,000 is not a "standard" speed for the PC, but perhaps you can live with the standard 115,200, and all will be well. I trust that transmitting and receiving will be simultaneous.
If you are interested in this approach, I can guide you to achieving this..... I could, but probably should not write the code for you as that way you will not learn as much. But surely I can get you there.
P.S. The fastest deterministic speed is about 5 Megabytes per second; one cog for transmit and one for receive. Not sure how that ligns up with the available PC speeds.
Cheers,
Peter (pjv)
Post Edited (pjv) : 8/4/2010 2:18:13 AM GMT
J