
I. General Description:
The converter allows the user to quickly implement data streams to an SPI interface by using a standard RS232 serial port.
Depending on the type of interface selected in the menu, 6 wires are provided for the following signals: Select (+ or -), Clock (+ or -), Data In, Data Out, Enable and Spare. Connect the wires to the target interface then connect the serial input DB9 on the converter to a standard serial port on a PC or other terminal type device. Apply +9v and Ground where noted and the converter will be ready to use.
II. Operation:
a. Getting Started:
The serial communication setup should be Xon/Xoff protocol, No Parity , 8 bits, 1 Stop Bit.
Using a terminal program (such as Hyperterm on a PC), and with power supplied to the converter, hit the RETURN key. The converter will use this to determine the BAUD rate you are using (up to115.2KB).
The converter will display |
|
| BaudRate = (9600 thru 115200) | These are the available baud rates |
| Mode = (Master/Slave) | The converter is the Master or Slave |
| Clock Pol = (1,0) | Clock Polarity Idle - Clock speed is 100 Kbi |
| Clock Edge = (1,0) | |
| Menu | |
| Enter Data | Enter data for sending to the target. Escape to break, CR to send. |
| Receive Data |
Receive data
monitor / Ensure you are in SLAVE mode
|
| burSt enter | burSt
- data
will be sent out the SPI port upon reception of the first RS232 byte and continue streaming out the SPI port until no new character is received. Select will go low upon the reception of the first character, and go high after 'x' multiples of 100 usecs after the last character is sent. |
| Bin/heX/Ascii | Binary (11000011) / heX (C3) / Ascii (A,b,c) mode. |
| nVram/nO | nVram
mode in Hex (only) allows up to 16 hex characters to be entered followed by a CR. Select will be held active untill an Esc character is sent. Data will be displayed after each CR. This allows for lengthy data transfers; nO turns off NVRAM mode |
| ^=Mode |
^
Causes the basic
configuration mode menu to be accessed.
|
There are 3 basic modes of operation: Hex, Binary and Ascii.
In Hex mode, ascii characters are converted to Hex nibbles. Example, the ascii code for an 'A' is '41' and the numbers are '0 - 9', '30-39'. Therefore, if the user enters a '4' and an 'A' the single hex character of '4A' would be created.
In Binary mode, '1's and '0's will create the binary string one bit at a time.
Example "100111000100" is created by the ascii 1 and 0.
No data will be sent until a Return "<cr>" is sent The data will be streamed out and new data can be entered.
In Ascii mode, the menu and header are not printed out. At the OK> prompt, enter the command 'E' followed by an '02' (STX), followed by the byte count to be transfered (up to 32D or 20H) and send the data. The data will be streamed out the SPI when the last byte is transfered. This mode is useful for fast data transfers under PC software control. Example: "'e',02,08,<8 bytes of data>" where 'e' is a HEX 45 or 65, and 08 is the byte count. Received data will be returned as HEX data.
In burSt enter mode, data packets can be sent continuously; the converter will stay in this mode until reset (power off/on) or, if selected in the menu, after 10 minutes of no new packets being sent.
c. Reading Data:
While the Entered data is being clocked out, the Data In line is being read. Data read will be displayed in hex format after the Entered data has been sent. Data In will be sampled at the End of data output time.
d. Changing Modes
The ^=Mode option will take the user to a 2nd menu where is will be possible to change the mode of operation listed in the opening salutation above in a.
e. Receive Data.
Place the Converter in SLAVE mode. At the main menu, type an 'R' to enter receive mode. At this time the Converter is a slave and will monitor the data after the SELECT line (which it is monitoring) goes low. There are 2 modes of monitoring in Receive mode: Burst and buFFer. Burst mode will return a serial character after each character received at the SPI port. However, due to the relative slowness of the RS232 port, the SPI data rate should be less than the RS232 rate. BuFFer mode will stream SPI characters in (up to 160 characters in a single SELECT), then send them over the RS232 port to the host. Because the RS232 serial port is slow, the SPI transmissions can be at high data rates, but the buffer can only be emptied at the RS232 rate. During the RS232 port transmissions, the SPI SELECT activity will be ignored. To exit this mode, reset the Converter by powering it off then back on.
(Note: If the Converter is used to monitor communication between 2 other SPI devices, make sure you disconnect the DATA OUT from the converter to the communication link.)
III. Wiring Details
| RJ45 wiring | |
| 5 | Select |
| 2 | Brown Select #2 |
| 6 | Clk |
| 8 | Dout (to device under test) |
| 7 | Din (to converter) |
| 4 | ~ +9vdc (regulated to +5v in the converter) |
| 3 | Gnd NOTE:
Make certain the
Ground on the converter is referenced to the same ground as the circuit under test. |
| 1 | Spares |
| 1 | 2 |
3 |
4 |
5 |
6 |
7 |
8 |
The SPI<==>RS232 converter uses Microchip's 16F876 as the core of it's conversion. Refer to the data sheet for that part for further detailed information on both the SPI module and the USART.
http://ww1.microchip.com/downloads/en/DeviceDoc/30292c.pdf