Forums > MaxMSP

9-pin serial to USB

May 9, 2006 | 2:14 pm

I have been looking at this:

http://www.elixa.com/mental/ceo.htm

for a grant that I was given on brainwave research and I need to know if it’s possible to convert all the information that is coming from the serial port to usb so that Max/MSP can use it. It aparently only works on pc’s (or a virtual PC)

Thank you for any help you can give me.


May 10, 2006 | 1:35 am

I wouldn’t bother with that device. Judging by the screenshot of the software, it doesn’t look like they show you much information about it. In regards to 9-pin serial to usb there are many UART-to-USB simple bridges that i was looking at for my EEG -to- max project. If you are writing stuff yourself you can even clock down AVR’s to work directly to USB with no need for native USB support.

You can also buy serial ports for USB if you need to use this unit anyways, but the data won’t be translated into a non-mouse/keyboard HID device which is what max uses for USB data. It would simply show up as a serial port and work on the same addressses as the serial port. Your best bet is to find an external for serial use, and then point it to the address that the usb-to-serial port adaptor gives you.

But to be honest that software looks pretty lame, so it might reflect the product. I’d look into something like openEEG and build your own.

Hope this helps,

n00dle


May 10, 2006 | 2:22 am

I appreciate what you say. I think that picture might be a little deceiving/an older model. This is the same company that created the waverider

http://www.mindpeak.com/index.asp?PageAction=VIEWPROD&Pr odID=13&HS=1

I don’t quite understand what you said about the usb/serial translating into a non mouse HID. What is an HID? I could use an external of sorts. It really doesn’t matter what SORT of information I get – although a larger variety would be…tres preferable!.. I can make do with whatever works, ya know?

I checked out the openeeg and, although i would love to spend the time learning how to do it all correctly…taking into account my horrible luck with soldering normal things, let alone complex ones, I have to stay away from it. Thanks for your help.

I guess the short and sweet of it is this : what is an HID and what sort of information do you think I would get converting serial to USB and trying to have Max read it? Thanks a million


May 10, 2006 | 12:03 pm

well, in short, it just happens im struggling with this problem with MAX so you’re benefitting from my research. :)

Basically, HID is Human Interface Device – it is a subclass in USB for devices like keyboard, mouse, joysticks, etc.
the HID class was designed so that people could make simple hardware and rather than write a driver for windows to interpret it, -they- provide the specifications, and if you conform, most programs/windows will handle HID very easily.

Now, because windows sucks, it basically locks you out of useful keyboard and mouse data ( i assume because of how integrated they are into windows)

so in my case, where i wanted two keyboards plugged in at once, and have them do different things – i have to take a keyboard, and make windows ‘think’ it’s a joystick – with like 150 keys.

basically the serial to usb converter is a real non-HID device which uses it’s own driver to simulate a real serial port on the computer.

HID is only useful to you if you get fed up with what’s happening and you decide to make your own system. Basically, if you decide to build your own device and don’t have access to serial ports, you can use a serial-to-usb converter, or you can use your device and a serial-to-usb converter chip.

Either way, HID is just the easiest way of getting data easily into a program, by making your device essentially a ‘joystick’ and just ignoring the ‘type of device’.

I am building custom midi controllers and with a MEGA16 AVR microcontroller, you can run USB right off it, and thus for my laptop with no serial ports, its easier for me to import the data into max via HID(windows thinks my midi device is a joystick).

That or using a serial-to-usb converter, but then you loose speed and latency.


October 12, 2006 | 3:30 pm

hello agin, I know it’s been a long time, but I fianlly got someone to help me decode this CEO machine, and I was wondering if anyone could help me decode what he has sent me back. He is a Computer Science professor that got it all to interface, so I know it’s simple (to him at least :P) but I’m still struggling here.

Here is what he sent me

"ceo uses a very simple protocol. when you open the com port the
device will send null bytes punctuated w/ 255s. if you send it an ascii 8 (backspace (BS) ), the device will then send data from the sensors in the form of 4 bytes of data separated by 2 bytes 00 F6 (hex) (or F6 00 depending on whether your system is big-endian or little endian. if you’re using intel it’s 00 F6, i’m pretty certain a motorola chip is F6 00). sending an ascii NULL (0) puts it back in its original mode. so when you hit the start button on the software, it opens the com port and sends a BS NULL BS to insure the device is in data send mode. when you hit the stop button, it just closes the com port (doesn’t send anything to the device.)"

PS – I’m running an iBook G4

Here’s a very simple patch of what I think he’s telling me to do…but I must be wront because all I get in the max window is -status: read -1 a billion times.

max v2;
#N vpatcher 77 169 677 569;
#P window setfont "Sans Serif" 9.;
#P newex 213 49 40 196617 atoi;
#P message 301 67 32 196617 print;
#P newex 147 187 54 196617 print data;
#P message 40 75 14 196617 0;
#P newex 208 159 63 196617 print status;
#P newex 79 105 58 196617 metro 100;
#P message 147 70 42 196617 8 , 0 , 8;
#P newex 147 109 71 196617 serial b 9600;
#P button 147 40 15 0;
#P newex 80 83 55 196617 delay 100;
#P comment 258 51 140 196617 < ---doesn't make a difference;
#P connect 1 0 5 0;
#P fasten 7 0 5 0 45 102 84 102;
#P fasten 2 0 1 0 152 67 85 67;
#P connect 2 0 4 0;
#P connect 4 0 3 0;
#P fasten 5 0 3 0 84 125 143 125 143 107 152 107;
#P connect 9 0 3 0;
#P connect 3 0 8 0;
#P connect 3 1 6 0;
#P pop;

I really appreciate any help you can give.


October 16, 2006 | 2:02 pm

dont mean to be annoying but can anyone help


Viewing 6 posts - 1 through 6 (of 6 total)