Other Parts Discussed in Thread: MSP430F2618
I am using the UART of an MSP430F2618 to drive an RS485 communication line using half duplex. The driver must be switched on during transmit and off during receive periods. I am using a UART interrupt to transfer a string of characters to the TXBUF register. The interrupt occurs as the previous char is transferred from the buffer register to the shifting register. This occurs at the middle of a start bit. As the last character I want to send is loaded into the shift register, I put a dummy character into TXBUF to create another interrupt after this last character is actually sent. I use this final interrupt to switch the RS485 driver off and to "kill" the dummy character by resetting the UART. Unfortunately, by this time, half of a start bit has already gone out which can cause problems for the receiving RS485 device. This technique has worked with other versions of MSP430s but not this one. I have considered using "idle" line features to stop the "start" bit but this only delays the same problem. I tried using the UCBUSY flag but it doesn't generate an interrupt and it changes state at the wrong time. I have also considered using a timer interrupt in parallel to control the driver but my timers are pretty active doing other functions. Any ideas?
John