Professional Documents
Culture Documents
Computer System
Includes peripheral devices for communicating with people, as well as programs that process data. Hardware (equipment) Software (program)
3
CPU
RAM
ROM
Interface Circuitry
Peripheral Devices
Fetch Cycle
CPU
1 3
5
N Program counter
4
Opcode Instruction register Control bus Clock Read
Opcode
2
FIGURE 1-4 Bus activity for an opcode fetch cycle
Bus
Input Unit
Memory Unit
Single bus structure has the advantage of simplicity and low cost. Disadvantage is limited speed because only two units may use the bus at any given time. (Units are forced to contend for the one bus, waiting for their turn.)
An n-bit bus can access 2n locations Multi-bus architectures are used in large computers to increase speed.
9
Microcontrollers
Single IC chip that contains a CPU, memory, serial interface, parallel interface, timers, I/O handling 'computer on a chip' Permanently programmed for one task
11
External interrupts
Serial device
Parallel device
Timers
CPU
RAM
Figure 1-6 Detailed block diagram of a microcomputer system
ROM
12
13
14
8051
P1.4 P1.5 P1.6
P1.7
Propagation delay is between 3 to 17 microseconds. Equivalent TTL propagation delay is approx. 10 nanoseconds. In many applications with human operation, the difference is not noticeable.
16
17
INT0
Timer 1 Timer 0 Serial port 4K ROM Interrupt control Other registers 128 bytes RAM Timer 1 Timer 0 T1 * T0 *
CPU
Oscillator
Bus control
I/O ports
Serial port
EA RST
ALE PSEN
P0
P1
P2
P3
TXD*
RXD*
19
Address/data
Memory Organization
The 8051 has three general types of memory: On-Chip Memory refers to any memory (Code, RAM, or other) that physically exists on the microcontroller itself. Also called Internal Memory. External Code Memory is code (or program) memory that resides off-chip. This is often in the form of an external EPROM. External RAM is RAM memory that resides off-chip. This is often in the form of standard static RAM.
20
Enabled via
PSEN
FF
FFFF
On-chip memory
00 0000
Enabled via
RD and WR
21