2. CHAPTER 12 PREVIEW
• Elements of a System
• Computer Organization
• Computer Peripheral Devices
• MPU Based System
• Digital Clock
• Multiplexing Displays
• Simplified Frequency Counter
• Serial/Parallel Data Transmission
• Digital Timer
• Digital Games (Dice and Roulette)
• Programmable Logic Controller
• Microcontrollers
3. ELEMENTS OF A SYSTEM
Control
Input Storage Processing Storage Output
5. CPU and
Internal Memory
Output
Input
Input/Output
Storage
• Modem
• Fax
COMPUTER
PERIPHERAL DEVICES
• Monitor
(CRT or LCD)
• Television
• Printer
• Speaker
• Plotter
• Keyboard
• Mouse
• Joystick
• Paddles
• Graphics tablet
• Microphone
• Light pen
• Scanner
• Bar code reader
• Strip reader
• Various Sensors
• Floppy disk drive
• Hard disk drive
• Optical disk drive
• Tape unit
6. Microcomputer system block diagram
MPU
The MPU is the heart of the system
ROM
The ROM contains programs and permanent data
RAM
The RAM contains temporary data (and programs)
Input
ports
The input ports connect to devices such as keyboards
Output
ports
The output ports connect to devices such as printers
The address bus
is unidirectional The data bus
is bidirectional
The control bus
is unidirectional
7. Reading input data
1. The MPU places an input
address on the bus
2. The MPU asserts a READ
signal on the control bus
3. The addressed port puts
its data on the bus
ROM
RAM
Input
ports
Output
ports
MPU
4. The data is stored
in the MPU
MPU
IN
8. Writing output data
1. The MPU places an output
address on the bus
2. The MPU asserts a WRITE
signal on the control bus
3. The MPU places the
data on the bus
ROM
RAM
Input
ports
Output
ports
MPU
4. The data is written
to the output port
Output
ports
OUT
9. 60 Hz 60
Decoder/driver Decoder/driver
Decoder/driver
Mod 60 counter
Mod 60 counter
Mod 12 counter
1 Hz
1 ppm
1 pph
Hours Minutes Seconds
1 pps
DIGITAL CLOCK
11. 11 cycles are counted (fX = 11 Hz)
Counters/decoders/drivers
fX
Start/stop
A basic digital
frequency counter
fX
Start/stop
1 second
12. SERIAL/PARALLEL DATA
CONVERSION
1 0 1 0 1 1 1 1
Serial in Serial out
Shift registers can be used to convert from
serial-to-parallel or the reverse from
parallel-to-serial.
1 0 1 0 1 1 1 1
Serial in
Parallel out
1 0 1 0 1 1 1 1 Serial out
Parallel in
1 0 1 0 1 1 1 1
Parallel in
Parallel out
13. Bit 0
Start bit
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Stop Bit
UART
RS232
Driver
To modem
Transmitter
Receiver
Control Serial data transmission
is relatively slow!
A UART receives bytes from
the data bus and transmits
them one bit at a time.
18. PROGRAMMABLE LOGIC CONTROLLERS
• PLCs are heavy-duty computer systems used for machine control.
• PLCs must be rugged to withstand the rigors of a chemical,
warehouse/storage, or assembly line environment.
• PLCs use MODULAR organization.
• Input Sensors
- pressure
- mechanical
- optical
• A/D converters
• Motors
• Solenoids
• Pneumatic devices
• D/A converters
Power Supply
Programming Module
Memory
Processing
Module
CPU
Output
Module
Input
Module
19. MICROCONTROLLERS
• A microcontroller is considered a “computer on a chip.”
• A microcontroller IC contains a CPU, RAM, ROM
or EEPROM, a clock, and input/output capabilities.
• Microcontrollers are:
• Very inexpensive
• Commonly preprogrammed and embedded in products
• Commonly used to perform control functions
• Manufactured in huge quantities
• NOT used as the CPU in general purpose computers
• Microcontroller-based systems have much less
semiconductor memory (RAM, EEPROM), cost less,
use less printed circuit board space, and perform
fewer commands than microprocessor based systems.