Post Go back to editing

Issue with MAX3140 UART when sending 64-bit frame using 16-bit frame configuration

Thread Summary

The user is attempting to send a 64-bit frame through the MAX3140 UART in a 16-bit frame configuration but only receives 8-bit data chunks on the TX line. The final answer confirms that the MAX3140 UART transmits only 8-bit data on the TX line, and the 16-bit configuration is not supported for this purpose. The user's half-duplex configuration and write/read register settings are noted, but the solution emphasizes that the UART's functional diagram and design limit it to 8-bit data transmission on the TX line.
AI Generated Content
Category: Software
Product Number: MAX3140

I am facing an issue with the MAX3140 UART when attempting to send a 64-bit frame through a 16-bit frame configuration. The MAX3140 uses a 16-bit frame for communication, where the upper 8 bits are designated for configuration, and the lower 8 bits for data. To send a 64-bit frame, I have broken it down into 8 separate 8-bit bytes and attempted to send these bytes as 16-bit words through the UART.

Actual sending frame ={0x02,0x03,0x00,0x00,0x00,0x02,0xC4,0x38}
modified frames  =
data_1[]={0x8002}
data_2[]={0x8003}
data_3[]={0x8000}
data_4[]={0x8000}
data_5[]={0x8000}
data_6[]={0x8002}
data_7[]={0x80C4}
data_8[]={0x8038}

However, the UART output I receive consists of 8-bit data chunks instead of the expected 16-bit words:

Actual outputs =


0x02
0x03
0x00
0x00
0x00
0x02
0xC4
0x38

Required out put=0x02 0x03 0x00 0x00 0x00 0x02 0xC4 0x38

It seems like the UART output is not aligning the 8-bit bytes into 16-bit words as intended. I have double-checked the code and the logic, but I'm unable to identify the issue causing this behavior.

Could you please review the code and provide guidance on how to resolve this issue? Any assistance or suggestions would be greatly appreciated.

Thank you.

  • Hi,

    Can you please confirm what your write and read configuration register bit assignments are for DIN and DOUT? RS-485/RS-422 operation, half duplex or full duplex?

    Best,

  • Hi,
    Thank you for your response

    write_configration[] ={0b1100000000001011} -  BINARY,  {0xC00B} - HEXADECIMAL
    read_configration[]= {0b0100000000000000} - BINARY,   {0x4000} - HEXADECIMAL

    We are Rs-485/rs-422 with half duplex  configuration

  • Hi,

    You should see 16-bit from DOUT if you are sending in at DIN. Where is your 8-bit output from? For TX pin UART Asynchronous Serial-Data Output, only last 8-bit data is transmitted. Please see below functional diagram.

    Best,

  • Hi,

    We are using a half-duplex configuration. In this setup, we send 16-bit data, with the upper 8 bits designated for configuration and the lower 8 bits for the data. Consequently, only 8-bit data can be received on the Tx line at a time, which is then transmitted to the Do line of the max3140. Our current need is to transmit 64-bit data from the Tx line to the Do of the max3140 simultaneously. Is it possible to store this data in the UART FIFO?

  • Hi,

    The UART FIFO receives data from RX pin, and RX pin is connecting to RO, receiving data from the bus. You wouldn’t be able to transfer data from DI to RX. When data is transmitting from DI to the bus (Z and Y), the receiver is disabled, RO = high-Z.

    Best,

  • hi,


    We have configured a half-duplex circuit as shown in the diagram. The write configuration is write_configration[] = {0b1100000000001011} To achieve the desired data on the Tx line ( modbus sensor input data frame) 0x02 0x03 0x00 0x00 0x00 0x02 0xC4 0x38 (64 bits), we need to send it 8 times with the following data sets:

    data_1[] = {0x8002}
    data_2[] = {0x8003}
    data_3[] = {0x8000}
    data_4[] = {0x8000}
    data_5[] = {0x8000}
    data_6[] = {0x8002}
    data_7[] = {0x80C4}
    data_8[] = {0x8038}

    The current output on the Tx line is:
    0x02
    0x03
    0x00
    0x00
    0x00
    0x02
    0xC4
    0x38

    Our goal is to have the output on the Tx line as 0x02 0x03 0x00 0x00 0x00 0x02 0xC4 0x38 at once, as this specific input frame is required for the modbus sensor to respond.






  • The Functional Diagram already shows only 8-bit data will be transmitted from Z and Y pins so the part cannot be used to transfer 16-bit data.