Home/Support/Support Forum/RS485 problem
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

RS485 problem

0 votes
I get problem when used RCM5600W development kit.

Why receive buffer not empty after I've flush serial input buffer, then send data out?

I send data out the serial port, but the data also enter into the serial buffer. Its echo mode?
Code:
// 1. Clear RX buffer serXrdFlush(SER_PORT_F); // 2. Read RX buffer status, RX buffer is empty in here (it's OK) printf("RX BUFFER AFTER FLUSH: %d\n", serXrdUsed(SER_PORT_F)); // result = 0 // 3. Send mode serF->xRTSon(); // 4. Sending data serXputc(SER_PORT_F, EOT); serXputc(SER_PORT_F, DeviceID); serXputc(SER_PORT_F, POLLING); serXputc(SER_PORT_F, ENQ); // 5. Wait until data is sent while(serXwrUsed(SER_PORT_F)>0); // 6. Read RX buffer status, Why RX buffer is not empty, I clear RX buffer on top of code(step 1). // I see 4 characters in RX buffer (Its problem). printf("RX BUFFER AFTER TRANSMITE: %d\n\n", serXrdUsed(SER_PORT_F)); // result = 4 // 7. Receive mode serF->xRTSoff(); // Receive data in here
asked May 31, 2015 in Rabbit Software by edha Community Contributor (71 points)
edited Jun 1, 2015 by edha

Please log in or register to answer this question.

1 Answer

0 votes
 
Best answer
I solved the problem by changing the existing wiring in Serial Communication Accessories Board of RCM5600W.

I cut wiring from pin /RE(2) of SP3072EEN to ground(GND) and connect pin /RE(2) with pin DE(3).

By changing the wiring as above, so when we send the data out the serial port, the data actually only out, and will not go into serial buffer (echo mode). :)
answered May 31, 2015 by edha Community Contributor (71 points)
...