Introduction to Digital Systems 5
r Microcontroller is implemented on a single chip containing a CPU, memory,
and IOP (I/O and peripherals). Note that a typical IOP contains I/O unit of a
microcomputer, timers, A/D (analog-to-digital) converter, analog comparators,
serial I/O, and other peripheral functions (to be discussed later).
r Microprocessor is the CPU of a microcomputer contained in a single chip, and
must be interfaced with peripheral support chips in order to function.
r Pipelining is a technique that overlaps instruction fetch (instruction read) with
execution. This allows a microcontroller’s processing operation to be broken down
into several steps (dictated by the number of pipeline levels or stages) so that the
individual step outputs can be handled by the microcontroller in parallel. Pipelining
is often used to fetch the microcontroller’s next instruction while executing the
current instruction, which speeds up the overall operation of the microcontroller
considerably. Microchip technology’s PIC18F (8-bit microcontroller) uses a two-
stage instruction pipeline in order to speed up instruction execution.
r Program contains instructions and data. Two conventions are used to store a
16-bit number such as 16-bit data in two bytes of memory locations. These are
called little endian and big endian byte ordering. In little endian convention, the low
memory address stores the low byte while the high memory address stores the high
byte. For example, the 16-bit hexadecimal number, 2050 will be stored as two bytes
in two 16-bit locations (Hex 5000 and Hex 5001) as follows: Address 5000 will
contain 50 while address 5001 will store 20. In big endian convention, on the other
hand, the low memory address stores the high byte while the high memory address
stores the low byte. For example, the same 16-bit hexadecimal number, 2050 will
be stored as two bytes in two 16-bit locations (Hex 5000 and Hex 5001) as follows:
Address 5000 will contain 20 while address 5001 will store 50. Motorola / Freescale
HC11 (8-bit microcontroller) follows big endian convention. Microchip PIC18F
(8-bit microcontroller), on the other hand, follows the little endian format.
r Random-access memory (RAM) is a storage medium for groups of bits or words
whose contents cannot only be read but can also be altered at specic addresses.
A RAM normally provides volatile storage, which means that its contents are lost
in case power is turned off. There are two types of RAM: static RAM (SRAM)
and dynamic RAM (DRAM). Static RAM stores data in ip-ops. Therefore,
this memory does not need to be refreshed. An example of SRAM is 6116 (2K
8). Dynamic RAM, on the other hand, stores data in capacitors. That is, it can
hold data for a few milliseconds. Hence, dynamic RAMs are refreshed typically
by using external refresh circuitry. Dynamic RAMs (DRAMs) are used in
applications requiring large memory. DRAMs have higher densities than static
RAMs (SRAMs). Typical examples of DRAMs are the 4464 (64K 4), 44256
(256K 4), and 41000 (1M 1). DRAMs are inexpensive, occupy less space, and
dissipate less power than SRAMs.
r Read-only memory (ROM) is a storage medium for the groups of bits called words,
and its contents cannot normally be altered once programmed. A typical ROM is
fabricated on a chip and can store, for example, 2048 eight-bit words, which can
be accessed individually by presenting to it one of 2048 addresses. This ROM is
referred to as a 2K by 8-bit ROM. 10110111 is an example of an 8-bit word that
might be stored in one location in this memory. A ROM is a nonvolatile storage