| BrainStem® GP 2.0 Module | Index |
Contents
Specifications
Pinout Diagram
Processor
Power and Voltage Ratings
Power Supplies
Analog Input
Digital Input/Output
Infrared (IR) Communication
Board Dimensions
Prototyping Area
Pull-up Resistor Pads
File Slots and Processes
Input Devices
Specifications
Hardware ratings and unique module specifications are described in the table.
| Item | Value | Notes |
| Supply Input Voltage | 3.2V-28.0V | |
| VCC (Regulated) | 5.0V | |
| I_VCC (Max) | 1.0A | |
| Reflex Enablers | 8 | See cmdRFLXE_CFG for details. |
| Timers | 24 | 16-bit resolution. See cmdTMR_SET for details. |
| Counters | 8 | 16-bit resolution. See cmdCTR_SET for details. |
| Scratchpad Bytes Available | 56 |
Pinout Diagram

Processor
The processor is a Microchip PIC18C252 operating with a 40MHz oscillator. Internal non-volatile memory is Microchip 24FC128/256 EEPROM for storage of system data, reflex commands, and VM opcodes. This EEPROM has an access rate of 1Mbit/sec. The processor has IIC interface hardware that has a maximum data transfer rate of 1Mbit/sec.
Power and Voltage Ratings
The range of acceptable input voltages for the GP 2.0 module onboard voltage regulator is 3.2V to 28.0V. This wide range of power will get regulated to 5.0V (Vcc) regardless of the actual voltage supplied. A SEPIC (Single Ended Primary Inductor Converter) will increase (boost) or decrease (buck) the input voltage to provide a 5.0V regulated supply. Voltage conversion efficiency is approximately 90 percent.
Voltages below 3.2V will trip the built-in voltage supervisor that disables the power regulation to the microprocessor and other devices using the VCC regulation line. When a low voltage condition is detected, the controller turns off and a low voltage status LED is illuminated.
The voltage regulator has an output current rating of 1 Amp. The regulator can safely provide power for several extra sensors.
The Vcc pins on the analog and digital headers are all tied and are current limited only by the 1 Amp maximum.
Power Supplies
The BrainStem GP 2.0 module has two power supply inputs, one for logic and one for servos. Logic power is indicated by the words "Source Power" on the circuit board.
Servos have a secondary connector for power. This connector shares a common ground with the board with a starred connection at the "Source Power" pin, but the "Servo Power" pin is only connected to the four servo power pins of the servo connectors. This allows the servo power be completely isolated form the logic power if desired. The three pin header for the servo power can facilitate a jumper that can be added which will allow the servos and logic to share the same power supply. This modification is shown below.

Analog Inputs
The analog inputs have 10-bits of measurement resolution across a 0.0V - 5.0V range.
| A2DID | Input Device ID |
| 0 | 0 (0x00) |
| 1 | 1 (0x01) |
| 2 | 2 (0x02) |
| 3 | 3 (0x03) |
| 4 | 4 (0x04) |
Digital Inputs/Outputs
The digital pins are organized slightly different than the pins on the BrainStem GP 1.0 module. The hardware pinout location is the same as the BrainStem GP 1.0, but the pins are numbered differently between the GP 1.0 and GP 2.0 module.
The digital inputs/output pins can sink or source up to 20ma. The Vcc pins on the analog and digital headers are all tied and are current limited only by the 1 Amp maximum. Input logic high can be from 4.7V-5.3V. Output logic high is at Vcc levels (5.0V) and a logic output low is 0.0V.
| DigID | Input Device ID | Functionality | Notes |
| 0 | 5 (0x05) | Input,Output | |
| 1 | 6 (0x06) | Input,Output,Logic Event Timer | [1] |
| 2 | 7 (0x07) | Input,Output,Logic Event Timer | [1] |
| 3 | 8 (0x08) | Input,Output,Logic Event Timer | [1] |
| 4 | 9 (0x09) | Input,Output,Logic Event Timer | [1] Circuit hardware built in |
| 5 | 10 (0x0A) | Input,Output | [2] Circuit hardware built in |
| 6 | 11 (0x0B) | Input,Output | [2] |
[1] - Can be used for IR receive (with appropriate circuit hardware)
[2] - Can be used for IR transmit (with appropriate circuit hardware)
Infrared (IR) Communication
IR transmit and receive functionality are built into the hardware. IR transmit (TX) is physically connected to DIO pin 5 and IR receive (RX) is physically connected to DIO pin 4. Before IR data can be communicated, each respective pin (TX and RX) must be configured using cmdIRP_CFG . NEC and RC5 are supported.
Board Dimensions
All dimensions are in inches.

Prototyping Area
A small area on the module is set aside to facilitate simple breadboarding projects. Holes are spaced at 0.1 inch intervals. A few locations are defined as passthrough holes that supply regulated power, source power, I2C bus, and digital and analog ports.

Pull-up Resistor Pads
On the bottom side of the module, surface mount pads are included to allow the addition of pull-up resistors to both the digital and analog lines. The footprints are 0603 surface mount package size. The following figure shows the location and order of the unpopulated pads.

TEA File Slots and Process Slots
A BrainStem module stores TEA files in an EEPROM. The GP 2.0 module contains 12 file slots numbered 0-11. Programs can run in any of 4 "virtual machine" (VM) process slots numbered 0-3. Each process has a private stack space of 112 bytes. These processes can run concurrently. A 56 byte scratchpad RAM buffer may be used for sharing data between processes.
| FileID range | Maximum File Size |
| 0-10 | 1K |
| 11 | 16K |
There is additional space on the EEPROM dedicated to storing reflexes. The GP 2.0 stores 128 reflex vectors and 128 reflex commands. For simple tasks, it may be possible to use a reflex instead of a TEA program and conserve process slots and/or file slots.
Input Devices
A BrainStem can get input from physical and software devices. Details about devices are described in Brainstem Input Devices reference.
| Alias | Device ID | Input Source |
| A0-A4 | 0-4 | A2D inputs |
| D0-D6 | 5-11 | Digital pin state inputs |
| E1-E4 | 12-15 | Digital Edge/Width timer inputs |
| I1-I4 | 16-19 | IR message reception inputs |
| X0-X4 | 20-24 | 0.1ms polling digital transition inputs |
| T1-T23 | 25-48 | 0.1ms resolution timer inputs |
| I0 | 52 | IIC input |
| S0-S3 | 53-56 | Semaphore inputs |
| B0 | 57 | Raw serial byte input |
| C0-C7 | 58-65 | 16-bit counter rollover inputs |
| L0 | 126 | Host link down reflex input |
| P0 | 127 | Power-up reset reflex input |