GoGo Board Tethered Mode Protocol Arnan (Roger) Sipitakiat Updated: July 8, 2011

Similar documents
GoGo Board Serial Protocol Revision 4.0.2

Venstar Thermostat Adapter

Micro Module Shutter. Micro Module Shutter

1. Implemented CM11 protocol

The RS-485 user manual for B800 series communication

Developer Notes INSTEON Thermostat v012. Developer Notes. INSTEON Thermostat. Revision History

SwitchLinc 2-Wire Dimmer (RF Only) (2474DWH - Dev 0x01 / Sub 0x24)

Serial Communication Control Interface User s Manual

SRF02 Ultrasonic range finder Technical Specification

INSTEON Hidden Door Sensor

RS-232 Control of the Advantage EQ281/8, EQ282/8 and Advantage SMS200

Developer Notes for KeypadLinc Line

Real Time Clock with Temperature Sensor and RS485/Modbus Comunications

JMY505G User's Manual

WiMOD LR Base Host Controller Interface

CLOCKAUDIO. MR88 Automatic Microphone Mixer RS232 Programming Version 4.2

InfoTag KE28xx Communications for 186 CPU Firmware Version 4

Planar Simplicity Series

Application Note BDLxxxx RS232 SERIAL INTERFACE COMMUNICATION PROTOCOL (SICP V1.82)

WiMOD LR Base Host Controller Interface

PRE32 RS232 protocol v1.21 Tomas Andersson

NATIONAL CONTROL DEVICES Fusion ProXR Advanced Quick Start Guide

Modbus Communication Protocol

SDR-IQ Serial Port. Rev Nov 1, 2011

WiMOD LoRaWAN EndNode Modem HCI Specification

Definition of PLR on the RS485-bus. Version 1.06

WiMOD LR Base Plus Host Controller Interface

Winford Engineering ETH32 Protocol Reference

Specification E2 Interface

OSPREY Instruction Manual

MCS-8 RS232 & RS485 Network Protocol

Wireless Sensor Networks. Data Communications Protocol

DMTME Multimeters. Communication protocol. Technical specification V1.2 ABB

LORD Data Communications Protocol Manual 3DM -GX5-10. Inertial Measurement Unit

3DM-GX3-35 Data Communications Protocol

Modbus on SenseAir S8

AN-881 APPLICATION NOTE

PIC-I/O Multifunction I/O Controller

Modbus on tsense. Table of contents:

LORD Data Communications Protocol Manual 3DM -GX5-35. Attitude and Heading Reference Unit (AHRS) with GNSS

JMY504M User's Manual

OWL 640 Analogue COTS Instruction Manual

Computer Control of the Advantage DRC 4+4

Modbus on S8. Modbus is a simple, open protocol for both PLC and sensors. Details on Modbus can be found on

Optidrive VTC Modbus RTU Register Map

Modbus on S8. Modbus is a simple, open protocol for both PLC and sensors. Details on Modbus can be found on

Communication Protocol WH4013

MassaSonic PulStar and FlatPack Series Ultrasonic Level Sensors. Serial Communications Guide

Winsonic MODBUS Remote IO user manual Rev. 1.0

Blaupunkt ( DMS?? ) Page 1 of 13

Plant Robot Motor Controller

ICN12. I2C to UART Bridge, ADC,DAC and I/O

3GV M Modbus RTU Register Map

History Page. Barracuda NextGen Firewall F

128 CH TDC-SCALER For 10x10 GEM

Technical Reference Manual. E1022 Firmware Download Protocol

Control Codes. Viewing control state (Get control command) Controlling (Set control command) Command. No. Command type Command Value range

HMC1022 Digital Compass

AEGIS_Modbus. Ethernet TCP. 2. Address Contents 2.1 Current Values of Sensors, Meters, Contact Sets

Protocol of data exchange with modem via USB interface Version

NATIONAL CONTROL DEVICES ProXR Enhanced Quick Start Guide

CAN / RS485. Product Description. Technical Reference Note. Interface Adapter. Special Features

Ultra Short Installation Procedure of the UPS PIco HV3.0 Daemons. and UPS PIco HV3.0 broadcasting System

1 Firmware Description

LORD Data Communications Protocol Manual 3DM -CV5-15. Vertical Reference Unit

M-BUS PROTOCOL for ML 311

JMY607H User's Manual

512 Channel Serial to DMX Transmitter PRO

Logosol Joystick Node LS-731

Using the HCA Server as a bridge from Alexa to the world

E2 Modbus RTU Register Map Revision History Version Comments Author Date 1.02 Previous version PAE 11/06/ Revised to new format PAE 09/03/09

DAE Instrument Corp. AMR. Auto Meter Reading Module. Modbus Reference. Revision 1.3e Updated 2014/6/18

JMY501H User's Manual

Chaper 1: E10+ PLCs Host-Link Command Format

<dalf1_api.doc> API Interface. Revision 0.10 Nov 30, 2006

Fingerprint_Protocol_All_English

LORD MANUAL. Wireless Sensor Networks LXRS Data Communications Protocol

HSK-320Z User s Manual

Overview and Characteristics of Servo A1-16. General Servo Motor Specifications. Dimensions of Servo Motor. Wiring Connection

NATIONAL CONTROL DEVICES Fusion Reactor Quick Start Guide

6 Remote memory access protocol (normative)

Version Action Author Date

<dalf1_api.doc> API Interface. Revision 0.13 June 28, 2007

BV4205. I2C-10 Channel A to D. Product specification. January 2008 V0.a. ByVac Page 1 of 10

AX-18F/ AX-18A. Part Photo. H/W Specification [AX-18F] [AX-18A]

RS232C Serial Interface for Pirani Diaphragm and Pirani Standard Gauges. Caution. binary 8 data bits 1 stop bit no parity bit no handshake

M2M/DMTME Instruments Communication protocol. Technical specification V.2.1 2CSG445011D0201

BV4531U. I2C or Serial 6 Way Relay

Revision 1.2. July 24, COM Protocol Manual. for MDC and ADC N 11th St - San Jose CA

User Manual for TeraRanger Hub Evo

ROBOTIS e-manual v AX-12W. Part Photo [AX-12W] Hardware Specifications. Weight : 52.9g Dimension : 32mm * 50mm * 40mm

2G Actuator Communications Protocol Document Rotary & Linear Actuators

SRF08 Ultra sonic range finder Technical Specification

COMMUNICATION M-BUS PROTOCOL CE4DMID0M (MBus meter)

C-MAX CME8000-BUS. Module Layout CME8000-BUS-LP02 RS232. Industrial Module with CME8000 receiver IC. Short Description

MicroStrain LXRS Wireless Base Station EEPROM Map

MTR-4. C8 Command to MODBUS Bridge User Manual F-1, No. 631, Chung Der Road, Sec 1, Taichung Taiwan.

Optidrive Applications Support Library

I-Dent Marker Communications for 186 CPU Firmware Versions 1 and 2

Pololu TReX Jr Firmware Version 1.2: Command Documentation

Transcription:

General Information GoGo Board Tethered Mode Protocol Arnan (Roger) Sipitakiat Updated: July 8, 2011 http://www.gogoboard.org This document describes only the serial protocol of the tethered mode. The protocol for Cricket Logo (autonomous mode) can be found on the handy-cricket website (http://www.handyboard.com/cricket) The serial port setting for the GoGo board: Baud rate 9600 bps. No parity, 8 data bits, 1 stop bit (N,8,1). No flow control; neither in software (XON/XOFF) nor hardware (CTS/RTS, DTR/DSR). Here is a typical sequence of bytes flowing in a GoGo board command session PC to GoGo 0x54 0xFE Command Byte(s) Reply from GoGo to PC Echo bytes 0x55 0xFF Reply Byte(s) There are two header bytes with values 0x54, 0xFE preceding every command. Following the header bytes are command bytes. Most commands require only one byte, but some require a second parameter byte. An extended command can contain multiple bytes. See command chart for details. After receiving each command, the GoGo board will respond by sending echo bytes. That is, the gogo will send back whatever it has received. Then, it will send an acknowledgment header. This header consists of two bytes with values 0x55 and 0xFF respectively. Other bytes may follow as described in the Command chart.

GoGo Board Command Chart Note that every command byte is always preceded by two header bytes (0x54, 0xFE) and the reply byte(s) are also preceded by two header bytes (0x55, 0xFF). Command CMD CMD byte Len CMD Parm Ext 2 nd byte Reply Ping 1 000 Board ID Ack,BID,BV,FV Read sensor 1 001 SSS RM SSh,SSl Motor control 1 ON 010 000 XX Ack OFF 010 001 XX Ack Reverse 010 010 XX Ack direction This way 010 011 XX Ack That way 010 100 XX Ack Coast 010 101 XX Ack Set motor control 1 011 PPP XX Ack Talk to motor 2 100 XXX XX Motor bits Ack Set burst mode 2 101 XXX BM Burst bits Ack + burst cycles* Misc controls 2 User LED on 110 000 00 XX Ack User LED off 110 000 01 XX Ack Beep 110 001 XX XX Ack Set PWN duty 110 010 XX Duty cycle Ack Upload EEPROM 110 011 EL1 EL2 Ack + Data** I 2 C start 110 100 00 XX I 2 C stop 110 100 01 XX I 2 C write 110 100 10 I 2 C data I 2 C read 110 100 11 Ack indicator Autorun OFF 110 101 00 00 Ack Autorun ON 110 101 00 01 Ack Extended CMD byte 2 111 111 11 - Depends on command * See Burst Mode section for more info ** See EEPROM upload section for more info

Extended Commands An Extended command begins with a command length byte, which determines the length in bytes of the extended command. The second byte is the command byte. Any remaining bytes are parameter bytes. Therefore, the entire command stream (including the first command byte) is as follows: 0xFF Length Ext CMD Parameter bytes.. Oxff = First command byte. Notifies the board that this is an extended command Length = Length of the extended command in bytes. Ext CMD = The extended command byte. See the table below for a description. Parameter bytes = The remaining Length-1 bytes used as parameters. Command Byte definition Command Len CMD byte CMD Parm Extended byte(s) Reply Read from RTC 1 0000 0000 RTC packet*** Write to RTC 8 0000 0001 7-byte RTC packet*** Ack *** A Real-time-clock (RTC) packet consists of a 7 byte stream as follows: Byte1 = Seconds, Byte2 = Minutes, Byte3 = Hours, Byte4 = Day of week (1-7) Byte5 = Date, Byte6 = Month, Byte7 = Year (where 00 = year 2000)

Legend Symbol Values Note X Don t care; this should always be 0. Ack 0xAA Acknowledge byte. Board ID 0-31 Applicable only when using multiple GoGo boards (via RF, or I 2 C). 0 = local board (default). BID Board ID. 01 = GoGo board BV Board version 0x40 = version 4.0 FV Firmware version (runs from 0 to 255) SSh, SSl Sensor value bytes (high and low, respectively). SSS 0-7 Sensor number. RM* (read mode) 0 Default. Gets current sensor value. 1 Read-max. Gets maximum sensor value sensed since the last max-value read operation. The board resets this max-value after each read. 2 Read-min. This is the opposite of read-max. PPP 0-7 Motor power level. Motor bits Each bit in this byte represents a motor port (bit 0 is port A, bit 1 is B, and so on). If a bit is set, its corresponding motor port will be active. BM 0, 1 0 = normal mode (~30 Hz per channel), 1 = slow mode (~10 Hz). Burst bits Each bit in this byte represents a sensor port (bit 0 is sensor 1, bit 1 is sensor 2, and so on.) If a bit is set, its corresponding sensor will be included in the burst mode stream. Burst cycle 0x0C + high byte + low byte. Bits 5-7 of the high byte contain the sensor number. Duty cycle 0-255 Sets the PWM (pulse width modulation) duty cycle for the active motors. EL1 & EL2 0-1023 Number of blocks to upload from the EEPROM. One block is 32 bytes (16 sensor values). EL1 is the upper 2 bits and EL2 is the remaining 8 bits. I 2 C data Ack indicator One data byte. For I 2 C write, this byte may contain a 7-bit slave address, in which case the final bit is used to specify whether the slave is going to receive (0) or transmit (1). 0, 1 Specifies whether the device that issued the i2c_read command will ack after receiving data. i2c_read(0) = no ack, i2c_read(1) = ack. * The read mode feature has been removed starting from GoGo 2.3 firmware MS2. The board will no longer keep the max and min values.

Burst Mode. Burst Mode is designed for applications that need maximum sensor refresh rate. With out the burst mode, you need to make a request to the GoGo board (with the read sensor command) every time you want to refresh your sensor data. With the burst mode, the GoGo board will actively stream new sensor data to you. To activate the burst mode, you need to send a set-burst -mode command together with a burst-cycle byte (see command chart). The burst-cycle byte tells the GoGo board which sensor ports to include in the burst cycle. A burst-cycle byte of value 0 deactivates the burst mode. A burst cycle consists of X sensor chunks where X is the number of activated sensors. Each sensor chunk is three bytes long and contains a sensor value. Here s the format of a sensor chunk: Byte 1 Byte 2 Byte 3 0x0C Sensor Value (high byte)* Sensor Value (low byte) 0x0C is the header of a sensor chunk Sensor Value bytes contain the 10 bits sensor value *Bit 5-7 of the high byte sensor value contains the sensor number. Example 1: Example 2: A burst-cycle byte of 0000 0010 will tell the GoGo board to stream sensor two. Here s an example of a burst cycle: Byte 1 Byte 2 Byte 3 0000-1100 0010-0001 0100-0100 Bits 5,6,7 of the sensor value high byte (underlined) is 001 indicating that this is sensor 2. The actual sensor value is 01 0100 0100 = 324 A burst-cycle byte of 1001 0010 will tell the GoGo board to stream sensor 2, 5, and 8. Thus, one burst cycle will consist of 9 (3x3) bytes. Here s an example of a burst cycle: 0000-1100, 0010-0001, 0100-0100, 0000-1100, 1000-0000, 0000-0010, 0000-1100, 1110-0010, 0000 1001 Bits 5,6,7 of the second, fifth, and eighth byte are 001, 100, and 111 indicating that they are sensor values of port 2, 5, and 8 respectively. Their sensor values are 01 0100 0100, 00 0000 0010, and 10 0000 1001 accordingly.

EEPROM Upload Protocol Follow these steps to trigger an auto-upload. 1. Send 0x54, 0xFE, 0xCC, 0x00 to the gogoboard. This puts the gogo in an auto-upload mode. 2. The Gogo board will send echo the bytes then send ack bytes (0x55,0xFF, 0xAA). 3. The Gogo will send four bytes. 0xEE, 0x11, uploadlen (low byte), uploadlen (high byte). The first two bytes are just headers. The latter two are the upload length in bytes. 4. The GoGo will then start sending the actual data. Each value is a 16-bit number. The order is lowbyte then high-byte. Here's an example session: Computer->GoGo : 0x54, 0xFE, 0xCC, 0x00 // command GoGo->Computer : 0x54, 0xFE, 0xCC, 0x00 // echo GoGo->Computer : 0x55, 0xFF, 0xAA // ack GoGo->Computer : 0xEE, 0x11, 0x06, 0x00 // upload header GoGo->Computer : 0x00, 0x00, 0x01, 0x00, 0x02, 0x00 // the data In this example the gogoboard uploaded three 16-bit values: 0, 1, 2 respectively. Note. You may find that the gogo seems to be excessively sending stuff back to the computer with all the echos and acks. This was done to provide compatibility with the Cricket download protocol. In practice, once you send the command bytes to the gogo you can just wait for the upload headers (0xEE, 0x11) while ignoring the others.

Example commands: Command Bytes to send Reply bytes (After Echo Bytes) Ping 0x54 0xFE 0x00 0x01 0x40 0x0A Turn on motor A 0x54 0xFE 0x80 0x01 (Activate motor A) Found board type 1 (gogo), Board version 4.0, Firmware version 10 0x54 0xFE 0x40 (Turn motor on) Turn on motor C 0x54 0xFE 0x80 0x04 (Activate motor C) 0x54 0xFE 0x40 (Turn motor on) Turn on motor A and C 0x54 0xFE 0x80 0x05 (Activate motor A,C) 0x54 0xFE 0x40 (Turn motor on) Read sensor1 0x54 0xFE 0x20 0x55 0xFF 0x01 0x37 (Sensor value is 0x137) Turn on burst mode for sensor 1 and 8 0x54 0xFE 0xA0 0x81 + Burst Cycles