1INTRODUCTIONTOTHEINTRODUCTIONTOTHEMTSMTS--86CMICROCOMPUTER86CMICROCOMPUTERTRAINERTRAINER61137100微處理機原理與應用國立台灣大學生物機電系What’sMTS-86?2133445567-17-27-37-37-47-57-67-77-887-3261137100微處理機原理與應用國立台灣大學生物機電系SPECIFICATION(1)CPU:8086(2)DisplayUnit:LCD(16x2Line)(3)MainRAM:62256x2(64KB)(4)MonitorROM:27256x2(64KB)(5)UserMemory:27256x2or62256x2(6)ClockGenerator:828461137100微處理機原理與應用國立台灣大學生物機電系SPECIFICATION(7)I/O7.1A/DConverter,ADC08097.2D/AConverter,DAC08087.3I/OPort,8255(3Portx3ea)7.4InterruptController,82597.5Timer/CounterController,82537.6Keyboard/DisplayController,82797.7SerialPort,8251(RS-232Cx2Port,25Pin)7.8Key,24Keyboard(8)ExperimentalDevice(VR,photoTR,thermistor,MIC),speaker,function,I/OsimulationLEDx8ea,button,switch361137100微處理機原理與應用國立台灣大學生物機電系SPECIFICATION(9)PowerSupply(Switching)+-12V,+5V(10)AccessoriesExperimentManualI/OBoardandCableRS-232CableRS-232CableACCord61137100微處理機原理與應用國立台灣大學生物機電系Howtouseit?1.Plugyourpower2.Pushyoupowerswitch3.PushtheRESETbuttoninthetopleft-handcornerofthekeyboard,andthenthemonitorwillshowupTheinternalprogramstoredinROMisrunningnow……MTS-86CK&HMFG461137100微處理機原理與應用國立台灣大學生物機電系FunctionofKeypad♦RESET–SystemresetkeyallowsyoutoterminateanyresentactivityandtoreturnyourMTS-86Ctoaninitializedstate.♦NMI–INTRkeyisusedtogenerateanimmediate,non-maskabletype2interrupt.TheNMIinterruptvectorisinitializedonpoweruporsystemresettopointtoaroutinewithinthemonitorwhichcauseallofthe8086’sregisterstobesaved.Controlisreturnedtothemonitorforsubsequentcommandentry.♦+–Thepluskeyallowsyoutoaddtwohexadecimalvalues.Thisfunctionsimplifiesrelativeaddressingbyallowingyoutoreadilycalculateanaddresslocationrelativetoabaseaddress.♦-–Theminuskeyallowsyoutoabstractonehexadecimalvaluefromanother61137100微處理機原理與應用國立台灣大學生物機電系♦:–Thecolonkeyusedtoseparateanaddresstobeenteredintotwoparts;asegmentvalueandoffsetvalue.♦REG–TheREGkeyallowsyouusethecontentsofanyofthe8086’sregistersasanaddressordataentry.♦,–Thecommakeyisusedtoseparatedkeypadentriesandtoincrementtheaddressfieldtothenextconsecutivememorylocations.♦.–Theperiodkeyisthecommandterminator.Whenpressed,thecurrentcommandisexecuted.NotethatwhentheusingtheGocommand,the8086beginprogramexecutionattheaddressspecifiedwhenthekeyispressed.561137100微處理機原理與應用國立台灣大學生物機電系OtherKeysEB:Examinebyte;AX:accumulateregisterER:Examineregister;BX:baseregisterGO:Go;CX:counterregisterST:Singlestep;DX:dataregisterIB:Inputbyte;SP:stackpointregisterOB:Outputbyte;BP:basepointregisterMV:Move;SI:sourceindexregisterEW:Examineword;SI:destinationindexregister0EB/AX1ER/BX2GO/CX3ST/DX4IB/SP5OB/BP6MV/SI7EW/DI61137100微處理機原理與應用國立台灣大學生物機電系OtherKeysIW:Inputword;CS:codesegmentregisterOW:Outputword;DS:datasegmentregisternone:N/A;SS:stacksegmentregisternone:N/A;ES:Extrasegmentregisternone:N/A;IP:Instructionpointregisternone:N/A;FL:Flagregisternone:N/A;none:N/Anone:N/A;none:N/A8IW/CS9OW/DXA/SSB/ESC/IPD/FLEF661137100微處理機原理與應用國立台灣大學生物機電系TutorialRESETMTS-86CK&HMFGSystemreset0EB/AXExamineByte_Examinebytecommand1EB/AXSeg.OffsData0000:0001_Firstmemorylocationtobeexamined1EB/AXSeg.OffsData0000:0011_Firstmemorylocationtobeexamined,Seg.OffsData0000:0011xx_Memorydatacontents*‘xx’isvariabledataBybyte61137100微處理機原理與應用國立台灣大學生物機電系,Seg.OffsData0000:0012xx_Nextmemorylocationtobeexamined,Seg.OffsData0000:0013xx_Nextmemorylocationtobeexamined.MTS_86CINPUTCommandterminationprompt1ER/BXExamineByte_Examineregistercommand*‘xx’isvariabledataByregisterB/ESExamineRegisterES:0000_Extrasegmentregistercontents761137100微處理機原理與應用國立台灣大學生物機電系1ER/BXExamineRegisterES:0001_Newregistercontents0EB/AXExamineRegisterES:0010_Newregistercontents.Commandterminationprompt1ER/BXExamineRegister_ExamineregistercommandToconfirmafterchangedmemoryMTS_86CINPUTB/ESExamineRegisterES:0010_Extrasegmentregistercontents.CommandterminationpromptMTS_86CINPUT61137100微處理機原理與應用國立台灣大學生物機電系7EW/DIExamineWord_Examinewordcommand1ER/BXSeg.OffsData0000:0001_Segmentaddress0EB/AXSeg.OffsData0000:0010_Segmentaddress:Seg.OffsData0100:0100_Segment/OffsetseparatorByword0EB/AXSeg.OffsData0000:0100_Segmentaddress0EB/AXSeg.OffsData0100:0000_Offsetaddress861137100微處理機原理與應用國立台灣大學生物機電系,Seg.OffsData0100:0000xxxx_Memorydatacontentsof100:1,100:01ER/BXSeg.OffsData0100:00000001_Offsetdata2GO/CXSeg.OffsData0100:00000012_Offsetdata3ST/DXSeg.OffsData0100:00000123_Offsetdata4IB/SPSeg.OffsData0100:00001234_Offsetdata.CommandterminationpromptMTS_86CINPUTYoucandothatagainaccordingtoprevioussteps61137100微處理機原理與應用國立台灣大學生物機電系2GO/CXSeg.OffsData0000:0000_xxGoGocommand(IPregisteroffsetaddress&datacontentsFSeg.OffsData0000:000F_xxGoSegment(CSregister)addressExecutingProgram0EB/AXSeg.OffsData0F00:0000_xxGoOffsetaddress0EB/AXSeg.OffsData0000:00F0_xxGoSegment(CSregister)address0EB/AXSeg.OffsData0000:0F00_xxGoSegment(CSregister)address:Seg.OffsData0F00:0F00_xxGoSegment/Offsetseparator.8BITLEDTEST!K&HMFG0000CommandTermination/prompt961137100微處理機原理與應用國立台灣大學生物機電系RESETMTS-86CK&HMFGSystemreset,DEMOPROGRAMSELECT01-20.StartingDEMOprogramsExamplesofexecutingDEMOprograms0EB/AXDEMOPROGRAMSELECT01-20.00Inputti