INTRODUCTION TO THE MTS-86C MICROCOMPUTER TRAINER What s MTS-86? 7-4 7-5 7-7 7-3 7-2 7-3 7-6 2 4 5 3 7-6 7-8 7-3 8 4 5 3 6 37 微處理機原理與應用國立台灣大學生物機電系
SPECIFICATION () CPU: 886 (2) Display Unit: LCD (6x2 Line) (3) Main RAM: 62256 x 2 (64KB) (4) Monitor ROM: 27256 x 2 (64KB) (5) User Memory: 27256 x 2 or 62256 x 2 (6) Clock Generator: 8284 6 37 微處理機原理與應用國立台灣大學生物機電系 SPECIFICATION (7) I/O 7. A/D Converter, ADC 89 7.2 D/A Converter, DAC 88 7.3 I/O Port, 8255 (3Port x 3ea) 7.4 Interrupt Controller, 8259 7.5 Timer/Counter Controller, 8253 7.6 Keyboard/Display Controller, 8279 7.7 Serial Port, 825 (RS-232C x 2Port, 25Pin) 7.8 Key, 24 Keyboard (8) Experimental Device (VR, photo TR, thermistor, MIC), speaker, function, I/O simulation LED x 8ea, button, switch 6 37 微處理機原理與應用國立台灣大學生物機電系
SPECIFICATION (9) Power Supply (Switching) +-2V, +5V () Accessories Experiment Manual I/O Board and Cable RS-232 Cable RS-232 Cable AC Cord 6 37 微處理機原理與應用國立台灣大學生物機電系 How to use it?. Plug your power 2. Push you power switch 3. Push the RESET button in the top left-hand corner of the keyboard, and then the monitor will show up MTS-86C K&H MFG The internal program stored in ROM is running now 6 37 微處理機原理與應用國立台灣大學生物機電系
Function of Keypad RESET System reset key allows you to terminate any resent activity and to return your MTS-86C to an initialized state. NMI INTR key is used to generate an immediate, non-maskable type 2 interrupt. The NMI interrupt vector is initialized on power up or system reset to point to a routine within the monitor which cause all of the 886 s registers to be saved. Control is returned to the monitor for subsequent command entry. + The plus key allows you to add two hexadecimal values. This function simplifies relative addressing by allowing you to readily calculate an address location relative to a base address. - The minus key allows you to abstract one hexadecimal value from another 6 37 微處理機原理與應用國立台灣大學生物機電系 : The colon key used to separate an address to be entered into two parts; a segment value and offset value. REG The REG key allows you use the contents of any of the 886 s registers as an address or data entry., The comma key is used to separated keypad entries and to increment the address field to the next consecutive memory locations.. The period key is the command terminator. When pressed, the current command is executed. Note that when the using the Go command, the 886 begin program execution at the address specified when the key is pressed. 6 37 微處理機原理與應用國立台灣大學生物機電系
Other Keys 2 GO/CX 3 ST/DX 4 IB/SP 5 OB/BP 6 MV/SI 7 EW/DI EB: Examine byte; AX: accumulate register ER: Examine register; BX: base register GO: Go; CX: counter register ST: Single step; DX: data register IB: Input byte; SP: stack point register OB: Output byte; BP: base point register MV: Move; SI: source index register EW: Examine word; SI: destination index register 6 37 微處理機原理與應用國立台灣大學生物機電系 Other Keys 8 IW/CS 9 OW/DX A /SS B /ES C /IP D /FL E F IW: Input word; OW: Output word; none: N/A; none: N/A; none: N/A; none: N/A; none: N/A; none: N/A; CS: code segment register DS: data segment register SS: stack segment register ES: Extra segment register IP: Instruction point register FL: Flag register none: N/A none:n/a 6 37 微處理機原理與應用國立台灣大學生物機電系
Tutorial By byte RESET MTS-86C K&H MFG System reset, Examine Byte _ :_ :_ : xx_ Examine byte command First memory location to be examined First memory location to be examined Memory data contents * xx is variable data 6 37 微處理機原理與應用國立台灣大學生物機電系,,. :2 xx_ :3 xx_ MTS_86C>INPUT Next memory location to be examined Next memory location to be examined Command termination prompt By register Examine Byte _ Examine register command B /ES Examine Register ES:_ Extra segment register contents * xx is variable data 6 37 微處理機原理與應用國立台灣大學生物機電系
Examine Register ES:_ Examine Register ES:_ New register contents New register contents MTS_86C>INPUT. Command termination prompt To confirm after changed memory Examine Register _ Examine register command B /ES Examine Register ES:_ Extra segment register contents MTS_86C>INPUT. Command termination prompt 6 37 微處理機原理與應用國立台灣大學生物機電系 By word 7 EW/DI Examine Word _ :_ :_ :_ Examine word command Segment address Segment address Segment address : :_ Segment/Offset separator :_ Offset address 6 37 微處理機原理與應用國立台灣大學生物機電系
, 2 GO/CX 3 ST/DX 4 IB/SP : xxxx_ : _ : 2_ : 23_ : 234_ Memory data contents of :, : Offset data Offset data Offset data Offset data MTS_86C>INPUT. Command termination prompt You can do that again according to previous steps 6 37 微處理機原理與應用國立台灣大學生物機電系 Executing Program 2 GO/CX :_xx Go Go command (IP register offset address & data contents F : :F_xx Go :F_xx Go :F_xx Go F:F_xx Go F:_xx Go Segment (CS register) address Segment (CS register) address Segment (CS register) address Segment /Offset separator Offset address. 8 BIT LED TEST! K&H MFG 6 37 微處理機原理與應用國立台灣大學生物機電系 Command Termination/prompt
Examples of executing DEMO programs RESET MTS-86C K&H MFG System reset,. <DEMO PROGRAM> SELECT -2. <DEMO PROGRAM> SELECT -2. <DEMO PROGRAM> SELECT -2. 8 BIT LED TEST! K&H MFG Starting DEMO programs Inputting program No Inputting program No Executing! 6 37 微處理機原理與應用國立台灣大學生物機電系 Memory Organization of MTS-86C FFFFFH F8H FH EH Monitor Program Exercise Program User Memory ROM ROM,RAM H 4H H OPEN User Program Interrupt Vector Table RAM 6 37 微處理機原理與應用國立台灣大學生物機電系
IO ADDRESSING of MTS-86C Port Address Port Function FFFFH FFFDH FFFBH FFF9H FFFEH FFFCH FFFAH FFF8H FFF2H FFFH FFEAH FFE8H FFDEH FFDCH FFDAH FFD8H FFD2H FFDH PPI- Control Word Register PPI- C Port PPI- B Port PPI- A Port PPI-2 Control Word Register PPI-2 C Port PPI-2 B Port PPI-2 A Port 825- Command 825- Data 8279 Status or Command 8279 Data 8253 Command 8253 Count2 8253 Count 8253 Count 825-2 Command 825-2 Data Parallel I/O No Parallel I/O No2 RS232C PORT Keypad Control Counter & Timer RS232C PORT2 6 37 微處理機原理與應用國立台灣大學生物機電系 FFCAH FFC8H 8259 Command 8259 Data Interrupt Control 3FFH FND Display 3FD8H D/A Converter 8 Bit D/A Converter 3FD6H 3FD4H 3FD2H 3FDH PPI-3 Control Word Register PPI-3 C Port PPI-3 B Port PPI-3 A Port <For experiments> Connect to speaker Experiment for Output(8bits) Experiment for Input(8bits) 3FCEH 3FCCH 3FCAH 3FC8H A/D Converter IN3 or IN7 A/D Converter IN2 or IN6 A/D Converter IN or IN5 A/D Converter IN or IN4 8 Bit A/D Converter IN~3, IN4-IN7 can be modified by DIP8 of S/W 3 6 37 微處理機原理與應用國立台灣大學生物機電系
How to Program? Step trace Progarm: CODE SEGMENT ASSUME CS:CODE, DS:CODE Mov AX,[e] Mov BX,AX Mov CX,BX Mov CX,DX Move [],DX HLT CODE ENDS END 6 37 微處理機原理與應用國立台灣大學生物機電系 Enter program segment :, Mov AX,[E] A, E,, Mov BX,AX 8 B, D 8, 6 37 微處理機原理與應用國立台灣大學生物機電系
Mov CX,BX 8 B, C 8, Mov DX,CX 8 B, D, Mov [],DX 8 9, 6, 6 37 微處理機原理與應用國立台灣大學生物機電系, HLT, F 4, Step Trace: 3 ST/DX Reset AX,BX,CX,DX :,. To see what happened 6 37 微處理機原理與應用國立台灣大學生物機電系
Examine AX AX What happened to AX. ST, Examine BX BX What happened to BX. ST, Examine CX CX What happened to CX. ST, 6 37 微處理機原理與應用國立台灣大學生物機電系 Examine DX DX Reset AX,BX,CX,DX. ST, Free Run: 2 GO/CX :, 6. To see what happened 6 37 微處理機原理與應用國立台灣大學生物機電系