BCI – TGAM module development documentation

This document is based on the TGAM1 module of Shen Nian Technology.

Technical specifications

Outline

Types of specification Remarks
Product Series ThinkGear-AM A = ASIC, M = Module
Module model TGAM1
module version 2.4 Applies to 2.3
Module size(Max) 27.9mm x 15.2mm x 2.5mm 1.10in x 0.60in x 0.10in (L x W x H)
Module weight(Max) 130mg 0.0045oz
Operating Voltage 2.97V to 3.63V SP6200 3.0~6.0V MAX1595 1.8~5.5V
Voltage noise(Max) 10mV peak to peak
Maximum power consumption 15ma @ 3.3V
Electrostatic protection 4kV contact discharge 8kV air discharge Tested on EEG, REF, GND
Output interface standard UART (serial port) TX, RX, VCC(+), GND(-)
Output baud rate 1200, 9600, 57600 Use Stuff to set default values
#EEG channel 1 3 contacts (EEG, REF, GND)

pin

Connector P1 – Electrode
pin FEATURES silk screen
1 EEG electrodes EEG
2 EEG shielding
3 GND electrode
4 REF shield
5 REF electrode REF
Connector P4 – Power supply
pin FEATURES silk screen
1 VCC +
2 GND -
Connector P3 – UART/Serial Port
pin FEATURES silk screen
1 GND -
2 VCC +
3 RXD R
4 TXD T

Jumpers/default settings

TGAM1 has two configuration pads that can be used to change the two default settings that are applied when the chip powers up.
Two default settings are applied when the chip is powered up. The configuration pads are located on the back of TGAM1 as shown by the red and blue boxes.
The BR0 and BR1 pads are used to set the output baud rate and data content after TGAM1 is powered on. The M pad determines the frequency of the notch filter.

The top pad is GND and the bottom pad is VCC.

BR1 BR0 FEATURES
GND GND 9600 baud rate normal output mode
GND VCC 1200 baud rate normal output mode
VCC GND 57.6k baud rate normal + original waveform output mode
VCC VCC N/A

Corresponds to the first three command bytes on page 1.7 of the ThinkGear control command byte of firmware 0.

Normal output mode includes the following outputs: POOR_SIGNAL, ASIC_EEG_POWER_INT, eSense™ measurements.

As mentioned previously, the notch filter frequency of TGAM1 is set via the M configuration pad. It can be used to select 50Hz or 60Hz to reduce AC noise in specific markets. Tie the M pad to the VCC pad to select 60Hz, and tie the M pad to GND to select 50Hz.

Unlike the BR0 and BR1 configurations, the M configuration does not have a corresponding ThinkGear control command byte.

Serial communication

ThinkGear data value

Different modules and firmware support different data values ​​and default status values, see the data package section for details.

POOR_SIGNAL quality

By default, output of this data value is enabled. Usually output once per second.

This unsigned single-byte integer value describes how bad the signal is measured by ThinkGear. The value range is 0 to 255. Any non-zero value indicates that some kind of noise contamination has been detected. The higher the number, the more noise is detected. A value of 200 has a special meaning, that is, the ThinkGear electrode is not in contact with human skin.

This value is typically output once per second and indicates that the most recent measurement was poor. Poor signal can be caused by a number of reasons, in order of severity:

  • The EEG, GND, or REF electrodes are not on the person's head (that is, when no one is wearing the ThinkGear).
  • The EEG, GND or REF electrodes are in poor contact with human skin (i.e. blocked by hair, etc.).
  • The wearer is exercising excessively (i.e., moving the head or body excessively, pushing the electrodes).
  • The environmental static noise is too large (some environments have strong electrical signals or there is static electricity accumulation in the body of the person wearing the sensor).
  • Excessive non-electronic EEG biometric noise (i.e. EMG, ECG/electronic EEG, EOG, etc.).

A certain amount of noise is inevitable during normal use of ThinkGear, and NeuroSky's filtering technology and eSense™ algorithms are designed to detect, correct, compensate, account for and tolerate many types of non-electronic EEG noise. Most typical users who are only interested in using eSense values ​​such as concentration and meditation will not need to pay much attention to the POOR_SIGNAL quality value, except that the concentration and meditation values ​​will not be updated when POOR_SIGNAL is detected. The POOR_SIGNAL quality value is more useful for applications that need to be more sensitive to noise (such as some medical or research applications), or that need to know immediately when slight noise is detected.

eSense™ measurements

For all different types of eSense (eg, attention, meditation), measurements are reported on a relative eSense scale of 1 to 100. On this scale, a value between 40 and 60 at any given moment is considered "neutral," a concept similar to the "baseline" established in traditional EEG measurement techniques (although the method for determining ThinkGear's baseline is Proprietary and may differ from traditional EEG). Values ​​between 60 and 80 are considered "mildly elevated" and may be interpreted as potentially higher than normal levels (attention or meditation levels may be higher than normal for a given person). Values ​​between 80 and 100 are considered "elevated," meaning they strongly indicate an increase in the level of that electrical sensation.

Likewise, at the other end of the scale, a value between 20 and 40 indicates a "reduced" level of electrical induction, while a value between 1 and 20 indicates a "strong reduction" in electrical induction levels. Depending on the opposite of each electronic somatosensory, these levels may indicate distracted, agitated, or abnormal states.

An eSense measurement of 0 is a special value that means ThinkGear cannot reliably calculate the eSense signal level. This can be (and often is) caused by excessive noise, as described in the "Poor Signal Quality" section above.

The reason the scope of each explanation is somewhat wide is because parts of the eSense algorithm are dynamically learned, sometimes employing some "slow adaptation" algorithms to adapt to each user's natural fluctuations and trends, taking into account and compensating for the human brain. Normal variations and fluctuation ranges of electrograms. This is part of the reason ThinkGear sensors are able to operate on a wide range of people under an extremely wide range of personal and environmental conditions, while still providing good accuracy and reliability. Developers are encouraged to further interpret and adapt these guidance ranges to fine-tune their applications (for example, an application can ignore values ​​below 60 and only respond to values ​​between 60-100, interpreting them as attention Begin to be highly concentrated).

Pay attention to eSense

By default, output of this data value is enabled. Usually output once per second.

This unsigned single-byte value is used to report the user's current eSense attention index, which represents the intensity of the user's mental "focus" or "attention," such as the intensity of intense concentration and directed (but stable) mental activity. Its value range is from 0 to 100. Distractions, wandering thoughts, inattention, or anxiety can all lower your concentration index.

Meditation eSense

By default, output of this data value is enabled. Usually output once per second.

This unsigned single-byte value is used to report the user's current eSense meditation value, which represents how "calm" or "relaxed" the user is mentally. Its value range is 0 to 100. Please note that "meditation" measures one's mental level, not their physical level, so simply relaxing all the muscles in the body may not immediately improve "meditation" levels. However, for most people, and under most normal circumstances, relaxing the body tends to help relax the mind as well. Meditation is associated with a reduction in the activity of active mental processes in the brain. An effect that has long been observed is that closing the eyes shuts down the mental activity that processes images coming from the eyes. Therefore, closing the eyes is often an effective way to increase the level of meditation. Distractions, wandering thoughts, anxiety, agitation, and sensory stimulation may lower the meditation meter.

8BIT_RAW waveform value

By default, output of this data value is disabled. Like ordinary signed raw waveform values, 8BIT_RAW waveform values ​​are typically output 128 times per second, that is, approximately once every 7.8ms.

This data value is only available in ThinkGear Embedded Module (TGEM). This data value is not available in the ThinkGear ASIC (TGAT/TGAM1) used in MindWave and MindWave Mobile.

This unsigned single-byte value is equivalent to the signed original 16-bit waveform value described below, except that it is scaled to unsigned and only the most meaningful 8 bits are output ("most meaningful" is based on the specific ThinkGear hardware defined). In this way, the original wave value can be output within the bandwidth limit of 9600 baud serial communication, but at the cost of not being able to output the lowest few bits of accuracy. For many applications (such as real-time display of raw waveforms), displaying 8-bit precision is sufficient because the human eye often cannot quickly resolve pixels that may correspond to lower precision bits. If greater accuracy is required, consider using normal signed 16-bit RAW wave values ​​(described below) to output at a higher baud rate.

Enable 8BIT_RAW After output, although only the most significant 8 bits are output, ThinkGear internally performs all calculations based on the highest precision raw waveform information available to the ThinkGear hardware, so no information is discarded internally. To save serial bandwidth, only the raw value of the output is reduced to 8 bits.

RAW_MARKER fragment start

By default, output of this data value is disabled. Usually output once per second.

This data value is only available in ThinkGear modules. ThinkGear ASICs (such as MindWave and MindWave Mobile) cannot be used.

This is not a true data value and is mainly used for debugging synchronization of very precise timing and raw waves or for research purposes. The value is always 0x00.

original waveform value

For TGEM, the output of this data value is disabled by default. When enabled, raw wave values ​​are typically output 128 times per second, or approximately once every 7.8ms. The ThinkGear ASIC (TGAT/TGAM1) outputs 512 times per second, which is approximately once every 2 milliseconds. By default, it is usually on. The default values ​​can be adjusted at the module level, see the spec sheet for details.

TGAM1 only reports raw waveforms between approximately -2048 and 2047.

This data value consists of two bytes and represents one raw waveform sample. Its value is a signed 16-bit integer ranging from -32768 to 32767. The first byte of the data value represents the high bit of the binary, and the second byte represents the low bit. To reconstruct the complete original wave value, just shift the first byte left by 8 bits and perform a bitwise OR operation with the second byte:

short raw = (Value[0] << 8) | Value[1];

Among them, Value[0] is the high-order byte and Value[1] is the low-order byte.

Each ThinkGear model reports raw waveform information only in certain areas of the entire -32768 to 32767 range. For example, a ThinkGear ASIC may only report raw waveforms between approximately -2048 and 2047, while a ThinkGear module may only report raw waveforms between approximately 0 and 1023. For more information, consult the documentation for your specific ThinkGear hardware.

Due to the high output rate of this value and the large number of data bytes involved, only 57600-bit raw wave values ​​can be output in serial communication streams of 16 baud and above. If you need raw waveform information at 9600 baud, consider using 8BIT_RAW Waveform value output.

EEG_POWER

By default, output of this data value is disabled. When enabled, output is typically once per second.

This version of EEG_POWER uses floating point numbers and is only available for ThinkGear modules, not ASICs. For ASIC versions see ASIC_EEG_POWER_INT . As of ThinkGear firmware v1.7.8, the ASIC version is the standard and preferred format for reading EEG band power, the floating point format has been deprecated for backward compatibility only.

This data value represents the current amplitude of 8 common EEG frequency bands (brain waves). It consists of 8 4-byte floating point numbers, in order:

  • delta 0.5 – 2.75Hz
  • theta 3.5 – 6.75Hz
  • low-alpha 7.5 – 9.25Hz
  • high-alpha 10 – 11.75Hz
  • low-beta 13 – 16.75Hz
  • high-beta 18 – 29.75Hz
  • low-gamma 31 – 39.75Hz
  • mid-gamma 41 – 49.75Hz

These values ​​have no units and are therefore only meaningful when compared to each other and themselves, taking into account relative quantities and time fluctuations. The floating point format is standard big-endian IEEE 754, so the 32 bytes of the value can be converted directly in C (in a big-endian IEEE 754 environment) to float .

ASIC_EEG_POWER_INT

The output of this data value is enabled by default, typically once per second.

As of ThinkGear firmware v1.7.8, this form EEG_POWER is the standard output format for EEG band power, while the output format described in EEG_POWER is reserved for backward compatibility only and can only be accessed through the command switch. Prior to v1.7.8, EEG_POWER was the standard format.

This data value represents the current amplitude of 8 common brain wave types. It is equivalent to ASIC EEG_POWER, the main difference is that the data value is output in the form of 8 3-byte unsigned integers instead of 4-byte floating point numbers. These 3-byte unsigned integers are in big-endian format.

The eight EEG powers are output in the following order:

  • delta 0.5 – 2.75Hz
  • theta 3.5 – 6.75Hz
  • low-alpha 7.5 – 9.25Hz
  • high-alpha 10 – 11.75Hz
  • low-beta 13 – 16.75Hz
  • high-beta 18 – 29.75Hz
  • low-gamma 31 – 39.75Hz
  • mid-gamma 41 – 49.75Hz

These values ​​have no units, so it only makes sense to compare them to each other and themselves to take into account relative quantities and time fluctuations.

blink intensity

This data value is currently not available through the ThinkGear Serial Data Streaming API. It cannot output directly from any current ThinkGear hardware. For TGCD, see with TG_GetValueStatus()TG_GetValue() functions used together TG_DATA_BLINK_STRENGTH type of data.

Mind wandering level

This unsigned single-byte value is used to report the intensity of the user's "mind wandering level". Its value range is 0 to 10. A value of 0 means "not applicable". Values ​​from 1 to 10 indicate levels (the larger the value, the higher the level of mind wandering).

ThinkGear Data Pack

ThinkGear components transmit digital data as an asynchronous serial byte stream. The serial data stream must be parsed into ThinkGear packets in order to correctly extract and interpret the ThinkGear data values ​​described in the previous chapter.

ThinkGear data packet is a data packet format consisting of 3 parts:

  • Packet header
  • Packet payload
  • Payload checksum

The packet format is designed primarily for robustness and flexibility: the packet header and checksum provide data flow synchronization and data integrity checking, while the data payload is formatted to ensure that future data can be stored in the packet. Add new data fields (or remove existing data fields) without breaking packet parsers in any existing applications/devices. This means that any application that correctly implements the ThinkGear packet parser can use newer ThinkGear modules without changing its parser or application, even if the newer ThinkGear contains new data fields.

Packet structure

Packets are sent as an asynchronous serial byte stream.
The transmission medium can be UART, serial COM, USB, Bluetooth, file, or any other mechanism that can transmit a stream of bytes.

Each packet starts with its header, then the data payload, and ends with the payload’s checksum bytes, as shown below:

[SYNC] [SYNC] [PLENGTH]  [PAYLOAD...]     [CHKSUM]
_______________________  _____________  ____________
^^^^^^^^(Header)^^^^^^^  ^^(Payload)^^  ^(Checksum)^

The [PAYLOAD…] section is allowed to be up to 169 bytes long, and [SYNC], [PLENGTH], and [CHKSUM] are one byte each. This means that the length of a complete, valid data packet is at least 4 bytes (if the data payload length is 0 bytes) and at most 173 bytes (if the data payload length is at most 169 bytes).

The procedure for correctly parsing ThinkGear packets is given in the step-by-step guide to parsing packets below.

Packet header

The packet header consists of 3 bytes: two synchronization [SYNC] bytes (0xAA 0xAA), followed by a [PLENGTH] (payload length) byte:

[SYNC] [SYNC] [PLENGTH]
_______________________
^^^^^^^^(Header)^^^^^^^

The two [SYNC] bytes are used to signal the start of a newly arrived packet and are bytes with the value 0xAA (170 decimal). The synchronization is two bytes instead of just one byte to reduce the possibility that the [SYNC] (0xAA) byte present in the packet is mistaken for the beginning of the packet. While it is still possible to have two consecutive [SYNC] bytes in a packet (causing the parser to try to start parsing the middle of the packet as the beginning of the packet), the combination of [PLENGTH] and [CHKSUM] ensures Such "missynchronized packets" are not accidentally interpreted as valid packets (see Payload Checksums below for more details).

The [PLENGTH] byte represents the length (in bytes) of the data payload [PAYLOAD…] portion of the packet, which can be any value between 0 and 169. Any larger value indicates an error (PLENGTH TOO LARGE). It is important to note that [PLENGTH] is the length of the packet payload, not the entire packet. The complete length of the packet is always [PLENGTH] + 4.

Packet payload

The data payload of a packet is simply a sequence of bytes. The number of bytes of data payload in the packet is given by the [PLENGTH] bytes in the packet header. The relationship between the data payload bytes and the ThinkGear data values ​​described in the previous chapter is defined in detail in the Data Payload Structure section below. Note that you generally should not attempt to parse the data payload before verifying the payload checksum byte [CHKSUM] as described in the next section.

Payload checksum

[CHKSUM] bytes MUST be used to verify the integrity of the packet payload.

The checksum of the payload is defined as:

  • Adds all bytes of the packet's data payload.
  • The lowest 8 bits of the sum are taken.
  • The lowest 8 bits are bitwise inverted.

Receivers receiving packets must use these 3 steps to calculate the checksum of the data payload they receive and then compare it to the [CHKSUM] checksum byte received with the packet. If the calculated payload checksum does not match the received [CHKSUM] value, the entire packet should be discarded as invalid. If the two match, the receiver can parse the data payload as described in the "Data Payload Structure" section below.

Data payload structure

Once the checksum of the packet is verified, the bytes of the data payload can be parsed. The data payload itself consists of a contiguous series of data values, each contained in a series of bytes called a data line. Each data row contains information such as what the data value represents, the length of the data value, and the bytes of the data value itself. Therefore, to parse a data payload, each data row within it must be parsed until all bytes of the data payload have been parsed.

Data row format

The data line consists of bytes in the following format:

  ([EXCODE]...) [CODE]  ([VLENGTH])  [VALUE...]
  ____________________ ____________ ___________
  ^^^^(Value Type)^^^^ ^^(length)^^ ^^(value)^^

The bytes in brackets are conditional, meaning they only appear in certain rows of data and not others.

A data line may start with 0 or more [EXCODE] (extension code) bytes, which have the value 0x55. [EXCODE] The number of bytes represents the extension code level. The extended code level is in turn used in conjunction with the [CODE] byte to determine the type of data value contained in that data row. Therefore, when the parser starts parsing a data line, it should first count the occurrences of [EXCODE] (0x55) bytes to determine the extended code level of the data line [CODE].

[CODE] Bytes combined with the extended code level represent the type of data value encoded in the data row. For example, at extended code level 0, a [CODE] of 0x04 indicates that the data row contains an eSense attention value. For a list of defined [CODE] meanings, see the CODE definitions table below. Note that the [EXCODE] byte of 0x55 is never used as [CODE] (incidentally, the [SYNC] byte of 0xAA is also never used as [CODE]).

If the [CODE] byte is between 0x00 and 0x7F, it implies that [VALUE…] is 1 byte long (called a single-byte value). In this case, there is no [VLENGTH] byte, so the single [VALUE] byte will appear immediately after the [CODE] byte.

However, if [CODE] is greater than 0x7F, the [CODE] byte is followed by a [VLENGTH] (value length) byte, which is the number of bytes in [VALUE…] (called a multibyte value). These higher CODEs are useful for transferring arrays of values ​​or values ​​that cannot fit into a single byte.

The data line format is defined in this way so that any properly implemented parser will not break when new CODEs representing arbitrarily long DATA... values ​​are added in the future (they just ignore unrecognized CODEs but will not break while parsing ), or the order of CODEs is rearranged in the packet, or some CODEs are not always transmitted in every packet.

The steps for correctly parsing packets and data lines are provided in the step-by-step guide to parsing packets and the step-by-step guide to parsing data lines in packet payloads, respectively.

CODE definition table

If [CODE] is less than 0x7F, it represents a single-byte value without the [VLENGTH] byte.
If [CODE] is greater than 0x7F, it represents a multi-byte value with [VLENGTH] bytes.

code level [CODE] [LENGTH] Value meaning value range TGAM1
0 0x01 N/A battery power 0-255 not support
0 0x02 N/A POOR_SIGNAL 0-255 Enabled by default
0 0x03 N/A HEART_RATE 0-255 not support
0 0x04 N/A Pay attention to eSense 0-100 Enabled by default
0 0x05 N/A Meditation eSense 0-100 Enabled by default
0 0x06 N/A 8BIT_RAW 0-255 not support
0 0x07 N/A RAW_MARKER 0 not support
0 0x80 2 original waveform value int16 Off by default*
0 0x81 32 EEG_POWER float32[8] not support
0 0x83 24 ASIC_EEG_POWER uint24[8] Enabled by default
0 0x86 2 RRINTERVAL uint16 not support
Any 0x55 N/A Reserved for [EXCODE] N/A N/A
Any 0xAA N/A Reserved for [SYNC] N/A N/A

The original waveform value of TGAM1 is in int12 format, ranging from -2048 to 2047.

For a detailed explanation of the meaning of each type of data value, see the ThinkGear Data Values ​​chapter.
Whenever the ThinkGear module is turned on, it always starts in the standard configuration and by default only outputs some of the above data values. To enable or disable the type of data values ​​output by ThinkGear, see the advanced chapter ThinkGear Command Bytes.

Sample packet

Below is a typical packet. Except for the [SYNC], [PLENGTH], and [CHKSUM] bytes, all other bytes (bytes [3] through [10]) are part of the packet data payload. Note that the data lines in the payload are not guaranteed to appear in every packet, nor are any of the data lines guaranteed by the packet specification guaranteed to appear in any particular order.

[ 0]: 0xAA  // [SYNC]
[ 1]: 0xAA  // [SYNC]
[ 2]: 0x08  // [PLENGTH] 数据包长度为 8 字节
[ 3]: 0x02  // [CODE] POOR_SIGNAL
[ 4]: 0x20  // 检测到一些不良信号 (32/255)
[ 5]: 0x01  // [CODE] 电池电量
[ 6]: 0x7E  // 电池几乎充满 3V (126/127)
[ 7]: 0x04  // [CODE] 注意 eSense
[ 8]: 0x12  // 注意 eSense 水平为 18%
[ 9]: 0x05  // [CODE] 冥想 eSense
[10]: 0x60  // 冥想 eSense 水平为 96%
[11]: 0xE3  // [CHKSUM]

Step-by-step guide to parsing packets:

  1. Continue reading bytes from the data stream until the [SYNC] byte (0xAA) is encountered.
  2. Read the next byte, making sure it is also a [SYNC] byte
    • If it is not the [SYNC] byte, return to step 1.
    • Otherwise, continue to step 3.
  3. Read the next byte from the data stream as [PLENGTH].
    • If [PLENGTH] is 170 ([SYNC]), repeat step 3.
    • If [PLENGTH] is greater than 170, return to step 1 (length is too large).
    • Otherwise, continue to step 4.
  4. Reads the next [PLENGTH] bytes of [PAYLOAD…] from the data stream and saves it to the buffer. As each byte is read, the check accumulator is incremented (checksum += byte) to find the sum.
  5. Take the lowest 8 bits of the parity accumulator and invert them.
    • checksum &= 0xFF
    • checksum = ~checksum & 0xFF
  6. Read the next byte from the data stream as the [CHKSUM] byte.
    • If [CHKSUM] does not match the calculated CHKSUM (CHKSUM fails).
    • Otherwise, you can now parse the contents of the payload into data rows to obtain the data values, as described below.
    • In either case, return to step 1.

Step-by-step guide to parsing the data lines in the packet payload:

  1. Parses and counts the number of [EXCODE] (0x55) bytes that may be at the beginning of the current data line.
  2. Parse the [CODE] bytes of the current data line.
  3. If [CODE] >= 0x80, the next byte is parsed as [VLENGTH] bytes for the current data line.
  4. Parses and processes the [VALUE…] bytes of the current data line according to the [EXCODE], [CODE] and [VLENGTH] of the data line.
  5. If not all bytes are parsed from the payload[] array, return to step 1 and continue parsing the next data line.

ThinkGear control command byte

When powered on, the ThinkGear module/AISC always starts in the factory default state. For example, FWv1.7.13 and earlier ThinkGear modules always start at 9600 baud and only output the battery, signal bad, ASIC_EEG, attention and idle values. This configuration is sufficient for most toy, game, and demonstration applications. However, after power-up, the ThinkGear module can send command bytes to change its configuration, such as switching to 57.6k baud, or enabling raw wave value output. ThinkGear command bytes are an advanced feature used to customize ThinkGear hardware behavior.

ThinkGear command bytes are sent to the ThinkGear hardware over the same UART interface used to receive packet bytes. The command byte is a single-byte (8-bit) value with certain bits set. This section describes which bits are set to change the configuration of the ThinkGear module.

After a power outage, the ThinkGear module will restore the above default settings.

Another thing to note is that before the application sends any command bytes to ThinkGear, it should first ensure that at least one complete and valid data packet has been read from ThinkGear to ensure that the command bytes are sent at the correct baud rate. Sending command bytes at the wrong baud rate may cause the ThinkGear to become inoperable until power is cycled (reset to default configuration).

Command byte syntax

A command byte consists of 8 bits, each bit can be set or unset. The lowest (least significant) four bits are used for control modes such as 9600 and 57.6k baud modes, attention output enable or disable modes, etc. The upper four bits (the most important) are called the "command page" and are used to define the meaning of the lower four bits.

After sending page 0 or page 6 bytes, the application itself must change itself to start communicating at the newly requested baud rate, then wait to receive a complete, valid packet from the ThinkGear at the new requested baud rate, and then Try sending any other command bytes to the ThinkGear. Sending another command byte before performing this check may put the ThinkGear module into an indeterminate (and inoperable) state until restarted.

For example, the bit pattern of the command byte of 0x0E is 0000 1110. The top (most significant) four bits are 0000, referring to command page zero. As can be seen from the command page zero bit in the table below (firmware version 1.6), the lower four bits of 1110 are used to control the settings of baud rate, raw wave output, meditation output and attention output respectively. Since the baud rate bit is 1, the module's baud rate will be set to 57.6k mode. Since both the raw wave output and meditation output bits are 1, these two types of output will be enabled separately. Since the attention output bit is 0, the attention output will be disabled. Therefore, sending a 0x0E byte to the ThinkGear module instructs it to work in 57.6k baud mode, outputting the original value and meditation value in the form of data packets, but not the attention value.

Please note that the order of the command pages changed significantly between versions 1.6 and 1.7 of the module firmware. Please also note that ThinkGear ASICs (such as MindWave and MindWave Mobile) only recognize the 1.7 command bytes on page 0 of version 4 firmware; all other command bytes may render the ThinkGear ASIC into an inoperable state until power is cycled. Please refer to the documentation that came with your ThinkGear hardware and the table below to determine which command bytes are valid for your hardware.

ThinkGear ASIC only recognizes the command byte of firmware 1.7 page 0.
TGAM1 only recognizes the first three command bytes of page 1.7 of firmware 0.
Any other command bytes may put it into an inoperable state until power is cycled.

Firmware 1.6 command byte table:

Page  0 (0000____) (0x0_):
    bit[0] (____0001): 设置/取消设置以启用/禁用注意 eSense 输出
    bit[1] (____0010): 设置/取消设置以启用/禁用冥想 eSense 输出
    bit[2] (____0100): 设置/取消设置以启用/禁用原始波形输出
    bit[3] (____1000): 设置/取消设置以使用 57.6k/9600 波特率
Page  1 (0001____) (0x1_):
    bit[0] (____0001): 设置/取消设置以启用/禁用 EEG_POWER 输出
    bit[1] (____0010): 设置/取消设置以使用 10 位/8 位原始波形输出
Page 15 (1111____) (0xF_):
    bit[0] (____0001): 设置/取消设置以启用/禁用测试模式

Firmware 1.7 command byte table:

Page  0 (0000____) (0x0_):  标准/ASIC 配置命令
    bit[0] (____0000): 9600 波特率 正常输出模式
    bit[1] (____0001): 1200 波特率 正常输出模式
    bit[2] (____0010): 57.6k 波特率 正常+原始波形输出模式
    bit[3] (____0011): 57.6k 波特率 FFT 输出模式
Page  1 (0001____) (0x1_):  原始波输出
    bit[0] (____0001): 设置/取消设置以启用/禁用原始波形输出
    bit[1] (____0010): 设置/取消设置以使用 10 位/8 位原始波形输出
    bit[2] (____0100): 设置/取消设置以启用/禁用原始标记输出
    bit[3] (____1000): 忽略
Page  2 (0010____) (0x2_):  测量输出
    bit[0] (____0001): 设置/取消设置以启用/禁用 POOR_SIGNAL 输出
    bit[1] (____0010): 设置/取消设置以启用/禁用 ASIC_EEG_POWER 输出
    bit[2] (____0100): 设置/取消设置以启用/禁用 EEG_POWER输出
    bit[3] (____1000): 设置/取消设置以启用/禁用电池输出
Page  3 (0011____) (0x3_):  eSense 输出
    bit[0] (____0001): 设置/取消设置以启用/禁用注意 eSense 输出
    bit[1] (____0010): 设置/取消设置以启用/禁用冥想 eSense 输出
    bit[2] (____0100): 忽略
    bit[3] (____1000): 忽略
Page  6 (0110____) (0x6_):  波特率选择
    bit[0] (____0000): 无变化
    bit[1] (____0001): 1200 波特率
    bit[2] (____0010): 9600 波特率
    bit[3] (____0011): 57.6k 波特率

Mechanical Drawing

The dimensions and main components of TGAM1 are shown in the mechanical diagram.

There are two mounting holes in the upper right and lower left corners for securing the TGAM1 to the housing.

Dimensions are in milinch .

reference

Post Reply