MSM80C154S MSM83C154S
Page
Contents
2.5.2
Reset Schmitt trigger circuit CPU internal status by reset
2.5.3
2.5.4
3.4.2 T2EXtimer/counter 2 external flag input detector
Power down mode
3.1
Special function registers for serial port 101 2.1
129
Multi-processor systems 128
140
142
207
KW Pull-Up Resistance Setting for Quasi-bidirectional Input
208
210
Introduction
Page
MSM80C154S/MSM83C154S/MSM85C154HVS Outline
Introduction
MSM80C154S/83C154S/85C154HVS
MSM80C154S/MSM83C154S Features
MSM80C154S/83C154S/85C154HVS
Additional Features in MSM80C154S/MSM83C154S/MSM85C154HVS
MSM80C154S/83C154S/85C154HVS
System Configuration
Page
MSM80C154S/MSM83C154S/MSM85C154HVS Logic Symbols
MSM80C154SRS/MSM83C154SRS
MSM80C154S/MSM83C154S pin layouts
MSM80C154S/MSM83C154S pin layout top view
Applicable Packages
MSM80C154S/MSM83C154S external dimensions
1 MSM80C154S/MSM83C154S external dimensions
MSM80C154STS/MSM83C154STS
MSM85C154HVS pin layout and external dimensions
2 MSM85C154HVS pin layout and external dimensions
TIMER/COUNTER 0&1 Interrupt Serial IO
Signal
Special Function
Register Address
DPL PLA Register Address
ROM Special
Sense AMP
TH1 TL1 TH0 TL0 Tmod Tcon
T2CON TL2 TH2 AMP ACC TR2 TR1
Signal DPH
Address Decoder
TH1 TL1 TH0 TL0
Outline of MSM80C154S/MSM83C154S timing
Timing and Control
9MSM80C154S/MSM83C154S
Timing
Major synchronizing signals
XTAL1 ALE Psen Inst PORT-0 PCL OUT PORT-2 PCH OUT
External program memory read cycle timing chart
Movx A, @Rr
13 MSM80C154S Movx A, @DPTR execution
12 MSM80C154S Movx @Rr, a execution
PIN Data CPU Data PIN Data Stable Sampled
MOV direct, Port 0, 1, 2, 3 execution
XTAL1 ALE Psen
16 MSM83C154S Movx A, @Rr execution
4 MSM83C154S fundamental operation time charts
19 MSM83C154S Movx @DPTR, a execution
18 MSM83C154S Movx A, @DPTR execution
20 MSM83C154S MOV direct, PORT0, 1, 2, 3 execution
PIN Data PIN Data Stable CPU Data Sampled
AIR
Instruction Register IR and Instruction Decoder PLA
PLA Wair
PLA WIR
PSW0D0H CY AC F0 RS1 RS0 OV F1 P
Arithmetic Operation Section
CPU Internal Data BUS
Program Counter
24 MSM80C154S/MSM83C154S program area
Program Memory and External Data Memory
ALE Latch
System Configuration
Dptr
XTAL1 ALE Psen
Page
By register R0 or R1
MSM80C154S/MSM83C154S
Data
Control
Page
Oscillators XTAL1 XTAL2
Crystal resonator connection diagram
Clock XTAL2
Supply of 50% duty clock
Outline
CPU Resetting
CPU Reset Control
5Resetexecution
ROM mode
Chart
Chart
XTAL1 Psen ALE
Reset Schmitt trigger gate detector time chart
MSM80C154S/83C154S/85C154HVS Reset Schmitt trigger circuit
MSM80C154S/MSM83C154S reset internal status
CPU internal status by reset
Denotes direct resetting even if XTAL1·2 has stopped
EA CPU Memory Separate
Internal Specifications
Page
Internal Data Memory RAM and Special Function Registers
Internal Specifications
Data memory and special function register layout
Internal data memory RAM
Internal Data Memory RAM
RAM layout diagram
Program status word PSW
Internal data memory registers R0 thru R7
RS0
User Data RAM
Stack storage layout
MSM80C154S/83C154S/85C154HVS Stack
PC5
PC1
Internal data memory indirect addressing
Lnternal Data Memory RAM Operating Procedures
DEC Rr bit arrangement Register designation table
CLR bit address bit arrangement
Internal data memory 1-bit data designation
Addressing combination table
Bit designation table
2AH 2BH
2EH
Special Function Registers TCON, SCON,.... ACC, B
List of special function registers
Special function registers 4.4.2.1 Timer mode register Tmod
MSM80C154S/83C154S/85C154HVS Power control register Pcon
Timer control register Tcon
MSB LSB Scon
SCON.6 SM1 SM0 Mode
SM0 SM1 SM2 REN TB8 RB8
SCON.0
MSB LSB
Interrupt enable register IE
ET2 ET1 EX1 ET0 EX0
ET2
PCT
MSM80C154S/83C154S/85C154HVS Interrupt priority register IP
PCT PT2 PT1 PX1 PT0 PX0
Program status word register PSW
MSM80C154S/83C154S/85C154HVS 2.8 I/O control register Iocon
TF2 EXF2
Timer 2 control register T2CON
EXEN2
TF2
Timer/counters 0 and 1 4.5.2.1 Outline
Timer/Counters 0, 1 and 2 4.5.1 Outline
Timer/counter 0 and 1 counting control
Timer control register Tcon 88H
Overall clock input control
Circuit for timer/counters 0
Timer mode register Tmod 89H
PD & HPD
External clock detector circuit for timer/counters 0
Timer
Detector circuit operational time chart
Counting control of timer/counters 0 and 1 by INT pin
Detector
Timer Clock
Timer Gate TR0 INT0 RUN Stop TR1 INT1
Mode
11 Timer mode register Tmod 89H
Timer Counter
Detector TF0 TL0 TH0 5BITS 8BITS
T0 PIN Detector Port TR0 Gate INT0 PIN Data
T1 PIN Detector Port TR1 Gate INT1 PIN Data
Latch Detector TF1 TL1 TH1 5BITS 8BITS O Clock
MSM80C154S/83C154S/85C154HVS Mode
TH0 8BITS
Detector TF0
Latch Detector TF1
TH1 8BITS O Clock
MSM80C154S/83C154S/85C154HVS Mode
8BITS TR0 Gate
T0 PIN Detector Port TF0
INT0 PIN 8BITS Data
Reload Data Xtal
Latch Xtal
Detector TF0 T0 PIN Detector Port TR0 Gate INT0 PIN Data
TL0 8BITS Detector TF1
TH0 C 8BITS
T0 PIN Detector
2.5.6 32-bit timer mode
Iocon 0F8H
Serr IZC
19 T0, T1 external clock detector circuit
Timer Reset
Internal Specifications
Bit is 0, and valid when
Mode 1 or 3 has been set
12 Timer 2 control register T2CON 0C8H
Timer/counter 2 operation modes
Must be reset to 0 by software
3.3.1 16-bit auto reload mode
To 0 by software
TR2 Detector EXEN2 RCAP2L RCAP2H TF2 Timer EXF2 Interrupt
3.3.2 16-bit capture mode
RCLK=0 TCLK=0
TL2 TH2 BIT
21 Timer/counter 2 16-bit capture mode circuit
3.3.3 16-bit baud rate generator mode
Baud
Reset Timer Counter T2EX
3.4.2 T2EX timer/counter 2 external flag input detector
Reset Timer Counter Clock
Detector PD & HPD O Clock
Timer/counter detector circuit
Serial Port
Sbuf R
100
RX Control Input Shift Register
Internal Specifications
15 Scon
102
Tclk
Sbuf serial port buffer register
Rclk
16 Serial port operation modes
MSM80C154S/83C154S/85C154HVS Smod
Serr
Mode 0 receive operation
Mode 0 baud rate
Mode 0 transmit operation
107
Port mode
108
Serial port mode
Timing chart
109
Mode 1 baud rate
MSM80C154S/83C154S/85C154HVS Mode Outline
Mode 1 receive operation
Mode 1 transmit operation
MSM80C154S/83C154S/85C154HVS Mode 1 Uart error detection
Start Serr RXD
Internal BUS TIMER/COUNTER1 SMOD=1 Overflow SMOD=0
113
114
Mode 2 baud rate
Mode Outline
Mode 2 transmit operation
Mode 2 receive operation
Mode 2 Uart error detection
Baud Rate SMOD=1 Clock XTAL1·2 Couter SMOD=0 Serial Port
Internal BUS Write Start TBB Sbuf TXD To Sbuf
118
Mode 3 baud rate
Mode 3 receive operation
Mode 3 transmit operation
Mode 3 Uart error detection
122
123
Inhibit F E D C B a Input
QHSHIFT/ Load Serial Clock
RXD PX.X TXD
RX.X TXD
CLK
Qhqg QF QE Qdqc QB QA
RXD TXD PX.X
PX.X RXD TXD
SHIFT/ Load Serial Clock
126
Output PX.X Control
RXD Input PX.X Control TXD
127
42 lnput/output extension example timing chart
Master Slave
MSM80C154S/83C154S/85C154HVS Multi-processor systems
TXD RXD
18 lnterrupt addresses
Interrupt
Equivalent circuit
130
Interrupt control
ET1
19 lnterrupt enable register IE, 0A8H
20 nterrupt priority register IP, 0B8H
PX1
Priority interrupt routine flow
Clrea
21 Non-priority interrupt order of preference
22 TCON88H register
External interrupt signal 0 and 1 level detection
TF1 TR1 TF0
IE1 IT1 IE0 IT0
BUS Tcon Reset
External interrupt signal 0 and 1 trigger detection
Page
139
Page
141
Page
143
Page
145
Idle mode Idle setting
CPU Power Down
Xtal Control PCON, 87H Smod HPD RPD GF1 GF0 IDL
Xtal TIMER, S-I/O Interrupt
147
148
23 CPU pin details in idle mode
149
Idle
150
55Idlemodesettingtime
Soft power down mode PD setting
152
Mode equivalent circuit
CPU Clock
Pcon 87H Control Smod HPD RPD GF1
Reset END
Pdreset
PCON5RPD Pdreset
153
154
TIMER0
155
24 CPU pin details ALF=0 in soft power down mode PD
156
Soft power down mode setting
Time chart internal ROM mode
Soft
158
25 CPU pin details ALF=1 in soft power down mode PD
159
Down
160
63Softpowerdownmodesetting
Hard power down mode HPD setting
Xtal Hpdi Control Pcon 87H Smod HPD RPD GF1 GF0 IDL
Hard power down
162
163
26 CPU pin details ALF=0 in hard power down mode HPD
Mode
164
165
166
27 CPU pin details ALF=1 in hard power down mode HPD
167
168
68Hardpowerdownmodesetting
Cancellation by CPU resetting Reset pin
MSM80C154S/83C154S/85C154HVS
By reset internal ROM mode
170
171
172
173
By reset external ROM mode
174
Mode by reset internal ROM mode
175
Mode by reset external ROM mode
Smod HPD RPD GF1 GF0 IDL
29 Power control register Pcon 87H
177
IDLE, PD Mode Interrupt Restart
INT
179
180
Internal ROM mode
181
IDLE, PD Mode Restart Mode SET Smod HPD RPD GF1 GF0
OUT Level Sense
184
Restart from idle mode by
Or 1 external ROM mode
185
Or 1 internal ROM mode
186
External ROM mode
Internal Specifications
188
Back up with hard power down mode
Back
189
190
INPUT/OUTPUT Ports
Page
Port 0 internal equivalent circuit
Outline
Port
WPO Modify
193
Internal BUS Read
Port 0 pin table
194
Port
Port 1 internal equivalent circuit
196
Control Modify Port Read WP1
Internal BUS Read OFF
197
OFF
198
On P3 On P2 Internal BUS Readoff N
199
Port 1 pin table
200
Port 1 CPU control pin table
Port 2 internal equivalent circuit
PC/DATA
DPH Port Read Modify WP2 Control
PORT2
202
WP3
Internal BUS Control Modify Read Data
Port 3 pin table
204
Port 3 CPU control pin function table
INPUT/OUTPUT Ports
Modify Port Read Internal BUS
Power Down Iocon 0F8H
206
INPUT/OUTPUT Ports
12 NPN transistor direct connection circuit
CPU 1 OUT
CPU 0 OUT
209
One machine cycle instruction output timing
Port Output Timing
Two machine cycle instruction output timing
16 Two machine cycle instruction port output time chart
Port Data Manipulating Instructions
213
214
MSM80C154/83C154/85C154
Electrical Characteristics
Operational Ranges
Absolute Maximum Ratings
VCC=4.0 to 6.0V,VSS=0V, Ta=-40C to +85C
DC Characteristics
Port 0, ALE, Psen
SSV IV CC
218
219
DC Characteristics
Repeated for specified output pins
Repeated for specified input pins
Measuring circuits
Input logic for specified status
External Program Memory Access AC Characteristics
External program memory read cycle
222
ALE Psen Port
Instr
Output
External Data Memory Access AC Characteristics
External data memory write cycle
224
External data memory read cycle
Output Data Setup to Clock Rising Edge TQVXH
Machine Cycle ALE Shift Clock Output Data Input Data
226
Input/output signal
AC Characteristics Measuring Conditions
Floating
Test Point
XTAL1 External Clock Input Waveform Conditions
Exterminal Oscillator Signal
Description of Instructions
Page
Description of Instructions
Description of Instruction Symbols
Instruction table
List of Instructions
MSM80C154S/MSM83C154S
Address in this description
Simplified Description of Instructions
CLR a CPL a RL a RLC a RR a RRC a Swap a
235
236
MOV
XRL
MOV Dptr
238
CLR
Setb
Movc A, @A+PC
239
240
Ljmp
Interrupt Enable Ajmp
Sjmp
JMP @A+DPTR
Then Else Cjne
242
Then Else Djnz
243
244
External RAM
245
Movx A, @DPTR
NOP
Acall code address Absolute call within 2K bytes
Detailed Description of MSM80C154S/MSM83C154S Instructions
RS1
ADD A, #data Add immediate data
247
248
MSM80C154S/83C154S/85C154HVS ADD A, @Rr Add indirect address
249
ADD A, Rr Add register
250
MSM80C154S/83C154S/85C154HVS ADD A, data address Add memory
251
Addc A, #data Add carry plus immediate data to accumulator
252
253
ADD A, Rr Add carry plus register to accumulator
254
255
Ajmp code address Absolute jump within 2K byte
256
257
ANL A, @Rr Logical and indirect address to accumulator
258
259
ANL A, data address Logical and memory to accumulator
260
261
ANL C,/bit address Logical and complement bit to carry flag
262
263
ANL data address, a Logical and accumulator to memory
264
LOC OBJ Source
265
Testajmp TEST1
Compcjne @R1, #05H, Test
266
Cjne A, #0AH, SS1 LOC OBJ Source
267
SS1MOV R7, a
Compcjne A, #0AH, SS1
268
Cjne A, 50H, Next LOC OBJ Source
269
Compcjne A, 50H, Next
Callcall Test
Compared data is not equal. If the compared data is equal
270
Countinc R4
271
272
MSM80C154S/83C154S/85C154HVS CLR a Clear accumulator
273
CLR C Clear carry flag
274
MSM80C154S/83C154S/85C154HVS CLR bit address Clear bit
275
CPL a Complement accumulator
276
MSM80C154S/83C154S/85C154HVS CPL C Complement carry flag
277
CPL bit address Complement bit
278
MSM80C154S/83C154S/85C154HVS DA a Decimal adjust accumulator
279
280
281
DEC a Decrement accumulator
282
MSM80C154S/83C154S/85C154HVS DEC Rr Decrement register
283
DEC data address Decrement memory
AC F0 RS1 RS0 OV F1
MSM80C154S/83C154S/85C154HVS DIV AB Divide accumulator by B
284
285
Djnz R1, Loop LOC OBJ Source
286
Loopadd A, R7
Countdjnz R1, Loop
287
Countdjnz 57H, Loop
288
Djnz 57H, Loop LOC OBJ Source
289
INC @Rr Increment indirect address
290
MSM80C154S/83C154S/85C154HVS INC a Increment accumulator
291
INC Dptr Increment data pointer
RS1 RS0 PSW
DPH DPL
292
MSM80C154S/83C154S/85C154HVS INC Rr Increment register
293
INC data address Increment memory
294
ACA0 Entermov R4, 0A0H
295
Bittsjb 34.3, Enter
296
297
298
Checkacall Addr
299
Jmpcjc Carry
Carryinc @R1
Byte Description
300
301
JNB bit address, code address Jump if bit is not set
Exitmov A, @R0
302
Testjnb 37.3, Exit
303
JNC code address Jump if carry is not set
Exitmov B, ACC
304
Testjnc Exit
305
JNZ code address Jump if accumulator is not
JNZ Test LOC OBJ Source
306
Checkjnz Test
Testmov R3, a
307
JZ code address Jump if accumulator is not
JZ Empty LOC OBJ Source
308
Emptyinc a
Checkjz Empty
309
Lcall code address Long call
310
MSM80C154S/83C154S/85C154HVS Ljmp code address Long jump
6AH
MOV @Rr, #data Move immediate data to indirect address
311
6CH
312
313
MOV @Rr, data address Move memory to indirect address
314
315
MOV A, @Rr Move indirect address to accumulator
316
317
MOV A, data address Move memory to accumulator
318
DPH·DPL
MOV DPTR, #data Move immediate data to data pointer
319
320
321
MOV Rr, a Move accumulator to register
5AH
322
323
MOV bit address, C Move carry flag to bit
324
325
MOV data address, @Rr Move indirect address to memory
326
6BH
MOV data address, Rr Move register to memory
327
328
Movc A, @A+DPTR
329
330
62CCH
331
332
57AFH
333
DPL DPH
334
335
MUL AB Multiply accumulator by B
336
MSM80C154S/83C154S/85C154HVS NOP No operation
337
ORL A, #data Logical or immediate data to accumulator
338
339
ORL A, Rr Logical or register to accumulator
340
341
ORL C, bit address Logical or bit to carry flag
342
343
ORL data address, #data Logical or immediate data to memory
344
345
POP data address Pop stack to memory
346
347
RET Return from subroutine, non interrupt
348
RS1 RS0 OV F1 P PSW
RL a Rotate accumulator left
349
350
351
RR a Rotate accumulator right
352
353
Setb C Set carry flag
354
MSM80C154S/83C154S/85C154HVS Setb bit address Set bit
355
Sjmp code address Short jump
Checkrlc a
356
Sjumpsjmp Check
357
358
359
Subb A, Rr Substract register from accumulator with borrow
360
361
Swap a Exchange nibble in accumulator
362
363
XCH A, Rr Exchange register with accumulator
7AH
364
365
366
367
368
369
370
371