read/write operations

shekhar_dandya

Jun 18, 2004
136
Joined
Jun 18, 2004
Messages
136
Hi All,
I wanted to know what is meant by a read-modify-write operation?how is it different from a normal read/write operation?

Another ques:
What is a tri-state?what is the voltage on tri-stated pins?
Thanx
-Shekhar

 
Last edited by a moderator:

Ldanielrosa1

Nov 25, 2003
316
Joined
Nov 25, 2003
Messages
316
Good afternoon,

Read-modify-write means that the port is read, the bit selected is set or cleared, and the result is written to the port. The disadvantage of this is that the output that is driven high by the output may be overloaded and read as low (or vice-versa) as the output latch is not read only the actual pin. This is why sometimes it is good to use 'shadow' registers to modify, then transfer their contents to the port.

Tri-state means that the output driver is disabled- writing a 0 or 1 to the latch will not affect the external circuitry.

 

shekhar_dandya

Jun 18, 2004
136
Joined
Jun 18, 2004
Messages
136
what is the advantage of reading if one is going to modify i t?
Is it that the value is read,compared to the one selected for modification then if they are same,the value is not rewritten.if there is a mismatch,then the new value is written?
-Shekhar

 
Top