Serial hlep with EEG communication

Oct 16, 2006 at 10:00pm

Serial hlep with EEG communication

hello agin, I know it’s been a long time, but I fianlly got someone to help me decode this CEO Electroencephilograph 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.

#28191

You must be logged in to reply to this topic.