when a microcontroller communicates with another one via one of the communication protocols there is a configuration bit in a control register to choose whether to send(write) or receive(read) this bit in all the communication protocols that I dealt with is configured by setting it to "1" for reading and clearing it for writing..why is that?


closed as primarily opinion-based by Chris Stratton, Voltage Spike, RoyC, mkeith, Bimpelrekkie Apr 10 at 7:40

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.


Reading is a more benign state than writing.

Back in days of transistor/transistor/logic (TTL), a logic "high" was a default state for a logic input: if nothing is connected to a TTL logic input, it floats to logic high - you had to add current to pull it to logic "low". In such a logic world, it would make sense to choose the default logic state of "high" to correspond to the benign state of "reading".

These days of CMOS logic have no default logic state: an input could equally float to logic "low" as it could float to logic "high".
So the answer may be - a choice standardized through legacy.

The same argument applies to the logic choice of chip select ...logic high is again the default un-selected, benign logic state, while logic low activates the chip's input/output structure.

  • \$\begingroup\$ Oh thanks a lot for your answer but there is something I don't understand,Why Reading is a more benign state than writing? I thought the opposite is the right thing \$\endgroup\$ – amgad Apr 7 at 21:42
  • \$\begingroup\$ In many cases, a "read" from a device alters nothing in that device, whilst a "write" to a device alters something: a register's contents perhaps. On occasion a "read" will trigger an event: a reset of interrupt flag, or trigger an A-to-D sample - not very benign. For RAM, "read" is certainly more benign than "write". \$\endgroup\$ – glen_geek Apr 7 at 22:14
  • \$\begingroup\$ Thank you very much glen_geek I really appreciate that \$\endgroup\$ – amgad Apr 12 at 9:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.