SSVEPFlickerSet
SSVEPFlickerSet.zip
—
ZIP archive,
13Kb
Module for BCI2000 which sets and controls SSVEP flicker of the http://bci.fuw.edu.pl/wiki/BCI_Appliance.
Implemented as a native BCI2000 module, provides interface to the μC controlling the LEDs, and communication of BCI2k with the [graphics_udp] module.
Compilation
Standard for the Borland Builder products. Since this is a BCI2000 module, it uses also the BCI2000 code, assuming the source of BCI2000 is present in the BCI2000\src\src directory.
Usage
BCI2000 window for configuring the LED array
As presented in the enclosed screenshot, this module allows to set the matrix of frequencies and duty cycles for all the LEDs backlighting the LCD. Settings are sent to the contoller via serial port, so the name of the serial port where the controller is connected is sincluded in the configuration.
SSVEPFlickerSet sends also information to the [graphics_udp] module via UDP protocol. By default the graphics_udp module is connected to the port 8111 of the local host.
[edit]Communication of the SSVEPFlickerSet with other BCI2000 modules
The following variables are available within BCI2000:
FrequenciesMatrix –- a matrix containing frequencies for the LEDs
DutyFactorMatrix –- duty cycles of frequencies
flickerStatus –- currently the status is either on or off
isFrequencySelected –- this variable should be set to 1 if a frequency was succesfully chosen as a response by the corresponding BCI2k modules.
flickeringFiledID –- number of the panel, associated with the above mentioned selected SSVEP frequency.
[edit]Operation
After initialization of the BCI2000, entering the confuguration parameters and verification of their consistency, SSVEPFlickerSet sends the information to the controller (μC) as the sequence of pairs of 2-byte numbers:
frequency duty_cycle
In such a way, module sends to the μC total of 4 * NumberOfLEDs bytes in the following order of 2-byte numbers:
frequency_of_the_first_field duty_cycle_of_the_first_field
frequency_of_the_second_field duty_cycle_of_the_second_field
...
frequency_of_the_last_field duty_cycle_of_the_last_field
After starting the flicker, variable flickerStatus is se to ON (1). When the data analysis module detects a response, isFrequencySelected should be set to 1 and the number of field associated with this frequency must be given in the flickeringFiledID variable. When this happens, SSVEPFlickerSet performs the following actions:
turns off the flickering
after prePlottingTargetDuration seconds the module sends to the graphics_udp application the information containing the number of chosen field, from which the icon should be displayed in the central field, and the time for its display
so, for the next plottingTargetDuration seconds, the chosen icon is displayed in the center and the flickering is off
after postPlottingTargetDuration seconds more, the module turns the flickering back on, and sets the variables: flickerStatus to 1 (ON), and isFrequencySelected to 0 (NO).
data acquisition/lab
1.0
GPL
windows 2k/xp
c++
http://bci.fuw.edu.pl/wiki/BCI_Appliance
http://bci2000.org


