Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Flushing of tx buffer in msp430g2553

$
0
0
Hello, rs485transmit(); for (i=0;i<2;i++) { UART_PUTCHAR(0x01); UART_PUTCHAR(0x04); UART_PUTCHAR(0x00); UART_PUTCHAR(0x0C); UART_PUTCHAR(0x00); UART_PUTCHAR(0x02); UART_PUTCHAR(0xB1); UART_PUTCHAR(0xC8); } rs485receive(); rx = UART_GETCHAR(); If I try to switch from transmit to receive of rs485 then it does not show last 2 bytes 0xB1 and 0xC8 instead it shows 0x00 only one time but if i do not use receive function then i transmit all bytes correctly. These are my transmit and receive function: void rs485transmit() { P2OUT |=BIT0; P2OUT |=BIT1; } void rs485receive() { P2OUT &=~BIT0; P2OUT &=~BIT1; }

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>