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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/15/03 02:54
Read: times


 
#52629 - RE: shadow port explanation
Responding to: ???'s previous message
Basically a shadow port is a variable in RAM that mirrors the contents of an output port. In most instances you can't do much with an output latch other than write to it, be it onboard the uC or external. This presents a problem if you want to affect the state of certain pins without disturbing the others.

For instance:

on Port A:
bits 0-6 are address bits for peripheral x.
bit 7 feeds a blinky LED running at 1Hz.

If your code can access the external peripheral at any given time, how would you write the address on bits 0-6 without affecting the current state of the blinky LED? Remember, you can't read back the port so you have no idea whether it's on or off.

That's where the shadow register (port) comes in. It's simply a memory location where multiple routines can do whatever bit manipulations are needed before sending the result to the output latch. Hence the term "shadow"... maybe mirror would be a better term?


At least that's shadow ports as I know and use them!

Joe


List of 11 messages in thread
TopicAuthorDate
shadow port explanation            01/01/70 00:00      
   RE: shadow port explanation            01/01/70 00:00      
      RE: shadow port explanation            01/01/70 00:00      
         RE: shadow port explanation            01/01/70 00:00      
            RE: shadow port explanation            01/01/70 00:00      
               RE: shadow port explanation            01/01/70 00:00      
      RE: shadow port explanation            01/01/70 00:00      
         RE: shadow port explanation            01/01/70 00:00      
            RE: shadow port explanation            01/01/70 00:00      
               RE: shadow port explanation            01/01/70 00:00      
                  RE: shadow port explanation            01/01/70 00:00      

Back to Subject List