|
 |
05-07-2008, 11:02 PM
|
#1
|
|
Newbie
Join Date: Apr 2008
Location: Baghdad, Iraq/Fort Bragg, NC/Saginaw, MI
Posts: 27
|
Info Request:
Ok, now that I have some spare time (finished re-writing the drivers for my Servo controller and GPS, to my liking)
Does anyone have the specifics on the Fusion Brain drivers? IE, are they simply FTDI to COM port, or is there more to them?
Also, does anyone have a protocol layout of the FusionBrain? I.E, what it can accept/transmit... source for the PIC would be awesome (I had to write drivers for my Servo controller via trial & error, with a little bit of help from a serial port listener, to find out what it was really sending/receiving =D
Nothing against the coders that made the drivers, but being that I have ALOT running through the laptop I run in my car, I'd prefer keep the interfaces as streamlined as possible.
BTW- FYSA- Visual Basic's MSComm thing-a-ma-bob needs encoding set to default, manually, to comunicate with 90% of the serial devices... took me almost a week to figure out why numbers above 127 were getting jarbled.
Also, I don't have an FB onhand yet, but do they run through a simple USB to Serial converter, and come up as a COM port? if so, I think I already have the answer to this one =D
For clarification, this is what I understand so far:
The FB comes up as a COM port; it receives and sends the same 64 byte chunk, the format is identical both ways:
bytes:
0-11: Relay Status
12-31: Analog In Status
32: Digital In Status
33-60: Zeros
61: 255/FF/11111111...
62: Fusion Brain version byte 1
63: Fusion Brain version byte 2
Relay Status is a 1 byte value in the format:
ccccccba
a: status 1=on,0=off
b: keepalive 1/0
c: timeout value 0-63
Analog In Status is in a 2-byte value, in the format:
aaaaaaaa,aa000000
a: 10-bit integer, 0-1023, 0=0v, 1023=5v
Digital In Status is all rolled into 1 byte, (I'm not 100% on the exact positioning of the bits, but have been told:
0aaaa000
a: Digital In 1,2,3,4: 1=on,0=off
Byte 61: required by the PIC to be 255, some sorta keepalive type thing - any additional info?
Bytes 62&63: major & minor version of the Firmware on the PIC- any additional info? IE, anything specific to look for, where the protocol changed?
How far off am I?
Thanks Again,
Mike
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
05-07-2008, 11:08 PM
|
#2
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,439
|
Low level interface: http://www.mp3car.com/vbulletin/docu...-protocol.html
Interfacing with the DLL: http://www.mp3car.com/vbulletin/docu...ion-brain.html
The Fusion brain does not use a FTDI chip. It does not produce a virtual COM port. The PIC uses a built in USB controller.
And the DLL that we distribute is a managed wrapper for WinUSB.dll.
WinUSB.dll is a Microsoft genuine driver. There is no extra overhead by using our driver. If you want to interface with winusb directly, go ahead but it is a pain in the ***. Especially handling exceptions/connects/disconnects.
|
|
|
05-09-2008, 10:48 AM
|
#3
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,439
|
Did that help you out?
|
|
|
05-09-2008, 11:15 AM
|
#4
|
|
Newbie
Join Date: Apr 2008
Location: Baghdad, Iraq/Fort Bragg, NC/Saginaw, MI
Posts: 27
|
Well, it answered one of my questions, but not in the way I would have liked =D
am I correct on the digital in and analog in parts? the .doc is wrong about the analog ins, but I havn't heard anything about the digital ins,, and I don't really see why you'd put them smack in the middle of the byte like that...
Thanks
Mike
|
|
|
05-09-2008, 11:24 AM
|
#5
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,439
|
How is the doc wrong with the analogue?
Also digital ins will be discontinued on the next Fusion Brain. But yes they are in the middle of the byte just like that.
Yes what you have for digital outs is correct as in the doc.
As for byte 61, it is not a keep alive, it is more of a "turn on" signal. If this byte never goes high, the brain will never turn on. Standard practice for me is to continue to send that byte as high incase it disconnects without knowing and reconnects really fast. You never know.
the firmware bytes at the end, pretty much are for our internal use as it is not incremental for each revision. It is sort of like a batch number.
|
|
|
05-10-2008, 07:40 AM
|
#6
|
|
Newbie
Join Date: Apr 2008
Location: Baghdad, Iraq/Fort Bragg, NC/Saginaw, MI
Posts: 27
|
in REF: to the Analog in; in the documentation, it has the bit positions listed backwards... now I see where it makes sence..
I have worked with alot of direct memory access programs in the past, and I have always considered the LSB to be bit 7, and the MSB to be 0.. my bad
Thanks
Mike
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:26 AM.
| |