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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/29/05 14:51
Modified:
  06/29/05 14:52

Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#96191 - double functions
Responding to: ???'s previous message
Very good question, this confuses probably many newbies. You can find the answers in the "bible", but needs really thorough reading...

The "alternative" input functions usually don't collide, as they need setting some SFR bits to become active (and after reset these bits are reset too) - e.g. enable interrupt in IE register for external interrupt pins, enable receiving setting the REN bit in SCON for Rx pin, enabling the counter function for timer/counter input pins in TCON etc.

For alternative output functions on Port3 pins, you can consider them as simply wire-ORed with the simple output (as if there are two open collector outputs tied together). So you don't need to enable anything special to use the alternate function. If you leave the output of the port to be 1, you can use the alternative function; if you set it to 0, it will remain 0 regardless of the alternative function.

Ports 0 and 2 and their alternative function as address/data bus is different. During external memory cycle (regardless of if it is a data or program memory, so this applies for MOVX, MOVC and program fetches), Port2 is set to the higher address (strongly both to 0 and 1), and after the external memory cycle ends, it resumes the original content (if no other external memory cycle follows). For Port0, at the beginning of the memory cycle, the lower address is latched into the output latch and is output during ALE is active - so essentially, external memory accesses destroy Port0 content.

Jan Waclawek


List of 14 messages in thread
TopicAuthorDate
function of 8051 pins            01/01/70 00:00      
   double functions            01/01/70 00:00      
      a requirement            01/01/70 00:00      
         Yeah... and it's really big too! :)            01/01/70 00:00      
      port0            01/01/70 00:00      
      thanks            01/01/70 00:00      
         do not SHOUT            01/01/70 00:00      
      A couple more little things            01/01/70 00:00      
         PORT2 during MOVX @Ri            01/01/70 00:00      
            which should'nt be a problem            01/01/70 00:00      
               Same thought, almost same time            01/01/70 00:00      
            Port 2 in memory access            01/01/70 00:00      
   double function of SBUF            01/01/70 00:00      
      thank you jan waclawek            01/01/70 00:00      

Back to Subject List