Introduction To Microcomputer Architecture: Chapter 1 BETC3483 1
Introduction To Microcomputer Architecture: Chapter 1 BETC3483 1
Introduction To Microcomputer Architecture: Chapter 1 BETC3483 1
ARCHITECTURE
CHAPTER 1
Chapter 1 BETC3483 1
At the end of the class, you will be able:
Chapter 1 BETC3483 2
TYPES OF COMPUTERS
Mainframe
Minicomputer
Workstation
Microcomputer
Embedded
System
Chapter 1 BETC3483 3
EVOLUTION OF COMPUTERS
Chapter 1 BETC3483 4
EVOLUTIONS OF CPUs
Chapter 1 BETC3483 5
Chapter 1 BETC3483 6
MICROPROCESSOR VS MICROCONTROLLER
VS
Chapter 1 BETC3483 7
MICROPROCESSOR
Chapter 1 BETC3483 8
Chapter 1 BETC3483 9
SYSTEM ORGANIZATION
• Central Processing Unit (CPU)
• Memory
• Input/Output (I/O) circuitry CPU
• Buses
– Address bus
– Data bus
– Control bus
Address bus - carrying the address for the data inside the memory (24-bit)
Data bus - carrying the data in/out P (16-bit)
Control bus - carrying the signal which is used to control the devices and status of the devices.
(E.g.: read/write process)
Chapter 1 BETC3483 10
CENTRAL PROCESSING UNIT (CPU)
• Directs the operation of the
other units by providing timing Control Unit
and control signals.
• Performs all the arithmetic and
logical operations.
• Holds values of internal Arithmetic Logic
operation, such as the address Unit
of the instruction being
executed and the data being
processed
• Accumulator, Program Counter
Register, Status Register Register
Chapter 1 BETC3483 11
MEMORY
Data lost upon power off – short term memory
Has two major types:
oStatic RAM – fast, easy to interface but small sizes
oDynamic RAM – Larger but requires refreshing operation, slow
RAM
Store permanent information, data still available after power off
Store critical information such as start up, restart, bios
configuration, initialization process
Small size, need RAM to download main program such in PC
ROM
Chapter 1 BETC3483 12
CONCEPT OF MEMORY
Chapter 1 BETC3483 13
INPUT / OUTPUT DEVICES
Chapter 1 BETC3483 14
BUS SYSTEM
(address bus - unidirectional)
- A bus which carries an address from the uP to the memory. (
to confirm the location of an address).
- The total of address bit is can be used to determine the total
memory can be accessed in a memory system.
- The address is a one way direction which is from CPU to
other devices only
(Data bus – bidirectional)
- A bidirectional system bus due to the data can be transferred
either to or from CPU.
- Data can be either input or output based on the process out or
into the CPU which is read or write.
- The size of the data is based on the total data bit is being
Chapter 1 BETC3483 16
READ OPERATION
Chapter 1 BETC3483 17
WRITE OPERATION
ADDRESS : 00000001
DATA
DATA : 10000000
BUS : 10000000
𝟐𝑵
𝟐𝑵 − 𝟏
Chapter 1 BETC3483 18
Chapter 1 BETC3483 19
APPLICATIONS OF MC68000
Chapter 1 BETC3483 20
SPECIFICATION OF MC68000
• 32-bit data and address registers
• 16-bit data bus (addressable memory 16 MB)
• 24-bit address bus
• 14-Addressing Modes
• Memory-Mapped I/O
• 24-bit Program Counter
• 56 Powerful Instructions Types
• Operations on 5 Main Data Types
• 7 interrupt levels
• Clock speeds: 4MHz to 12.5MHz
• Synchronous and asynchronous data transfer
Chapter 1 BETC3483 21
CENTRAL PROCESSING UNIT (CPU)
Register : To
ALU : To
store
perform temporary
algorithm and data.
mathematical
operation.
Control Unit : To
control operation
by giving the
control signal and
the timing.
Chapter 1 BETC3483 22
REGISTER
Chapter 1 BETC3483 23
REGISTER D0
D1
D2
Data Register D3
D4
D5
D6
D7
31 0
A0 Data Register 32 bit : 8 (D0-D7)
A1
Address Register A2 Address Register 32 bit : 7 (A0-A6)
A3
A4 Stack Pointer (A7) : 2 (USP & SSP) 32 bit
A5
A6 Program Counter : 1 (PC) 32 bit
A7 USP Status register 16 bit: 1 (SR)
SSP
31 23 0
Program counter PC
15 0
Status register SR
Chapter 1 BETC3483 24
DATA REGISTER
Chapter 1 BETC3483 25
ADDRESS REGISTER
b) Register(An))
• The function is to stored the information for the address location for the data inside the memory.
• The address information is referred to the address located at the memory.
• It also work as a pointer – A7
• Consist of 7 registers (A0 – A6) with each of the register size at 32 bit.
• Byte operation is not allowed as the size of the address are16 bit (words) / 32 bit (long word).
• If the words operation is executed, the value for the address will be extended to 32 bit.
Chapter 1 BETC3483 26
STACK POINTER
c) (Stack Pointer (SP))
• Address Register at A7.
• The function is the same like other address register but the main function is to
execute the subroutine.
• There are 2 available stack pointer(each of the SP size at 32 bit)
• Only one stack pointer can be activated which is based either at supervisor or
user mode.
• The SP is giving the safety when the system is in operational
Chapter 1 BETC3483 27
PROGRAM COUNTER
• PC size at 32 bit and the function is to point the next address for the
instructions to be executed.
• To execute an instruction, the PC register will be filled with the address of
the instruction.
• When the instruction is being decoded by the control unit, the PC will be
add up, so it will keep pointing to the next instruction address.
Chapter 1 BETC3483 28
STATUS REGISTER (SR)
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
CCR
In supervisor mode, the whole content of the register can be read and write while
when in user mode, the whole content still can be read but only the lowest byte
from the SR can be written.
Chapter 1 BETC3483 29
STATUS REGISTER
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
Overflow
Carry
C (carry) : Will set to 1 when there is overflow when add operation and borrow
from subtract operation.
V (overflow) :This flag is set, if an overflow occurs,
for example if the result of a signed operation is large enough to be
accommodated in a destination register..
Chapter 1 BETC3483 30
STATUS REGISTER
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
Zero
Negative
Extend
Z (zero) : will set to 1 when the operational result is zero
Chapter 1 BETC3483 31
STATUS REGISTER
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
Interrupt
Mask
Chapter 1 BETC3483 32
STATUS REGISTER
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
Supervisor
S-Bit (Supevisor)
• Option to use user mode where (bit 13 = 0) / supervisor mode (bit 13 = 1)
• Supervisor Mode : Able to access the supervisor stack pointer (SSP)
: All the status register can be accessed
: All the instruction set can be used
• User Mode : Only able to access User Stack Pointer (USP)
: Only lower byte of the status register can be accessed
: There are instructions can’t be executed
Chapter 1 BETC3483 33
STATUS REGISTER
System Byte User Byte
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
T S I2 I1 I0 X N Z V C
Trace
T-Bit(Trace)
• Trace bit can be accessed in supervisor mode only.
• T Bit = 0 : All the instructions are executed per normal
• T Bit = 1 : 68k operational in trace mode
: Every after instructions, there will be one exceptional trace happens.
The CPU will execute the special routine for debugging.
With this exceptional, the value of the register will be monitored at t
he terminal.
Chapter 1 BETC3483 34
CPU ADDRESSING MODE
Chapter 1 BETC3483 35
MEMORY ORGANIZATION
8 bit 16 bit
Chapter 1 BETC3483 36
ADDRESSING BYTE IN MEMORY
Chapter 1 BETC3483 37
ADDRESSING WORD IN MEMORY
15 7 0
Chapter 1 BETC3483 38
THANK YOU
Chapter 1 BETC3483 39