beautypg.com

Output functions – Maxim Integrated High-Speed Microcontroller Users Guide: DS80C390 Supplement User Manual

Page 105

background image

High-Speed Microcontroller User’s Guide: DS80C390 Supplement

105 of 158

OUTPUT FUNCTIONS

Although 8051 I/O ports appear to be true I/O, their output characteristics are dependent on the individual
port and pin conditions. When software writes a logic 0 to the port for output, the port is pulled to ground.
When software writes a logic 1 to the port for output, ports 1, 3, 4, or 5 will drive weak pullups (after the
strong transition from 0 to 1). Port 0 will go tri-state. Thus as long as the port is not heavily loaded, true
logic values will be output. DC drive capability is provided in the electrical specifications. Note that the
DC current available from an I/O port pin is a function of the permissible voltage drop. Transition current
is available to help move the port pin from a 0 to a 1. Since the logic 0 driver is strong, no additional
drive current is needed in the 1 to 0 direction. The transition current is applied when the port latch is
changed from a logic 0 to a logic 1. Simply writing a logic 1 where a 1 was already in place does not
change the strength of the pullup. This transition current is applied for a one half of a machine cycle. The
absolute current is not guaranteed, but is approximately 2 mA at 5V.

When serving as an I/O port, the drive will vary as follows. For a logic 0, the port will invoke a strong
pulldown. For a logic 1, the port will invoke a strong pullup for two oscillator cycles to assist with the
logic transition. Then, the port will revert to a weak pullup. This weak pullup will be maintained until the
port transitions from 1 to 0. The weak pullup can be overdriven by external circuits. This allows the
output 1 state to serve as the input state as well.