Changes

Jump to navigation Jump to search
added protocol information
Line 59: Line 59:     
MC34051 RS-422 transceiver chip.
 
MC34051 RS-422 transceiver chip.
 +
 +
== Protocol ==
 +
 +
The encoder uses a full duplex RS-422 UART to connect to the host:
 +
 +
{| class="wikitable"
 +
! Baud Rate
 +
| 2,500,000
 +
|-
 +
! Data Bits
 +
| 8
 +
|-
 +
! Stop Bits
 +
| 1
 +
|-
 +
! Parity
 +
| none
 +
|}
 +
 +
For interacting with the encoder from a PC, a USB to serial supporting a higher than usual baudrate must be used. A convenient converter that also has native RS-422 support is a [[MaxLinear XR21B1420IL28-0A-EVB USB to RS-232/422/485 Evaluation Board]].
 +
 +
Requests from the host seem to be a single byte, and the response is multi-byte with a checksum. For recognized commands the response's first byte is the request byte echo'd back, and it seems for unrecognized commands it has a default response. Here is a list of known commands:
 +
 +
{| class="wikitable"
 +
! Request
 +
! Response Length
 +
! Description
 +
|-
 +
| 0x02
 +
| 7
 +
| angle only (no full revolutions)
 +
|-
 +
| 0x1A
 +
| 11
 +
|-
 +
| 0x2A
 +
| 9
 +
| same as 0xA2?
 +
|-
 +
| 0x32
 +
| 9
 +
| same as 0xA2?
 +
|-
 +
| 0x4A
 +
| 11
 +
|-
 +
| 0x52
 +
| 11
 +
|-
 +
| 0x62
 +
| 9
 +
|-
 +
| 0x7A
 +
| 3
 +
|-
 +
| 0x8A
 +
| 6
 +
| full revolutions only (no angle)
 +
|-
 +
| 0x92
 +
| 4
 +
|-
 +
| 0xA2
 +
| 9
 +
|-
 +
| 0xBA
 +
| 7
 +
|-
 +
| 0xC2
 +
| 11
 +
|-
 +
| 0xDA
 +
| 11
 +
|-
 +
| 0xEA
 +
| 9
 +
|-
 +
| 0xF2
 +
| 3
 +
|-
 +
| 0xF4
 +
| 3
 +
|}
 +
 +
Other possible commands are: <code>0x0A 0x22 0x3A 0x42 0x5A 0x6A 0x72 0x82 0x9A 0xAA 0xB2 0xCA 0xD2 0xE2 0xF3 0xF5-0xFF</code>
    
== Online Resources ==
 
== Online Resources ==

Navigation menu