Professional Documents
Culture Documents
Oscillator Circuits
• Requires the existence of an external oscillator circuit. The
oscillator circuit usually runs around 12MHz, although the
8051 is capable of running at a maximum of 40MHz.
• Each machine cycle in the 8051 is 12 clock cycles, giving an
effective cycle rate at 1MHz (for a 12MHz clock) to
3.33MHz (for the maximum 40MHz clock).
Data and Program Memory
• The 8051 Microprocessor can be programmed in PL/M, 8051 Assembly, C and a
number of other high-level languages. Many compilers even have support for
compiling C++ for an 8051.
• Program memory in the 8051 is read-only, while the data memory is
considered to be read/write accessible. When stored on EEPROM or Flash, the
program memory can be rewritten when the microcontroller is in the special
programmer circuit.
Direct Memory
• The 8051 has 256 bytes of internal addressable RAM, although only the first
128 bytes are available for general use by the programmer. The first 128 bytes
of RAM (from 0x00 to 0x7F) are called the Direct Memory, and can be used to
store data.
Special Function Register
The Special Function Register (SFR) is the upper area of addressable memory, from address
0x80 to 0xFF. A, B, PSW, DPTR are called SFR. This area of memory cannot be used for data or
program storage, but is instead a series of memory-mapped ports and registers. All port input
and output can therefore be performed by memory MOV operations on specified addresses in
the SFR. Also, different status registers are mapped into the SFR, for use in checking the status
of the 8051, and changing some operational parameters of the 8051.
A and B Registers
• The A register is located in the SFR memory location 0xE0. The A register works in a similar
fashion to the AX register of x86 processors. The A register is called the accumulator, and by
default it receives the result of all arithmetic operations. The B register is used in a similar
manner, except that it can receive the extended answers from the multiply and divide
operations. When not being used for multiplication and Division, the B register is available as
an extra general-purpose register.
Motorola 68HC11
Block Diagram of 68HC11
• The ports have arrows running in both directions (ports A, C, and D) are bidirectional,
meaning that they can be used for either input or output.
• Each port contains eight data bits, making it equivalent to one byte of data. Each data
bit is mapped to a physical pin on the microprocessor package. This means that when
data is written to a particular output port, that data appears as voltage levels on the
real pins connected to that port. In this way, the 68HC11 can interface with external
devices.
• In many cases, ports may contain a mixture of pins used for either input or output. In
other cases, particular pins in a port are dedicated to a specific function.
• Below is a brief description of each port on the diagram.
• Port A: Digital, bidirectional port that implements special timer and counter
circuitry. The timers can be used to generate waveforms of varying
frequencies; the counters can be used to count certain events (like rising edges of
signal) on the input lines.
• Port B: Digital port that may be used for output only.
• Port C: Digital, bidirectional port. Its default state is for input.
• Port D: Bidirectional port dedicated to serial input and output functions. Two of
these pins are used for communications with a host comp.
• Port E: Analog input port.
68HC11 E-Series Block Diagram
Pin Assignment
The typical E-series HC11 comes in a 52-pin (Plastic Leaded Chip Carrier) PLCC socket
(there are some older DIP versions, but they are rarely used).
VDD and VSS
• Power is supplied to the MCU through VDD and VSS. The
MCU operates from a single 5-volt (nominal)power
supply. Low-voltage devices in the E series operate at 3.0–
5.5 volts.
• Very fast signal transitions occur on the MCU pins. The
short rise and fall times place high, short duration current
demands on the power supply.
• To prevent noise problems, provide good power supply
bypassing at the MCU. Also, use bypass capacitors that
have goodhigh-frequency characteristics and situate them
as close to the MCU as possible. Bypass requirements
vary, depending on how heavily the MCU pins are loaded.
RESET
• A bidirectional control signal, RESET, acts as:
- an input to initialize the MCU to a known startup state.
- an open-drain output to indicate that an internal failure has been detected in
either the clock monitor or computer operating properly (COP) watchdog
circuit.
• The CPU distinguishes between internal and external reset conditions by
sensing whether the reset pin rises to a logic 1 in less than two E-clock cycles
after a reset has occurred.
STRA/AS
• The strobe A (STRA) and address strobe (AS) pin performs either of two
separate functions, depending on the operating mode:
• In single-chip mode, STRA performs an input handshake (strobe input)
function.
• In the expanded multiplexed mode, AS provides an address strobe function.
• AS can be used to demultiplex the address and data signals at port C.
STRB/R/W
• The strobe B (STRB) and read/write (R/W) pin act as either an output strobe or as a data bus
direction indicator, depending on the operating mode.
• In single-chip operating mode, STRB acts as a programmable strobe for handshake with other
parallel devices.
• In expanded multiplexed operating mode, R/W is used to indicate the direction of transfers on
the external data bus. A low on the R/W pin indicates data is being written to the external data
bus. A high on this pin indicates that a read cycle is in progress. R/W stays low during
consecutive data bus write cycles, such as a double-byte store.
• It is possible for data to be driven out of port C, if internal read visibility (IRV) is enabled and an
internal address is read, even though R/W is in a high-impedance state.
Port Signals
• Port pins have different functions in different operating modes. Pin functions for port A, port D,
and port E are independent of operating modes.
• Port B and port C, however, are affected by operating mode.
• Port B provides eight general-purpose output signals in single-chip operating modes. When the
microcontroller is in expanded multiplexed operating mode, port B pins are the eight high-
order address lines.
• Port C provides eight general-purpose input/output signals when the MCU is in the single-chip
operating mode. When the microcontroller is in the expanded multiplexed operating mode,
port C pins are a multiplexed address/data bus.