Professional Documents
Culture Documents
Introduction To Microprocessor
MC68000
Objectives
At the end of this topic, students be able to :
Chapter 2
Introduction To Microprocessor
MC68000
2.1 Why Choose 68000
Popular in
embedded
system
Comprehensive
Instruction Set
Bigger in
memory
size
Why
68k?
P getting
more
complex
Neat
design
Easier to use by
user and compiler
Chapter 2
Introduction To Microprocessor
MC68000
2.1 Why Choose 68000
Chapter 2
Introduction To Microprocessor
MC68000
2.3 68000 Programming Model
Memory Map
CPU 86k
Data Register
31
16 15
87
D0
D1
D2
D3
D4
D5
D6
D7
$FFFFFE
8 7
A0
A1
A2
A3
A4
A5
A6
A0
D0
Odd
$000001
$000003
Data BUS
Address Register
16 15
31
A7
A7
Even 7
$000000
$000002
D15
A23
16 15
Stack Pointer
Stack Pointer
8 7
USP
SSP
Program Counter
16 15
31
8 7
31
15
Status Register
r
d
d
s
s
e
S
U
B
$FFFFFF
Chapter 2
Introduction To Microprocessor
MC68000
2.3 68000 Programming Model
Chapter 2
Introduction To Microprocessor
MC68000
2.3 68000 Programming Model
: 8 (D0-D7)
: 7 (A0-A6)
: 1 (PC)
: 1 (SR)
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Registers
a) Data Register (Dn)
- Its main function is to store information that will and has been processed by
the ALU.
- Only the saved data only, the program is stored in the memory.
- The data is stored in the 68k itself.
- Contains 8 registers (D0 - D7), each size 32 bits.
- Each data size is 32 bits (long word), 16 bit (word) and 8 bit (byte).
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Registers
b) Address Register(An)
Used for storing the location / address of an available data in memory.
The address refers to the address stored in the memory (external memory).
It also acts as a pointer (pointer).
Contains 7 registers (A0 - A6), each size 32 bits.
Byte operation is not allowed due to address size is 16 bits (words) / 32 bit
(long word).
If the value of 16 bits completed, it will be extended to 32 bits.
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Registers
For 68k, is 24-bit address bus (A1 - A23 and UDS * & LDS *), so only the
lowest 24 bits of the 32 bits in the register address used to access memory.
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Registers
c) Stack Pointer (SP)
An address register A7.
Same behavior as register A0 - A6 but its main function is to execute a
subroutine.
There are two stack pointer (each of size 32 bits)
i.
ii.
Only one active stack pointer at a time depending on the current processor
mode of the supervisor or user mode.
Provide important security features in the operating system
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Registers
d) Program Counter(PC)
Sized programmable 32-bit counter and is used to point to the instruction that
will be executed.
During the instruction is decoded by the control unit, PC added to point to the
next instruction.
Hence, after instruction executes, the CPU has had enough information to do
the next instruction.
Chapter 2
Introduction To Microprocessor
MC68000
e) Status Register (SR)
System Byte
15
14
13
12
11
10
I2
I1
I0
CCR
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Register
C (carry)
V (overflow)
I2
I1
I0
Interrupt
Mask
C
Carry
10
Overflow
11
Zero
12
Negative
13
Supervisor
14
Trace
15
Extend
User Byte
System Byte
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Register
I2
I1
I0
Interrupt
Mask
Z (zero)
N (negative)
X (extend)
Carry
10
Overflow
11
Zero
12
Negative
13
Supervisor
14
Trace
15
Extend
User Byte
System Byte
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Register
I2
I1
I0
Interrupt
Mask
C
Carry
10
Overflow
11
Zero
12
Negative
13
Supervisor
14
Trace
15
Extend
User Byte
System Byte
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Register
S
Supervisor
10
I2
I1
I0
Interrupt
Mask
Bit S (Supevisor)
Selection for user mode (bit 13 = 0) / supervisor mode (bit 13 = 1)
Carry
11
Overflow
12
Zero
13
Negative
14
Trace
15
Extend
User Byte
System Byte
Chapter 2
Introduction To Microprocessor
MC68000
2.4 68000 Register
S
Supervisor
10
I2
I1
I0
Interrupt
Mask
Bit T (Trace)
Trace bits that can be accessed while in supervisor mode
Bit T = 0:
Bit T = 1:
C
Carry
11
Overflow
12
Zero
13
Negative
14
Trace
15
Extend
User Byte
System Byte
Chapter 2
Introduction To Microprocessor
MC68000
2.5 CPU Addressing Space
All external data enters the CPU at 16 bidirectional data lines (D0 - D15)
A total of 23 address lines (A1 - A23) along with online UDS* & LDS*, making
68k capacity reaching up to 16Mbyte memory.
Limited to the size of the address space the address bus. Address range that
can be achieved with n-bit address bus is 0 to 2n - 1.
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Memory Mapping
For 68k memory space that can be achieved only as much as 16Mbyte.
This memory can be considered as a list of compartments / cells, each stores
8 bit / 1 byte of data.
8 bit
$000000
$000001
1100 1010
$000002
$000003
1000 1100
$FFFFFE
$FFFFFF
1100 1101
1000 1100
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Memory Organization
$000000
$000002
1100 1010
1100 1101
1000 1100
1000 1100
$000001
$000003
$000004
$000006
$000005
$000007
$FFFFFC
$FFFFFE
$FFFFFD
$FFFFFF
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Memory Organization
Data bus is 16bit 68k, making it capable of reaching a number of 16-bit data
memory data in one step.
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Byte Addressing in Memory
In memory, bytes can be placed in any position of the address, means the
address can be odd or even.
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Word Addressing in Memory
0
2
4
Word 0
Word 1
Word 2
1
3
5
16777212
16777214
Word
Word
16777213
16777215
Chapter 2
Introduction To Microprocessor
MC68000
2.7 Long Word Addressing in Memory
4
6
Long Word 0
Long Word 1
1
3
15
7
0
$000000 10101011 11001101 $000001
$000002 00010010 00110100 $000003
7
Long Word 2
16777212
16777214
Long Word
16777213
16777215
Chapter 2
Introduction To Microprocessor
MC68000
References
i.
ii.
iii. Tocci, R. J., Digital Systems: Principles and Applications 9th edition, Prentice
Hall,2004.
iv. Floyd, T. L., Digital Fundamentals 8th edition, Prentice Hall, 2003.
v.
Spasov, P., Microcontroller Technology: The 68HC11 and 68HC12 5th edition,
Prentice Hall, 2004.