SBAS940 December 2018 DAC8742H
PRODUCTION DATA.
FOUNDATION FIELDBUS and PROFIBUS PA are half-duplex communication protocols where only the encoder or decoder are active at any time and the DAC8742H arbitrates over which path is active. When interfacing the FOUNDATION FIELDBUS or PROFIBUS PA modem via the UART interface, data placed in the transmit FIFO is automatically placed on the FF/PA bus until the FIFO is empty any time the device is not receiving data, assuming correct data format.
When receiving data the decoder will expect a preamble byte(s) and a start delimiter byte. These bytes, as well as the stop byte, will be stripped from the UART communication and only the first data byte will be transmitted to start the data packet. The host controller must use a timer to detect the end of the packet. Each byte transmitted on the UART will be at 57.6 kHz BAUD and byte spacing of 256 us. If a new byte has not been started within 512 us it can be assumed that the incoming packet has ended.
The device expects to see a four byte sequence to initiate transmission: 0xEA followed by 0x80-0x9F, where bits 4:3 of the second byte configure an interrupt threshold for the transmit FIFO level and bits 2:0 set the number of preamble bytes to be transmitted. The third byte contains the information to configure the Jabber Inhibitor followed by the final byte of 0xAE. To send inverted Manchester encoded data the first byte, 0xEA, is inverted to 0x15 and the first three bits of the second byte are inverted such that the range of values for the second byte are from 0x60-0x7F. The functionality of bits 4:3 and 2:0 and the Jabber Inhibitor byte remain the same and the final byte is inverted to 0x51. The details concerning this four byte sequence are explained in the tables below.
B3 | B2 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mode | D7:D0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |||||||
Non-inverted | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | D2M_LEVEL | PRE_BYTES | |||
Inverted | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | D2M_LEVEL | PRE_BYTES |
B1 | B0 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mode | D7:D0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |||||||
Non-inverted | JABBER_TIMEOUT | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | |||||||
Inverted | JABBER_TIMEOUT | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 |
CONTROL BITS | DESCRIPTION | ||||
---|---|---|---|---|---|
D2M_LEVEL | 0 | 0 | Alarm on UART_RTS when transmit FIFO has less than 2 bytes loaded | ||
0 | 1 | Alarm on UART_RTS when transmit FIFO has less than 4 bytes loaded | |||
1 | 0 | Alarm on UART_RTS when transmit FIFO has less than 6 bytes loaded | |||
1 | 1 | Alarm on UART_RTS when transmit FIFO has less than 8 bytes loaded | |||
PRE_BYTES | Number of preamble bytes is equivalent to the straight binary decimal value in this register plus one |
The JABBER_TIMEOUT bits control the timeout period for the Jabber Inhibitor. If a value of 0x0 is programmed the Jabber Inhibitor is disabled. Otherwise the timer will be programmed in 2.048ms increments such that the timeout can be calculated as shown below. If the Jabber Inhibitor triggers the CD pin will be taken high. The CD pin will be returned to logic low when the silence period of 3 seconds has ended.
The encoder will begin transmitting data once the following conditions are met: a valid four-byte transmission initiation sequence has been sent to the device, the FIFO is not empty, and the device is not receiving data. Transmission will begin by sending the preamble byte(s) followed by a start delimiter. Then, the encoder will begin to remove data from the FIFO – this creates at least a five-byte lag of the encoder with respect to the UART.
During transmission of a packet the UART must take care to ensure that the FIFO does not become empty before the packet is complete. The encoder transmits at a BAUD rate of 31.25 kHz or 256 µs per byte in the FIFO so the UART must keep up with this rate. The four-byte sequence that initiates a transmission includes setting a transmit FIFO threshold in bits 4:3. When the FIFO level is less than or equal to this threshold the UART_RTS pin will be taken high, this can be leveraged to ensure the FIFO is not prematurely empty. Once the FIFO is empty a stop delimiter is placed on the bus. Once the FIFO is empty a new packet can be initiated with a new four-byte transmission initiation sequence.
The device expects UART BAUD rate of 57.6 kHz. This BAUD rate is faster than the 31.25 kHz BAUD rate specified by FOUNDATION FIELDBUS and PROFIBUS PA, therefore FIFO overflow is possible. In order to prevent FIFO overflow, the UART_RTS pin FIFO threshold alarm can be leveraged by never adding more data to the FIFO than it can contain based on the programmed alarm threshold.