RS-485 serial transmission problem with arduino

hey guys I'm using rs-485 module to transmit data serially from one arduino uno to another uno if i connect the the 2 arduino boards directly without using the rs485 module the data is sent and received without a problem but when using the rs485 module the transmission stops here is code Tx code: void setup() { Serial.begin(9600); }

void loop() {

Serial.write(200); Serial.flush(); delay(50);

} Rx code:

include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { Serial.begin(9600); }

void loop(){ if (Serial.available()) // If data has come in from Master { int reply=; // Read the byte delay(10);

} I can't sea what is the problem i checked every thing wiring and code is so simple I'm just sending one number 200 and want to display it one the rx please help if any have an idea about this problem thanks any way.

by mohammad528
October 22, 2020

Are your DE and RE control signals correctly configured? They are not used when arduino I/O pins are connected directly, so information about their correctness (or not) is absent from your "good" test results. I am using nomenclature from Maxim (RS-485 chip or module) so there might be different names in your hardware.

The minimum configuration for uni-directional transmission is: DE at logic 1 (enabled) in the Tx; RE at logic 0 (enabled) in the Rx cct. Again, details might be different in your hardware.

by EF82
October 23, 2020

No Answers

No answers yet. Contribute your answer below!

Your Answer

You must log in or create an account (free!) to answer a question.

Log in Create an account

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

Search Questions & Answers

Ask a Question

Anyone can ask a question.

Did you already search (see above) to see if a similar question has already been answered? If you can't find the answer, you may ask a question.

About This Site

CircuitLab's Q&A site is a FREE questions and answers forum for electronics and electrical engineering students, hobbyists, and professionals.

We encourage you to use our built-in schematic & simulation software to add more detail to your questions and answers.

Acceptable Questions:

  • Concept or theory questions
  • Practical engineering questions
  • “Homework” questions
  • Software/hardware intersection
  • Best practices
  • Design choices & component selection
  • Troubleshooting

Unacceptable Questions:

  • Non-English language content
  • Non-question discussion
  • Non-electronics questions
  • Vendor-specific topics
  • Pure software questions
  • CircuitLab software support

Please respect that there are both seasoned experts and total newbies here: please be nice, be constructive, and be specific!

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.