<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Clemens,<br><br>I've encounter a similar problem. Biosemi actually merge the data as if this was a single 16-pins triggers, so a number between 0 and 65535. You could dissociate these two number and get back your two independent values with something like:<br><br>t = dec2bin(yourTrigValue,16)<br>lowerPort = bin2dec(t(9:16))<br>higherPort = bin2dec(t(1:8))<br><br>so both values will be between 0 and 255.<br><br>Something you must carefully think about, however, is that you may get much more trig that you actually send. For example, you likely gonna get consecutive identical events on the lower port, which were originally recorded as as separate events because something happen on the higher port. Same will happen for the 0 you likely send between each code, independently on each port, to put all the pins down.<br><br>Hope this help,<br><br>Nicolas<br><br>p.s. there could be a more computationally-efficient way to do this.<br><br>*************************<br>Nicolas Robitaille, Ph.D.<br>Stagiaire post-doctoral<br>Brams<br>*************************<br><br><br><br><br><hr id="stopSpelling">Date: Tue, 19 Jan 2010 18:31:56 +0200<br>From: clemens.maidhof@HELSINKI.FI<br>Subject: [FIELDTRIP] bdf import, 16 bits events<br>To: FIELDTRIP@NIC.SURFNET.NL<br><br>






Dear Fieldtrip users,
<br>
<br>
we are using 16 Bits for coding events in BDF data (i.e., all 16 pins
for trigger input of the BioSemi connector used; 8 Bits for
Presentation and 8 Bits for another device). However, when importing
the bdf-file with Fieldtrip into EEGLAB (v7.2.8.18b, Matlab 7.0.8), all
event codes with a value higher than 2<sup class="ecxmoz-txt-sup">8</sup>
(from Bits 9-16) seem to be incorrect: these triggers are recognized,
but their value is the sum of an addition of the actual value with a
value from the first 8 bits.
<br>
During recording, the BioSemi software shows the correct events in the
acquisition software, and also when imported into BESA all correct
event codes are there. So we thought this has probably to do with the
import-function in fieldtrip.
<br>
<br>
Has anybody encountered the same problem or maybe even better, knows a
solution <span class="ecxmoz-smiley-s3"><span> ;-) </span></span> ?
<br>
<br>
Thanks a lot in advance for any hints and tips!
<br>
Clemens
<br>
<span class="ecxmoz-txt-tag"></span>-- <br>
<pre class="ecxmoz-signature">Clemens Maidhof<br>Cognitive Brain Research Unit, Department of Psychology, University of<br>Helsinki & Finnish Centre of Excellence in Interdisciplinary Music<br>Research, University of Jyväskylä, Finland <br><a class="ecxmoz-txt-link-abbreviated" href="mailto:clemens.maidhof@helsinki.fi">clemens.maidhof@helsinki.fi</a></pre>


----------------------------------<BR>
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.<BR>
  http://listserv.surfnet.nl/archives/fieldtrip.html<BR>
  http://www.ru.nl/fcdonders/fieldtrip/<BR>                                         <br /><hr />Envoyez vos voux avec Messenger pour mobiles. <a href='http://go.microsoft.com/?linkid=9706121' target='_new'>Plus d'info</a></body>
</html><p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>