sherazi
Banned
- Joined
- Feb 15, 2010
- Messages
- 388
- Helped
- 61
- Reputation
- 126
- Reaction score
- 61
- Trophy points
- 1,318
- Location
- Muscat, Oman, Oman
- Activity points
- 0
regards
i am using a rs 485 communication and befor switching the enable line thats on PC5 i have to check so that a current operation (recieve transmit doent affect)
for swithing from transmit to recive i have to check TXC flag and i implement that as follw
what should i do when switching from Transmit to receive ? so that if a on going receive activity is there it shouldn't be discarded?
i am using a rs 485 communication and befor switching the enable line thats on PC5 i have to check so that a current operation (recieve transmit doent affect)
for swithing from transmit to recive i have to check TXC flag and i implement that as follw
Code:
while ((UCSR0A & (1 << TXC)) == 0){};
PORTC&=~0x20; // start recieving
UCSRA|=(1<<TXC); // clear TXC