User Manual PNI CommBoard
Table of Contents 1 COPYRIGHT & WARRANTY INFORMATION ................................................. 1 2 INTRODUCTION ......................................................................................... 2 3 SPECIFICATIONS ......................................................................................... 3 3.1 Mechanical Drawing ............................................................................. 4 4 SET-UP ...............................................................................
1 Copyright & Warranty Information © Copyright PNI Sensor Corporation 2012 All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under copyright laws. Revised May 2013. For most recent version visit our website at www.pnicorp.com PNI Sensor Corporation 2331 Circadian Way Santa Rosa, CA 95407, USA Tel: (707) 566-2260 Fax: (707) 566-2261 Warranty and Limitation of Liability.
2 Introduction Thank you for purchasing PNI Sensor Corporation‟s CommBoard, pn 13466. The CommBoard is a printed circuit assembly (PCA) that acts as an easy-to-use interface between a PC and certain PNI products. The CommBoard is a UART to SPI or I2C bridge which receives UART commands from the user‟s computer via a virtual communication port running over a USB line. The applicable PNI products and their interface types are listed below.
3 Specifications Table 3-1: I/O Characteristics Parameter Host Interface Device Interface Value Communication Interface Protocol Communication Rate Communication Interface Lines CPOL SPI Interface CPHA Clock Speed Virtual UART on USB ASCII 115200 baud I2C or SPI SCLK, MISO, MOSI, SSN Selectable (default = 0) Selectable (default = 0) 50 kHz, 100 kHz (default), 1 MHz Selectable 32 kHz – 1 MHz (100 kHz default) I2C Clock Speed Table 3-2: Environmental Requirements Parameter Value Operating Temperatur
3.
4 Set-Up 4.1 Communication Setup The CommBoard‟s physical interface is USB, but it runs a virtual UART over the USB line. As such, it is necessary to implement a virtual communication port (VCP) on the user‟s computer. The CommBoard uses FTDI‟s FT232R USB-to-RS232 IC, and the driver for this IC should be installed on your computer. This driver can be found on FTDI‟s website at: http://www.ftdichip.com/Drivers/VCP.htm.
Figure 4-1: CommBoard Configuration Block Diagram 4.2 Hardware Setup Figure 4-2 indicates where power connections can be made to the CommBoard, and also where the signal lines are connected. For most users, the power and signal lines will be supplied via the mini-USB jack. Next configure the jumpers on the CommBoard to match your device, as illustrated in Figure 4-3.
Figure 4-3: CommBoard Jumper Configurations PNI Sensor Corporation PNI CommBoard User Manual DOC#1018122 r02 Page 7
Plug your PNI device into the CommBoard. Pin 1 of the device should plug into pin 1 on the CommBoard. For the SpacePoint Scout and V2Xe, this means the arrow printed on the device will point towards the CommBoard‟s mini-USB connector, while for the RM3100 and RM3000-f Evaluation Boards the arrow will point away from the mini-USB connector. Finally connect the CommBoard to your computer using a USB-to-mini-USB cable. The red and blue LEDs on the CommBoard should light up.
5 SPI Operation The RM3100 Evaluation Board, RM3000-f Evaluation Board and V2Xe incorporate a SPI interface. For the RM3100 an I2C interface is also available, as discussed in Section 6. This section reviews how to use the CommBoard to communicate with these SPI devices via a computer using a terminal emulation program. Note the CommBoard not only converts UART to SPI, but it also allows for control and monitoring of the SSN, CLEAR, and DRDY lines. 5.
Table 5-2 defines the characters used in the syntax description. Note that when {NIML} or (NIML) is used to define the word length, only N, I, M, or L should be present, not all four. If the word length is optional and no word length is defined in the sentence, then the prior specified word length will be used. Similarly, if the delimiter is optional and no delimiter is provided, then the prior specified delimiter will be used on return data.
for the MSB and “21” for the LSB. In summary, the following is sent after the complete Write command is executed (in decimal notation): 123 ,200 ,3 ,21. Example: Wi1,n1 The command will send the number “1” twice, once as a 16-bit word and next as an 8-bit word. The send bytes will look like 00,01,01. R or r – SPI Read This character initiates a Read operation. The syntax is: R{#n}{S}(NIML){{#n}{S}(NIML).....}{} Example: Rni This command will read an 8–bit word and then a 16-bit word.
~ – DRDY Hold This command causes an indefinite delay of processing subsequent characters received from the host until a „Q‟ character is received or the conditions of DRDY port pin are met. The syntax is: ~# such that # is either “1” or “0”, where “1” indicates DRDY must be HIGH to release the hold and “0” indicates DRDY must be LOW. Characters received from the host will continue to be stored in a 100-character buffer.
This command will not remove the Hold state. recognized. Note that only capital „F‟ is ? – Handshake Signal Status The status of SSN and DRDY lines are returned to the user in a single byte. The value of the byte indicates the status of these lines, as given in Table 5-3. Table 5-3: Handshake Signal Status Value SSN DRDY 0 1 2 3 LOW LOW HIGH HIGH LOW HIGH LOW HIGH ! – Pulse CLEAR Signal On receiving this command a 10 s pulse is generated on the CLEAR pin. This pin is normally LOW.
Z or z – Clock Rate At power-up the SPI clock rate is set to 100 kHz. Sending “Z” changes the clock rate to 1 MHz, while sending “z” changes it to 50 kHz. Rebooting the system will reset the clock rate to 100 kHz. T or t – Terminal Mode “T” turns on verbose terminal mode. “t” turns off terminal mode. The default is “t”. In terminal mode “T” all characters sent to the CommBoard will be echoed back to the host and sending the “?” command will return explanatory text. 5.
Example #1: $0r84nii$1 The breakdown of this command is as follows: $0 Set SSN line LOW r Set the CommBoard to Read Mode 84n Begin Read Mode by first sending 0x84 to the RM3100 module. 0x84 is the register read address of the MSB of the X-axis cycle counter register. If the Read command, “r”, is immediately followed by a value, then the value must be followed with an „n‟ character.
The received signal is: “00C8 00C8”. In this case, the return byte is not read. Note the default delimiter, , is used in the received signal. 5.2.2 More RM3100 Eval Board Code Examples Example #1: $0wn04,00,64,00,64,00,64$1 This sentence sets all three cycle count registers to 100D (0x64). Example #2: $0wn00,70$1 This sentence requests a single measurement be taken on all 3 axes. Example #3: $0wn01,71$1 This sentence places the RM3100 Eval Board in Continuous Measurement Mode.
Example #2: $0.wnaa,03,03,05,06,08,00$1 This sentence establishes which data components are to be reported by a V2Xe. In this case, 3 components are to be reported: heading, magnitude, and distortion. After writing this, the SSN line is set HIGH. Example #3: $0.wnaa,04,00$1.....$0rLLN$1 This sentence can be used to obtain measurement data from a V2Xe. Again, note the pause commands, in this case 5x2 ms or 10 ms total prior to reading the data.
6 I2C Operation The SpacePoint Scout and RM3100 Evaluation Board offer the option of using an I2C interface. Refer to Figure 4-3 to configure the CommBoard for the desired interface. This section reviews how to use the CommBoard to communicate using the I2C interface via a terminal emulation program. If the user will employ the Scout‟s UART interface, then the CommBoard simply passes the UART commands through the USB interface using the virtual communication port, as discussed in Section 4.1.
6.1 I2C Commands { or [ – Start Read or Write Packet The open brackets are used to start an I2C Read or Write packet. It does not matter which is used, as the end of the packet defines the type of transaction. } or R or r – Finish Read Packet An end curly bracket, an „R‟ character, or an „r‟ character finishes construction of an I2C packet to read data from the slave device and sends the packet to the slave device.
] or W or w – Finish Write Packet An end square bracket, a „W‟, or a „w‟ character finishes the construction of an I2C packet to write data to the slave device. The syntax of the packet is: [SLA REG data data data….data] Where: All numbers must be in 2-digit hexadecimal format. For example, the value zero must be represented as “00” and the value one as “01”. As a result, no delimiter is necessary. SLA is the 7-bit slave address in the 7 MSBits, plus the r/w bit in the LSB.
Y or y – Hold Always This command causes the indefinite delay of processing subsequent characters received from the host until a „Q‟ character is received. Characters received from the host, other than „Q‟ or „F‟, will be stored in a 100 character receive buffer. Once a „Q‟ is received the system will begin processing characters in the receive buffer in the order received. Q – Quit Hold Receipt of this character immediately releases any hold command presently set.