This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RS485 TX ENABLE signal

Hello!

I need to program a comunication between 2 DSP (28335 and 28035) with a RS485 bus. The drivers used for adapt signals has a TX enable pin. This pin must remain in '0' for enable the reception, and must be seted for transmit data. When I begin a transmission, my program set this pin correctly. For detect when the transmision is finished, I use the TXRDY interrupt, but if I clear the TX enable in that moment, there are 4 bits in buffer, and the transmision ends before this bits are sent. For detect when all bits have been sent, the DSP has a TXEMPTY bit, but this bit does no set an interrupt... The solution that I have implemented is check this bit by polling... There is any other solution for detect when all bits are sent for clear the TXENABLE pin? Thanks everybody!!

  • Pablo,

    TX EMPTY gets set after the data transmission and when just stop bit is sent out. TX EMPTY does not notify the completion of stop bit transmission. This does not generate interrupt.

    In non-FIFO mode, TXRDY gets set whenever the data in the SCITXBUF register is transferred to the TXSHF register. If you want to disable the transmitter after the end of transmission of data and stop bits, you might want to setup a timer when TXRDY bit gets set (you can use TX interrupt since TXRDY generates interrupt) such that timer fires an interrupt after the baud duration (including stop bit) is met. Remember to enable the TX interrupt (TXINTENA) before writing to SCITXBUF - If TXINTENA is enabled after writing the data to SCITXBUF, it will not generate an interrupt.

    Thanks and regards,
    Vamsi
  • Hello Vamsi!

    Thanks for your reply!!, I want avoid to use a timer only for this task... I found an alternative solution. I increased the speed of transmission, to 1,8Mbps and the delay produced by reading a pin and change its value is enough so the transmission ends. I'm using the TXRDY interrupt, and the delay I need is arround 2us. Thanks again!!!

    Regards!

    Pablo.