Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/05/01 19:17
Read: times


 
#8991 - RE: Read Port Latch ?
I think the intended question is whether there is a way for a user program to read the output latch of a port (that had previously been written by the program to the output latch) rather than actually reading the state of the pins, which depends on both the output latch and the state of the connected I/O lines.

The 8052 core does this internally with some operations, but I don't think a user program can do it. If anyone knows how, please correct me.

Whenever I've needed to know the value I previously wrote to an I/O port, I always have had a shadow copy of that value in some other Internal RAM location. Whenever I write to the port, I also update the same value to the shadow register. Then, if I need to know the value of the output latch I can just refer to the shadow register.

Craig Steiner


List of 15 messages in thread
TopicAuthorDate
Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
RE: Read Port Latch ?            01/01/70 00:00      
input - output port            01/01/70 00:00      

Back to Subject List