PNI Legacy Comm Board User Manual

R07 Revised: August 2008
PNI CommBoard (RS-232, RS-485)

General Description

The CommBoard is a communication interface designed to connect the MicroMag and V2Xe modules to a host system that uses a standard serial interface, such as a PC. It is typically used as a prototyping and evaluation tool for PNI’s line of compass and magnetometer modules. The PNI CommBoard is also used for production when the host system requires a higher level serial protocol to interface to the PNI sensor modules. The first version of the PNI CommBoard features a user selectable RS-232 or RS-485 interface to the host system. The CommBoard developer kit comes with software for the PC that has a graphical user interface (GUI) to control every aspect of the CommBoard and any PNI module that is attached to it.
In the future, different interfaces may be made available as customer needs are identified. Please contact PNI for support with your custom interface high-volume opportunity
.

Features

Small size: 53 x 25 x 11 mm RS-232 and RS-485 interfaces for
connection with PCs or other serial interface systems
GUI control software available from PNI,
either as part of the developer kit or via the web
Built-in support for PNI MicroMag and
V2Xe sensor modules, as well as several future products
Voltage regulator converts 6 - 12 VDC to 3
VDC for power to the sensor modules
Minimal code changes required when
upgrading from PNI’s TCM-2 line of tilt compensated magnetometer compass modules

Applications

Fast compass and magnetometer prototypingNew product evaluationEducation, school projectsAny legacy compass application that has an
RS-232 interface but needs the performance of new PNI products
Production applications where standards
based protocols are preferred over SPI.
Ordering Information
Name Part # Package
CommBoard Kit (with cable & software)
Table 1
PNI Sensor Corporation 133 Aviation Blvd., suite 101, Santa Rosa, CA 95403-1084 USA
Phone: (707) 566-2260, Fax: (707) 566-2261, Web: www.pnicorp.com Page 1 of 42
90009 Each
This page left intentionally blank
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 2 of 42
SPECIFICATIONS
CAUTION:
Stresses beyond those listed under Table 2: Absolute Maximum Ratings may cause permanent damage to the device. These are stress ratings only. Functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.
Table 2: Absolute Maximum Ratings
Symbol Parameter Minimum Maximum
VDD DC supply voltage -0.3 VDC 16 VDC
VIN
T
Storage Temperature -40°C 85°C
STRG
Input pin voltage (CTS, RxD) to ground
Input pin voltage (TxD, RTS) to ground
Input pin voltage (D+, D-) to ground
CommBoard
Specifications
-25 VDC 25 VDC
-13.2 VDC 13.2 VDC
-13.2 VDC 13.2 VDC
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 3 of 42
Table 3: Characteristics
Parameter Minimum Maximum Typical Operating Characteristics
Current – standby (Low power mode, no module loaded)
LPM0a 14.4 mA RMS
b
LPM1
7.0 mA RMS
LPM2c 5.4 mA RMS
RS-232 Receiver Inputs (CTS, RxD)
Input threshold low 0.6 VDC
Input threshold high 2.0 VDC
RS-232 Transmitter Output (TxD)
Output Voltage Swing (both transmitter outputs loaded with 3K to GND)
Output resistance
= V+ = V- =0, output = 2 V)
(V
CC
Output short circuit current (Output = GND)
RS-485 Transceiver Signals (D-, D+)
Input differential threshold -200 mVDC -50 mVDC
Differential output voltage (R = 27 Ω)
Change in magnitude of differential output voltage for complementary output states
(R = 27 or 50Ω)
Common mode output voltage (R = 27 or 50 Ω)
Change in magnitude of common mode output voltage for complementary output states
(R = 27 or 50 Ω)
Output sort-circuit current (V
or VZ = +12 V to – 7 V)
Y
a. The unit is in normal operating mode with the LEDs enabled. b. The unit is in normal operating mode with the LEDs disabled.
c. The unit is in a Sleep mode and will need to be awakened via the CTS (Wake Up) line.
CommBoard
Specifications
±5 VDC ±5.4 VDC
300 10M
±60 mA ±30 mA
1.5 VDC
-0.2 VDC 0.2 VDC
3.0 VDC
0.2 VDC
±250 mA
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 4 of 42
Serial Pin Descriptions
Figure 1: Jumpers and Connectors
CommBoard
Specifications
Table 4: Serial Pin Descriptions (J1)

Pin Name Function

1 TxD RS-232 transmitter output (transmitted data)

2 Reserved RS-232 transmitter output (reserved)

3 n/c not connected

4 RxD RS-232 receiver input (received data)

5 D– RS-485 transceiver signal (inverting RS-485 signal)

6 D+ RS-485 transceiver signal (non-inverting RS-485 signal)

7 n/c not connected

8 GND Ground

9 VCC Supply voltage (5 to 12 VDC)

10 GND Ground

RS-232 and RS-485 Jumper Settings
Table 5: Jumper Configuration

Configuration Mode

JMP1 installeda RS-232

JMP1 removeda RS-485

JMP2 installedb RS-485; 120 line termination

JMP2 removedb RS-485; no line termination

a. The processor only checks the status of JMP1 at power up. IF the position of the jumper
needs to be changed, either cycle the power or press the RESET switch after the change has been made.
b. JMP2 must only be installed on the last unit of the network. All other units need to have
JMP2 removed for proper RS-485 operation.
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 5 of 42
Serial Pin Descriptions (cont).
CommBoard
Specifications
Table 6: Connector J2

Pin Function I/O Direction

1 SCLK Output

2 MISO Input

3 MOSI Output

4 SSNOT Output

5 DRDY Input

6 SYNC Output

7 GND

8 GIO0 Output low

9 GIO1 Output low

10 GIO2 Output low

11 GIO3 Output low

12 VDD
13 VCC

14 GGND

PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 6 of 42
CommBoard
Specifications
Hardware Modes
The CommBoard provides a serial interface to PNI’s sensor modules. Its purpose is to translate a serial command from a host system into the appropriate SPI command. If the sensor module does not support the command, it will return the appropriate error code. Otherwise, it will return the associated data. See the applicable PNI module data sheet for specific information on communication and control using the SPI interface.
RS-232 mode uses software handshaking to communicate.
o Xon = ^Q = 0 x 11 (okay to send data) o Xoff = ^S = 0 x 13 (stop sending data)
RS-485 mode is only Half-Duplex.
o The Continuous Output (go) command is not allowed since Half-Duplex implies queried
responses only.
o The CommBoard acts as a Slave when the JMP1 is removed.

Example

!FF00$C194.74X-106.00Y-403.00Z98.00:E200*1E !DdSs${data}*<dcs><es>
Table 7: Hardware Modes
! RS-485 data delimiter
Dd Destination address
Ss Source address
$ Start data delimiter
{data} Selected data output
* End data delimiter
<dcs> Checksum
<es> End of message based on eol variable <cr> or <lf> or <cr><lf>
NOTE:
The query and response format must match. All examples in this manual show the query and response of the RS-232 mode. When using RS-485 just add the RS-485 data delimiter, destination address, source address and checksum, to the examples shown.
Checksum
The CommBoard uses a XOR checksum method from the beginning of the string up to, but not including, the end data delimiter (“*”). Examples:
RS-232 RS-485
Sent Command
Reply
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
id? (no checksum required) !00ff$id?*37 $id=3*27
!00ff$id?*06
Page 7 of 42

Standard Data Output Modes

PNI Standard Output Mode (sdo=t)
The PNI Standard Output Mode may be configured to provide all sensor data availability, or only the data you require.
EXAMPLE:
$C194.74X-106.00Y-403.00Z98.00:E200*1E ${data}*<dcs><es>
Table 8: Standard Output Modes

$ Start data delimiter

{data} Selected data output

* End data delimiter

<dcs> Checksum up to but not including “*”

<es> End of message based on eol variable <cr> or <lf> or <cr><lf>

NMEA Output Mode (National Marine Electronics Association ) (sdo=n)
The NMEA Output mode conforms to the 0183 specification. In this mode, only compass heading information is available.
EXAMPLE:
$HCHDM,71.33,M*2F $HC<sid>,{data},<dt>*<dcs><es>
CommBoard
Specifications
Table 9: NMEA Output Modes

$ Start data delimiter

HC Heading compass (magnetic), Talker ID

<sid> Heading magnetic = HDM, heading true = HDT, Sentence ID

71.33 Heading degrees

<dt> Data type M = magnetic, T = true

* End data delimiter

<dcs> Checksum

<es> End of message based on eol variable <cr> or <lf> or <cr><lf>

PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 8 of 42
Raw Output Mode (sdo=r)
The Raw Output mode allows for the output of the raw, uncorrected data for any or all of the required sensors. The Raw Output Mode is the only mode where Z-Axis is active.
EXAMPLE:
$raw,X53Y-420Z0*6E $raw,{data}*<dcs><es>
Table 10: Raw Output Modes

$ Start data delimiter

{data} Selected data output

* End data delimiter

<dcs> Checksum

<es> End of message based on eol variable <cr> or <lf> or <cr><lf>

NOTE: For modules with a Z-axis when used in other modes than raw, Z-axis is turned off and module is run as a Z-axis system since no tilt compensation is being done.
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 9 of 42
Command Line Interface
CommBoard
Command Line Interface
The Command Line interface allows you to use a simple terminal program to communicate with the CommBoard. The Command Line interface also allows applications written in any language, including Assembly, Basic, or C to communicate with the CommBoard via the RS-232 or RS-485.

Command Sequence

The sequence of command line events is:
1. Type in the command on the terminal program:
2. The module processes the command.
3. A reply is sent back to you. a. If no error b. If error
$cmdreply*<dcs><es> $cmdreply:Exxx*<dcs><es>
cmd?<es>
Table 11: Command Notation Table

Command Symbol

? Indicated query only command or variable
= Indicates assign only command or variable

<aq>

<es>

$ Start of checksum data

! RS-485 address follows

:

* End of checksum data

<dcs> Checksum

<er> Start of data

n n Usually a lower case ‘n’ will represent a digit (0-9)

n.n n.n Represents a decimal value (positive or negative)

x x Usually a lower case ‘x’ will represent a hex digit (0-F)

xx xx Represents a Uint8

xxxx xxxx Represents a Uint16

xxxxxxxx xxxxxxxx Represents a Uint32

a. XOR checksum method.

Response Symbol

Description

Use ? for query or =<val> for assign Ending sequence <cr> or <lf> or <cr><lf>

If error occurs; :Ennn

PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 10 of 42
Example Command Notation
m<aq><es>
This will be interpreted as a query: em?<es> This will be interpreted as assignment: em=<val><es>
Example Response Notation
$em=<val>*<dcs><er>

Ending Sequence

Command Line Interface
CommBoard
The CommBoard will accept either
EOL (end of line) Response
The CommBoard will send a response to you in the chosen EOL format.
If (eol=cr) Send (“\r”) If (eol=lf) Send (“\n”) If (eol=crlf) Send (“\r\n”)
<cr> or <lf> or <cr><lf> as an end of line (eol) indicator.
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261
For the most current specifications, please visit our website at: www.pnicorp.com
Page 11 of 42
Command Line Interface
CommBoard
Error Codes
Error codes are a bitmap to the error that has occurred and are sent when an error condition has occurred.

Example

$C194.74X-106.00Y-403.00Z98.00:E200*1E $Cnnn.nnXnnn.nnYnnn.nnZnnn.nn:Exxx*<dcs><er>
Exxx: “xxx” are hex values between 0 - F.
The built-in error command to parse error messages, error ffff<cr><lf>, will list the error codes.
Table 12: Error Codes
Code Description
E800 EEPROM1 error a
E400 EEPROM2 error a
E200 Module not calibratedb
E100 Module not capable
E080 Internal error
E040 Command parameter invalid
E020 Command/data mode conflict
E010 Command invalid or unavailable
E008 Module not found
E004 Magnetometer out of range
E002 Inclinometer out of range
E001 Magnetic distortion alarm
a. Indicates a possible problem with the unit. Please contact PNI
Corporation A compass heading of –1.00 will be output when the module is not
b.
calibrated. $c-1.00:E200 Indicates that the magnetic field has changed significantly since
c.
the last calibration. See the specific module data sheet for the parameter range
.
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 12 of 42
ACTION COMMANDS
factory (Factory Settings Restore)
Restores the CommBoard and modules to the factory default configuration.
Syntax: Response Format: $factory*<dcs><er>
go (Continuous Output)
Instructs the CommBoard to enter continuous mode. The CommBoard will begin sampling sensors at the rate specified by the Polling Frequency (pollfreq) command.
Syntax:
Response Format: $(select data)*<dcs><er>
Notes: Stopped using the h command
h (Halt Continuous Output)
Instructs the CommBoard to exit the continuous output mode.
Syntax:
h if halt = e
Response Format: $h*<dcs><er>
help or ? (Help Menu)
Instructs the CommBoard to display the Help menu.
Syntax: Response Format: Menu Data
factory<es>
go<es>
h<es> if halt = d see halt command
help<es> or ?<es>
CommBoard
Action Commands
PNI Corporation 133 Aviation Blvd., Suite 101, Santa Rosa, CA 95403-1084 USA;, Fax: (707) 566-2261 For the most current specifications, please visit our website at: www.pnicorp.com
Page 13 of 42
Loading...
+ 29 hidden pages