Microcomputers and Microcontrollers
Microcomputers and Microcontrollers
• The following define some terms that are key to a CPU’s operation in the storage
and retrieval of data.
• A word is an ordered set of bits, usually 8, 16, 32, or 64 bits long.
• The instruction decoder interprets instructions fetched sequentially from memory
by the control unit and stored in the instruction register. Each instruction is a set of
coded bits that commands the ALU to perform bit manipulation, such as binary
addition and logic functions, on words stored in the CPU data registers. The ALU
results are also stored in data registers and then transferred to memory by the
control unit.
• The bus is a set of shared communication lines that serves as the ‘central nervous
system’ of the computer. Data, address, and control signals are shared by all
system components via the bus.
• Each component connected to the bus communicates information to and from the
bus via its own bus controller. The data lines, address lines, and control lines allow
a specific component to access data addressed to that component.
Microcomputers
• The data lines are used to communicate words to and from data registers in the
various system components such as memory, CPU, and input/output (I/O)
peripherals.
• The address lines are used to select devices on the bus or specific data locations
within memory. Devices usually have a combinational logic address decoder
circuit that identifies the address code and activates the device.
• The control lines transmit read and write signals, the system clock signal, and
other control signals such as system interrupts, which are described in subsequent
sections.
• The read-only memory (ROM) is used for permanent storage of data that the CPU
can read, but the CPU cannot write data to ROM. ROM does not require a power
supply to retain its data and therefore is called non-volatile memory.
• Random access memory (RAM) is used for storing data that is used during the
program run-time: Data can be read from or written to RAM at any time, provided
power is maintained.
Microcomputers
• The PIC16F84 (Fig. 3) is a low cost, high performance, CMOS, fully static 8-bit
microcontroller. Similar to all the PIC microcontrollers, the PIC16F84 employs an
advanced reduced instruction set computer (RISC) architecture.
• The separate instruction and data buses of the Harvard architecture allow a 14-bit
wide instruction word with a separate 8-bit wide data bus. The high performance
RISC CPU features make PIC very versatile and useful in many mechatronics
projects.
• It has 35 single word instructions. It operates at a maximum “f” of 10 MHz. The
program memory allows 1 kB of flash memory, 68 bytes of data RAM and 64 bytes
of data EEPROM. It also has four interrupt sources.
• The PIC16F84 provides 1000 erase/write cycles to the flash memory. The
EEPROM can retain data for more than 40 years.
• It has 13 I/O pins for individual direction control. It provides a 25 mA sink per pin
and 20 mA source per pin; sufficient to drive LEDs. An 8-bit timer/counter makes
the PIC suited for timer-based mechatronic projects.
The PIC16F84 Microcontroller
Fig. 2. The PIC16F84 microcontroller block diagram. (Courtesy of Microchip Technology Inc.).
Main Features PIC16F84 Microcontroller
• Home Work:
• Detailed report on the architecture of Microcontrollers.
• Report on sub-sections of PIC16F84 Microcontroller.