Iconic Machines

Manual / Guide · 1976

KIM-1 User Manual (MOS Technology 6500-15B, August 1976)

Read the PDF ↗

Setting up and operating the KIM-1: keypad and monitor, the teletype and cassette interfaces, the memory map, and the timer and I/O.

Author
MOS Technology
Year
1976
Type
Manual / Guide
Credit
MOS Technology; copy from www.bitsavers.org

← Back to the Reference Library

KIM-1 User Manual (MOS Technology 6500-15B, August 1976)

111•= ICltttCtt&\\11 11T81tS 1\\l£lttt£tt1\\l'llTlltS i\\l(lttt(tt&\\1111T81tS 1 i\\1£1ttt£tti\\1 11Tlltl KIM-I USER MANUAL Publications Number 6500-ISB KIM-1 MICROCOMPUTER MODULE lJSER MANUAL AUGUST 1976 The information in this manual has been reviewed and is believed to be entirely reliable. However, no responsibility is assumed for inaccuracies. The material in this manual is for informational purposes only and is subject to change without notice. Second Edition © MOS TECHNOLOGY, INC. 1976 "All Rights Reserved" MOS TECHNOLOGY, INC. 950 Rittenhouse Road Norristown, PA 19401 TABLE OF CONTENTS CHAPTER 1 YOUR KIM-1 MICROCOMPUTER MODULE 1 CHAPTER2 GETTING STARTED 5 CHAPTER3 CHAPTER4 CHAPTERS 2.1 Parts Complement 5 2.2 A Few Words of Caution! 6 2.3 First Steps 6 2.4 Let's Try a Simple Problem 9 2.5 Adding an Audio Tape Unit 12 2.6 Adding a Teleprinter 17 THE KIM-1 SYSTEM 21 3.1 KIM-1 System Description 21 3.2 KIM-1 Memory Allocation 34 3.3 KIM-1 Operating Programs 40 OPERATING THE KIM-1 SYSTEM 43 4.1 Using the Keyboard and Display 43 4.2 Using the Audio Tape Unit 47 4.3 Using the Teleprinter 50 LET'S TRY A RE.AL APPLICATION 55 5.1 Defining the Interface 55 5.2 Writing the Program 58 5.3 Entering the Program 65 5.4 Executing the Program 66 5.5 Program Debugging and Modification 67 ii CHAPTER6 CHAPTER 7 EXP.ANDING YOUR SYSTEM 71 6.1 Memory and I/O Expansion 71 6.2 Interrupt Vector Management 75 WARRANTY .AND SERVICE 79 7.1 In-Warranty Service 79 7.2 Out-of-Warranty Service 80 7.3 Policy on Changes 80 7.4 Shipping Instructions 80 iii LIST OF FIGURES CHAPTER2 CHAPTER 3 CHAPTER 5 CHAPTER6 2-1 KIM MODULE 7 2-2 Power Supply Connections 8 2-3 Audio Tape Unit Connections 13 2-4 TTY Connections 18 3-1 KIM-1 Block Diagram 24 3-2 Detailed Block Diagram 25 3-3 Control and Timing 26 3-4 lK x 8 RAM Memory 27 3-5 Keyboard and Display 28 3-6 Keyboard Detail 29 3-7 TTY Interface 30 3-8 Audio Tape Interface 31 3-9 Application Connector 32 3-10 Expansion Connector 33 3-11 Memory Block Diagram 37 3-12 Memory Map 38 3-13 Special Memory Addresses 39 3-14 Flow Chart 41 5-1 Speaker Application 57 5-2 Assembly Language Listing 60 5-3 Square Wave Output 62 5-4 Machine Language Code Table 63 5-5 Key Sequence: Enter Program 65 6-1 4K Expansion 73 6-2 65K Expansion 74 6-3 Vector Selection 78 iv LIST OF APPENDICES APPENDIX A KIM-1 Parts List A-1 APPENDIXB KIM-1 Parts Location B-1 APPENDIXC In Case of Trouble C-1 APPENDIXD Suggested Power Supply D-1 APPENDIXE Audio Tape Format E-1 APPENDIXF Paper Tape Format F-1 APPENDIXG 6502 Characteristics G-1 APPENDIXH 6530 Characteristics H-1 APPENDIX I KIM-1 Program Listings I-1 v CHAPTER 1 YOUR KIM-1 MICROCOMPUTER MODULE Congratulations and welcome to the exciting new world of microcomputers! As the owner of a KIM-1 Microcomputer Module, you now have at your disposal a completely operational, fully tested, and very capable digital computer which incorporates the latest in microprocessor technology offered by MOS Technology, Inc. By selecting the KIM-1 module, you have eliminated all of the problems of constructing and debugging a microcomputer system. Your time is now available for learning the opera- tion of the system and beginning immediately to apply it to your specific areas of interest. In fact, if you will follow a few simple procedures outlined in this manual, you should be able to achieve initial operation of your KIM-1 module within a few minutes after unpacking the shipping container. Your KIM-1 module has been designed to provide you with a choice of operating features. You may choose to operate the system using only the keyboard and display included as part of the module. Next, you may add a low cost audio cassette tape recorder to allow storage and retrieval of your programs. Also, you may add a serial interfaced teleprinter to the system to provide keyboard commands, hard-copy printing, and paper tape read or punch capability. At the heart of your KIM-1 system is an MCS 6502 Microprocessor Array operating in conjunction with two MCS 6530 arrays. Each MCS 6530 provides a total of 1024 bytes of Read-only Memory (ROM), 64 bytes of Random Access Memory (RAM), 15 Input/Output pins, and an Interval Timer. Stored permanently in the ROM's of the MCS 6530 arrays are the monitor and executive programs devised by MOS Technology, Inc. to control the various operating modes of the KIM-1 system. The KIM-1 system is intended to provide you with a capable microcomputer for use in your "real-world" application. Accordingly, the system includes a full 1024 bytes of RAM to provide data and program storage for your application program. In addition, you are provided with 15 bidirectional input/output pins to allow interface control of your specific application. Finally, one of the interval timers included in the system is available for generation of time base signals required by your application. Your KIM-1 system comes to you complete with all components mounted and tested as a system. You need not worry about timing signals (we've included a lMHz crystal oscillator on the module), interface logic or levels between system components, or interface circuitry to peripheral devices. In fact, you need only apply the indicated power supply voltages to the designated pins to achieve full operation of your KIM-1 system. We recommend that you read all of this manual before applying power to or attempting to operate your KIM-1 module. In the order presented, you will find: Chapter 2 - "hints and kinks" to help you achieve initial system operation Chapter 3 - a more detailed description of the KIM-1 system hardware and software Chapter 4 - operating procedures for all system modes Chapter 5 - an example of a typical application program using all of the features of the KIM-1 system. 2 At some future time, you may find it desirable to expand the KIM-1 system to incorporate more memory, different types of memory, or additional input/output capability. Again, we have tried to make system expansion as simple as possible with all required interface signals brought out to a special connector on the module. Watch for: Chapter 6 - a guide to system expansion for increasing both memory and input/output capability Despite our best efforts to provide you with a fully operable and reliable system, you might encounter some difficulties with your KIM-1 module. If so, refer to: Chapter 7 - some guidance on warranty and service procedures for your KIM-1 module Following the basic text of this manual, you will find a series of Appendices intended to provide you with detailed information on certain specialized subjects of interest to you in understanding the operation of the KIM-1 system. Lastly, since this manual cannot presume to provide all of the technical information on the hardware or programming aspects of the MCS 6502 microprocessor array, we are including with your KIM-1 system two additional manuals for your reference. The Hardware Manual defines the various elements of the system, their electrical and interface characteristics, and the basic system architecture and timing. The Programming Manual provides the detailed information required to write effective programs using the MCS 6502 instruction program set. So much for introductory comments! Now lets get started and see if we can get your KIM-1 Microcomputer Module doing some real work for you. 3 CHAPTER 2 GETTING STARTED This chapter is intended to guide you through the first important steps in achieving initial operation of your KIM-1 Microcomputer Module. We will ask you to perform certain operations without explanation at this time as to why they are being done. In later sections of this manual, full explanations will be offered for every operating procedure. 2.1 PARTS COMPLEMENT After unpacking the shipping container for your KIM-1, you should have located the following items: 3 Books - KIM-1 Users Manual Hardware Manual Programming Manual 1 Programming Card 1 System Schematic 1 KIM-1 Module 1 Connector (Already mounted on the Module) 1 Hardware Packet 1 Warranty Card You may wish to save the shipping container and packing material should you need to return your KIM-1 module to us at some future date. 5 2.2 A FEW WORDS OF CAUTION WARNING Your KIM-1 module includes a number of MOS integrated circuits. All such circuits include protective devices to prevent damage resulting from inadvertant application of high voltage potentials to the pins of the device. However, normal precautions should be taken to prevent the appli- cation of high voltage static discharges to the pins of an MOS device. Immediately before removal of the packing material from your KIM-1 module, you should develop the following precautionary habits: 1. Discharge any static charge build up on your body by touching a ground connection before touching any part of your KIM-1 module. (This precaution is especially important if you are working in a carpeted area) 2. Be certain that soldering irons or test equipment used on the KIM-1 module are properly grounded and not the source of dangerously high voltage levels. On a different subject, after unpacking your KIM-1 module, you will note the presence of a potentiometer. This adjustment has been set at the factory to insure correct operation of the audio cassette interface circuits. It should never be necessary for you to change the position of this potentiometer. 2.3 FIRST STEPS After unpacking the KIM-1 module, locate the small hardware packet and install the rubber pads provided. The rubber pads are located at the bottom of the module (see attached sketch) and act both to lift the card off your work surface and to provide mechanical support for the module while you depress keys. 6 Place the module such that the keyboard is to your lower right and observe that two connector locations extend from the module to your left. The connector area on the lower left is referred to as the Application connector (A). You will note that a 44 pin board edge connector is already installed at this location. The connector area to the upper left is for use by you for future system expansion and is referred to as the Expansion connector (E). fg] la rrm rn ODD lg) ODDO DODD DODD (g) DODD DODO BOTTOM VIEW TOP VIEW KIM-I Module FIGURE 2:1 7 Remove the (A) connector from the module and connect the pins as shown in the sketch. (A) +5 vcc +5 v. (± 5%) 1.2 A. +12 VBB +12v. (± 5%) 0.1 A. vss -Power Supply Connections FIGURE 2.2 Reinstall the (A) connector making certain that the orientation is correct. Note 1: The +12 volt power supply is required only if you will be using an audio cassette recorder in your system. Note 2: The jumper from pin A-K to Vss (Pin A-1) is essential for system operation. If you expand your system later, this jumper will be removed and we'll tell you what to do to pin A-K. Note 3: If you don't have the proper power supplies already available, you may wish to construct the low cost version shown with schematic and parts list in Appendix D. In any event, your power supply must be regulated to insure correct system operation and must be capable of supplying the required current levels indicated in the sketch. 8 Now, recheck your connections, turn on your power supplies, and depress ~ (reset). You should see the LED display digits light as your first check that the system is operational. If not, recheck your hookup or refer to Appendix C (In Case of Trouble). 2.4 LETS TRY A SIMPLE PROGRAM Assuming that you have completed successfully all of the steps thus far, a simple program now can be tried.to demonstrate the operation of the system and increase your confidence that everything works properly. We'll be using only the keyboard and display on the module for this example. (In the next two sections we'll worry about the teleprinter and the audio cassette). For our first example, we will add two 8 bit bina~y numbers together and display the result. We presume that you are familiar with the hex- adecimal representation of numbers and the general rules for binary arithmetic. First check and be sure that the slide switch in the upper right corner of the keyboard is pushed to the left (SST Mode is OFF). proceed with the following key sequence: Press Keys IAD I CTI CD [QJ CiJ loA I Ci:] Ow mw 8 8 8 0 0 0 mm mm [£] mm mm [£] [£] [QJ[QJ [I] ITJ [QJ [!] mm ITJ ITJ 8 CD CTI [£] ITJ [TI 8 wm See On DisEla~ Step ti xxxx xx 0002 xx 0002 xx 0002 18 0003 AS 0004 00 0005 65 0006 01 0007 85 0008 FA 0009 A9 OOOA 00 OOOB 85 OOOC FB OOOD 4C OOOE 4F OOOF lC 1 2 9 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Now What you have just done is entered a program and stored it in the RAM at locations 0002 through OOOF. You should have noticed the purpose of several special keys on your keyboard: I ADI - selects the address entry mode IDAI - selects the data entry mode ~ - increments the address without changing the entry mode ~ To0 - 16 entry keys defining the hex code for address or data entry You've noticed as well that your display contains 6 digits. The four on the left are used to display the hex code for an address. The two on the right show the hex code for the data stored at the address shown. Therefore, when you pressed ~ (step 1) and ~ ~ [D [3J (step 2), you defined the address entry mode, selected the address 0002, and displayed the address 0002 in the four left-most display digits. Incidentally, when we show an "x" in the display chart, we mean that we don't know what will be displayed and we "don't care." Next you pressed IDA I (step 3) followed by G [!] (step 4). Here, you have defined the data entry mode and entered the value 18 to be stored at your selected address 0002. Of course, the 18 then was dis- played in the two right-most digits of your display. You remained in the data entry mode but began to press ~ followed by a two digit number (steps 5 to 17). Note that each depression of the ~key caused the address displayed to increase by one. following the 8 The hex keys key continued to enter the data field of the display. This procedure is merely a convenience when a number of successive address locations are to be filled. If you made any mistakes in pressing the keys, you should have noticed that correcting an error is simply a matter of reentering the data until the correct numbers show on the display. 10 The program you have entered is a simple loop to add two 8 bit binary numbers together and present the result on the display. For a progranuner, the listing of the program entered might appear as follows: PO INTL POINTH START 0000 0001 0002 0003 0005 0007 0009 OOOB OOOD $FA = $FB $1C4F VALl VAL2 PROG CLC LDA VALl ADC VAL2 STA POINTL LDA 1100 STA POINTH JMP START = 18 AS 00 65 01 85 FA A9 00 85 FB 4C 4F lC Stated in simple terms, the program will clear the carry flag (CLC), load VALl into the accumulator (LDA VALl), add with carry VAL2 to the accumulator (ADC VAL2), and store the result in a location POINTL (STA POINTL). A zero value is stored in a location POINTH (LDA 1100 and STA POINTH) and the program jumps to a point labelled START (JMP START). This pre-stored program will cause the display to be activated and will cause the address field of your display to show the numbers stored in locations POINTH and POINTL. Note that the result of the addition has already been stored in location POINTL. The hex codes appearing next to the address field of the listing are exactly the numbers you entered to store the program. as machine language codes. We refer to these For example, 4C is the hex code for the JMP instruction of the microprocessor. The next two bytes of the program define 1C4F (START) as the jump address. As yet, you are not able to run the program because you have not yet entered the two variables (VALl and VAL2). Press Keys ~ C2::J CQJ CD CD ~ CQJ CQJ ~ ~IT!wuu CM::! I + I ~ wCLJ 0LI:J ~ Lets try an actual example: See On DisElay SteE II OOOF lC OOFl xx OOFl 00 OOFl 00 0000 xx 0000 02 0001 03 0002 18 17A 17B 18 19 20 21 22 23 11 Steps 17A, 17B, and 18 insure that the binary arithmetic mode is selected. Steps 19 to 21 store the hex value 02 in location 0000 (VALl). 22 stores the hex value 03 in location 0001 (VAL2). Step Now we are ready to In step 23, the lqol key causes the program to execute run the program. and the result, 05, appears in the right two digits of the address display. Although the problem appears trivial, it illustrates the basic principles of entering and executing any program as well as providing a fairly high assurance level that your KIM-1 module is operating properly. You should try one more example using your stored program. Repeat steps 17A to 23 but substitute the value FF for VALl and VAL2 at locations 0000 and 0001. Now when you press the 1°0 1 key, your display should read: OOFE xx The answer is correct because: FF = 1111 1111 + FF = 1111 1111 FE 1111 1110 Try some more examples if you wish and then let's move on to the rest of the system. 2.5 ADDING A TAPE RECORDER In the previous section, you entered and executed a program. If you turn off the power supplies to the system, your program-is lost since the memory into which you stored your program is volatile. If you require the same program again, you would have to repower the system and reenter the program as in the previous example. The KIM-1 system is designed to work with an audio cassette tape recorder/player to provide you with a medium for permanent storage of your programs or data. The cassette with recorded data may be reread by the system as often as you wish. In this section, you will connect the audio cassette unit to the system and verify its operation. 12 The recording technique used by the KIM-1 system and the interface circuits provided have been selected to insure trouble-free operation with virtually any type and any quality level audio cassette unit. (We have demonstrated correct operation with a tape unit purchased for less than $20.00 from a local discount outlet). In addition, tapes recorded on one unit may be played back to the system on a different unit if desired. We recommend, of course, that you make use of the best equip- ment and best quality tapes you have available. In selecting a tape unit for use with your KIM-1 system, you should verify that it comes equipped with the following features: 1. An earphone jack to provide a source of recorded tape data to the KIM-1 system. 2. A microphone jack to allow recording of data from the KIM-1 system on the tape. 3. Standard controls for Play, Record, Rewind, and Stop. Note: You should avoid certain miniaturized tape equipment intended for dictating applications where the microphone and speaker are enclosed within the unit and no connections are provided to external jacks. If such equipment is used, you will have to make internal modifications to reach the desired connection points. To connect your tape unit to the KIM-1 module, turn off the power supplies and remove the connector (A) from the module. Add the wires shown in the sketch: MIC AUDIO DATA OUT (LO) TAPE UNIT vss 1 - EARPHONE AUDIO DATA IN p 1---~AUDIO DATA OUT (HI) L Audio Tape Unit Connections FIGURE 2.3 13 Keep the leads as short as possible and avoid running the leads near sources of electrical interference. portable type units. The connections shown are for typical, The Audio Data Out (LO) signal has a level of approx- imately 15 mv. (peak) at pin M. Should you desire to use more expensive and elaborate audio tape equipment, you may prefer to connect the high level (1 volt peak) audio signal available at pin P to the "LINE" input of your equipment. Return the connector (A) to its correct position on the KIM-1 module and turn on the power supplies. To verify the operation of your audio cassette equipment, try the following procedures: 1. Reenter the sample program following the procedures outlined in the previous section (2.4). Try the sample problem again to be sure the system is working correctly. 2. Install a cassette in your tape equipment and REWIND to the limit position. 3. Define the starting and ending address of the program to be stored and assign an identification number (ID) to the program. Press Ke;y:s GQJ SteE ti See On DisEla;y: xx xx xx 1 OOFl xx 2 OOFl 00 3 Lill ~~ QQ] OOFl 00 4 17F5 xx 5 o=::J CU CD c:::LJ r::::g::::J CQ=:J CQAJ 17F5 00 6 [Q::Ju=J ~ 17F6 00 7 CLJCQJ 17F7 10 ~ 8 LQ::JCQ:J 17F8 00 G:::J 9 10 17F9 01 ~ ~cu 17F9 01 11 ~ 1800 xx 12 CCJITJ~CTI You will recall that the program we wish t~ store on tape was loaded ~ CQ:J CD CLJ into locations 0000 to OOOF of the memory. Therefore, we define a start- ing address for recording as 0000 and store this in locations 17F5 and 17F6 (Steps 4 to 7). We define an ending address for recording as one more than the last step of our program and stored the value 0010 (= OOOF + 1) in locations 17F7 and 17F8 (Steps 8,9). Finally we pick an arbitrary ID as 01 and store this value at location 17F9 (Step 10). Note that before we use the audio cassette unit for recording or playing back, we must put 00 in location OOFl (Steps 1,2 and 3). 14 The starting address of the tape recording program is 1800. 11 and 12 we set this address value into the system. In Steps If we were to press ~' the system would proceed to load data on to the magnetic tape. But first, we'd better start the tape~ 4. Select the Record/Play mode of the tape recorder. few seconds for the tape to start moving and now: Wait a Press ~ 5. The display will go dark for a short time and then will relight showing: 0000 xx 6. As soon as the display relights, the recording is finished and you should STOP the tape recorder. Now, you should verify that the recording has taken place correctly. This can be proven by reading the tape you have just recorded. Proceed as follows: 1. Rewind the tape cassette to its starting position. 2. Turn off the system power supplies and then later, turn them back on. This has the effect of destroying your previously stored program which you already have recorded on tape. 3. Prepare the system for reading the tape as follows: Press Keys See On DisElay Step II ~ [AQJ c::ii::J c:o:::::J CE:::] o:::J CQ6:J ~LQJ ~ CO CTI CCI CD ~ ~ c:Do=J CL] CLl r::::IJ o::J [QQJ xx xx xx OOFl xx OOFl 00 OOFl 00 17F9 xx 17F9 xx 17F9 01 17F9 01 1873 xx (Dark) 15 1 2 3 4 5 6 7 8 9 10 The KIM-1 system is now looking for tape input data with the ID label 01. Recall that this is the same ID label we assigned when we recorded the program. 4. If your tape unit has a volume control, set the control at approximately the half way point. 5. If your tape unit has a tone control, set the control for maximum treble. 6. Now, turn on the tape using the PLAY mode. The tape will move forward and the system will accept the recorded data. As soon as the data record (ID=Ol) has been read, the display should relight showing: 0000 xx You may now stop the tape unit. If the display relights and shows; FFFF xx this means that the selected record has been located and read but that an error has occurred during the reading of the data. In this case, press the ~ key and repeat the read tape procedures from the beginning. If the FFFF still shows on the display, repeat the entire recording and playback procedures checking each step carefully. If the problem persists, refer to Appendix C, (In Case of Trouble). If the tape continues to run and the display does not relight, this means that the system has been unsuccessful in reading any data back from the tape. In this case, repeat the entire recording and playback proce- dures checking each step carefully. If the problem persists, refer to Appendix C, (In Case of Trouble). 7. Assuming that you have read the tape successfully, you now may verify that the program has been restored to memory by trying a sample problem. (02 + 03 = 05) NOTE: The KIM-1 interface circuits for the audio tape system are designed so that you do not require special test equipment to set up correct operating levels. If you have followed the procedures indicated, the tape system should work without the need of any adjustments by you. 16 2.6 ADDING A TELEPRINTER If you have access to a serial teleprinter, you may add such a unit to the KIM-1 system with very little effort. One of the more commonly available units of this type is the Teletype Model 33ASR which we will use for the purposes of illustration in this section. However, if you have available different equipment, you may use the information presented here as a guide to connecting your specific unit. In any case, we recom- mend you follow the directions offered by the equipment manufacturer in his instruction manual to effect the desired wiring and connection options. The KIM-1 provides for a 4 wire interface to the TTY. Specifically, the "20 MA loop" configuration should be used and you should check that your TTY has been wired for this configuration. If not, you may easily change from "60 MA loop" to "20 MA loop" configurations following the manufacturers directions. The KIM-1 has been designed to work properly only with a teleprinter operating in full duplex mode. Check the literature supplied with your teleprinter if you are unsure if your unit is properly configured. You are not restricted to units with specific bit rates (10 CPS for TTY) since the KIM-1 system automatically adjusts for a wide variety of data rates (lOCPS, 15CPS, 30CPS, etc.). To connect the TTY to the system, proceed as follows: 1. Turn off system power and remove connector (A) from the module. 2. Add the wires shown in the sketch to connector (A) and to the appropriate connector on the TTY unit. 17 +5V. I (A) TS J2 PRINTER RETURN -· • r---, 7 I 7 22.MA) TTY DATA OUT 6 I 8 ~ I •• PRINTER RETURN 2~MA) TTY DATA IN -· • -· • I L---..J TTY ASR 33 ,..---, 3 5 I I 4 6 I I I L---.J TS J2 OR ~~--- ;}KB l KIM JUMPER T ' PICK I ONE EXTERNAL SWITCH TO SELECT EITHER MODE FOR TTY OPERATION TTY Connections FIGURE 2.4 3. The jumper wire from A-21 to A-V is used to define for the KIM-1 system that a teleprinter will be used as the only input/display device for the system. If you expect to use both TTY and the KIM-1 keyboard/display, you should install the switch shown instead of the jumper. Now, the switch, when open, will allow use of the keyboard and display on the KIM-1 module and, when closed, will select the teleprinter as the input/display device. (Of course, you may use a clip-lead instead of the switch if you desire). 4. Be sure pins A-21 and A-V are connected. Reinstall connector (A) and return power to the system. Turn-on the TTY. 5. Press the ~ key on the KIM-1 module then press the~ key on the TTY. This step is most important since the KIM-1 system adjusts automatically to the bit rate of the serial teleprinter and requires this first key depression to establish this rate. 18 If everything is working properly you should immediately observe a message being typed as follows: KIM This is a prompting message telling you that the TTY is on-line and the KIM-1 system is ready to accept commands from the TTY keyboard. Should the prompting message not be typed press the ~ key on the KIM-1 keyboard and then the @ key on the TTY. If the "KIM" message still is not typed, recheck all connections and the TTY itself and try again. If the problem persists, refer to Appendix C, (In Case of Trouble). 6. Assuming that the TTY is operable, you may now try a simple group of operations to verify correct system operation: Press Keys See Printed @@@® KIM xxxx xx 0002 0002 xx lWACT1 (!)@(!) Step II 0004 xx 0003 A5 1 2 3 4 5 6 7 8 KIM xxxx xx 9 18. 0003 xx ©©0 @ AS. @ Step 1 shows the "KIM" prompting message. In Step 2, an address (0002) is selected followed by a space key in Step 3. The address cell 0002 together with the data stored at that location (xx) is printed. Step 4 shows the "modify cell" operation using the(!) key and the hex data keys preceding. Step 5 shows the incrementing to the next address cell (0003) after the (!) key. also occurs. Note that the modification of cell 0002 Steps 6 and 7 show the modification of data in cell 0003 and the incrementing to cell 0004. Step 8 shows the action of thee key in backing up one cell to 0003 where we can see from the printout that the correct data (AS) has been stored at that location. Step 9 shows the reaction to the® key in resetting the system and producing a new "KIM" prompting message. Note, by the way, that in this example you have repeated a portion of the program entry exactly as you did in Section 2.4 but this time using the TTY. 19 So much for now! If all of the operations have occurred properly, you may be certain that your TTY and KIM-1 module are working together correctly. We will describe in detail all of the other operations pos- sible with the TTY in a later section of the manual. If you have reached this point without problems, you now have completed all of the required system tests and may be confident that the KIM-1 module and your peripheral units are all working correctly. Our next task is to learn more about the KIM-1 system and its operating programs. 20 CHAPTER3 THE KIM-1 SYSTEM Up to this point you have been engaged in bringing up your KIM-1 system and verifying its correct operation. Now it's time to learn more about the various parts of the KIM-1, how the parts work together as a system, and how the operating programs control the various activities of the system. The diagrams included in this section together with your full sized system schematic will be helpful in understanding the elements of your KIM-1 module. 3.1 KIM-I SYSTEM DESCRIPTION Figure 3-1 shows a complete block diagram of the KIM-1 system. You should note first the presence of the MCS 6502 Microprocessor Array which acts as the central control element for the system. This unit is an 8 bit microprocessor which communicates with other system elements on three separate buses. First, a 16 bit address bus permits the 6502 to address directly up to 65,536 memory locations in the system. Next, an 8 bit, bidirectional data bus carries data from the 6502 array to any memory location or from any memory location back to the 6502 array. Lastly, a control bus carries various timing and control signals between the 6502 array and other system elements. 21 Associated with the 6502 array is a 1 MHz crystal which opera~es with an oscillator circuit contained on the 6502 array. This crystal control- led oscillator is the basic timing source from which all other system timing signals are derived. In particular, the ~ 2 signal generated by the 6502 array and used either alone, or gated with other control signals, is used as the system time base by all other system elements. The 6502 microprocessor is structured to work in conjunction with various types of memory. In the KIM-1 system, all memory may be consid- ered to be of the Read-only (ROM) or Read/Write (RAM) variety. The ROM portion of the memory provides permanent storage for the operating progams essential to the control of the KIM-1 system. You will note the inclusion of two devices, labelled 6530-002 and 6530-003. Each of these devices include a 1024 byte (8 bits per byte) ROM with different portions of the operating program stored permanently in each ROM. RAM type memory is available at three locations in the system. Again, each of the 6530 arrays include 64 bytes of RAM primarily used for temporary data storage in support of the operating program. In addition, a separate 1024 byte RAM is included in the KIM-1 system and provides memory storage for ·user defined application programs and data. Input/output controls for the system also are included within the 6530 arrays. Each 6530 array provides 15 I/O pins with the microprocessor and operating program defining whether each pin is an input pin or output pin, what data is to appear on the output pins, and reading the data appearing on input pins. The I/O pins provided on the 6530-002 are dedicated to interfacing with specific elements of the KIM-1 system including the keyboard, display, TTY interface circuit, and audio tape interface circuit. The 15 I/O pins on the 6530-003 are brought to a connector and are available for the user to control a specific application. 22 Finally, each 6530 array includes an interval timer capable of counting a specific number of system clocks to generate precise timing gates. The exact time interval is preset under program control. The interval timer on the 6530-003 array is available for a user defined application program and is not required by the operating programs. Figure 3-1 shows a major block labelled Control Logic. Included under this category are an address decoder used for generation of chip select signals for the 6530 arrays and the static RAM. Also included is the logic required to debounce the keys for system reset (RS key) and program stop (ST key). Lastly, special logic is included to allow operation of the system in a "single instruction" mode to facilitate program debugging. Figure 3-1 shows the keyboard/display logic interfacing with the 1/0 pins of the 6530-002. Also shown are the interface circuits for trans- mission of data to and reception of data from the TTY and audio tape units. Figure 3-2 shows the detailed interconnections between the MCS 6502 and the two MCS 6530 arrays. Figure 3-3 shows detailed logic and schematics for the control logic. Figure 3-4 shows a detailed schematic of the static RAM. Figure 3-5 and 3-6 show the detailed schematic of the keyboard and display logic and circuits. Figure 3-7 details the schematic of the TTY interface circuits. Figure 3-8 details the schematic of the audio tape cassette interface circuits. Figures 3-9 and 3-10 provide a summary of all signals available on either the Application connector or the Expansion Connector. The fold-out system schematic shows all of the elements of the system connected together and all signals appearing on the module connectors. You may refer to the Hardware Manual included with your KIM-1 module for additional details on the operating characteristics of the 6502 and 6530 arrays as well as detailed information on system timing. 23 6502 • ... V"[\.. MPU ,,. CONTROL LOGIC ...... A ~ ~ -I\ v I\.. KEYBOARD AND DISPLAY 6530-002 .____ --"' ,/ ~ ... /' rV ~ v V"" 1\,- m (/) ~ <( I "'m0 IS\ co <( 0 m fl) 0 0 :::> llJ TTY INTERFACE ...a::z a.. I IS\ m TTY KYBD I~ _, •c11-.1\ a::~ 0 "V KEYBOARD (/) IO REMOTE,... J: TTY KYBD RTN - 0....0:: ....... u w TTY PTR z z TTY PTR RTN u 0 1ffi a.. z 0 (/) :::> fl) fl) m w a:: 0 0 <( ... <( ,~ AUDIO OUT (HI) • L::> v -v AUDIO TAPE -'\ -v a. a. <( --.. INTERFACE AUDIO IN 6530-003 ~ ,____...., u AUDIO OUT(LO) _ A --!\ /' APPLICATION I/O BUS (15 I/O LINES) v ......_ _a. .....-- -v IK·8 RAM ~ MEMORY "\I --!\ -,/ v '? ·v EXPANSION CONNECTOR KIM-I Block Diagram FIGURE 3.1 24 ....<( --.. .)I "V ..J 2 R(:y UI MPS 6502 3 01 6 NMI 7 SYNC 34 R/W - N ~ V ~ W ~ 00 ~ "',;, ~ "' " "' "' "" "'"" "" 37 = XTAL m Q ~ ~ ! ~ O N ~ ¢ ~ W ~ Im m m m m m m m m m m m m m m m m m m m m m m m ~ < ~ < < < < < ~ ~ < < < ~ ~ ~ ~ c o o o o o a o ~02 0 CONTROL LOGIC 4 IRQ :;; 39 ~~Fr~ i111111j11~11111~l1111111~l N <t .. I'- KG lllllJ > ( IB RS K5 PAI ~ PA2 ABI r-!-L AB2 t-E- AB3 t-'-'---1 AB4 PA3 PA4 PA5 ~ AB5 PA6 i----J!.-.., AB6 ~ AB7 ~ ABB ~ AB9 16 PSI PB2 PB3 P84 ~ DB2 ~ DB3 ~ DB4 ~ D85 ~ i--E--1 DB6 ~ 3 ..... m c 0 m ~ PB5 ~ DB? ~ I 9 P87 0 2 PBO R/W PA7 I 0 10 m c - (/) :::> m 40 39 3B KEYBOARD 37 36 a 35 DISPLAY 24 23 22 21 U2 MPS 6530-002 ~ DBO m 2 RST i---E-1 DB I ~ PAO .--'2-- ABO (/) vcc :::> 19 TAPE 25 TELETYPE 34 T m (/) :::> (/) (/) ..J m w 0:: c c ~ 0 0:: I- c u 18 KS RS 4 ~ ABO z ~ ~ rJ-1--- ABI i---J2- AB2 0 PAO rE- AB3 PA I ~ AB4 PA2 t---".'!- AB5 t---1'---- AB6 t---2--- AB? r-L ABB PA3 PA4 PA5 ..__2___ AB9 ~ DBO r--R- DBI ~ OB? 16 3 9 RST 02 R;W vcc A-3 A-2 37 A-5 36 A-6 A-7 34 A-B PBO 25 PB4 ~ 085 i---£l- OB6 3B A- 4 PA? PB3 ~ DB4 39 A-14 35 P82 t----2-9-- DB3 2 40 PA6 PBI t--2!- DB2 PB5 PB7 U3 MPS 6530-003 24 23 22 21 19 17 A-9 A-10 A-11 A-12 A-13 A-16 A-15 J 0: t~~~~fil~~ ~~i~i~Ufil~filfil~filfilfildtl "' ~ ~ v ~ ~ - 0 ~ ~ ..,' .., ~~~t!;~~~ EXPANSION > "' CONNECTOR Detailed Block Diagram FIGURE 3.2 25 a: 0 I(.) w z ~ (.) z 0 j:: ct ~ ...J a.. a.. ct r l I 0 a 17 IK RAM _.-- RAM- R/W R/W --i= K0 SYNC~-----...-------------------------------~ -lRQ ROY NMI RST --- -- vcc ~ R3 ~ _. . 14 1Jo......___ ~ ,_.§.. ._!.-- u25 055 6 SST- SLIDE SWITCH LOCATED ON KEYBOARD CLOSED= SST 0 FROM U2 PrN 4 RS II U26 0 IC> 5 <D -Rl2 ~ R24 R7 6 >Rl3 _:25 .....__--r<>~ 'l-- 4 ~ 7 j~ ...... •._--111~\------ill~ vcc A R4 ... w..,-. ~---__,,__.__. µ N ~ RI VCC ON _,?> RS KEYS LOCATED KEYBOARD ABIO ~. ..--+--+---ll--1--t--+------------+----------, ABll ..-=-._-+--f---ll--1--+-+------------+--------, ABl2 ~-._--+--+---ll--+--+--+------------t-------, ( Pl N 3 ) 0 I ..=-._-+--f---ll--1--+-+------------. R53 <PIN 31 >xTAL 02 rm--i ~8 a._....-4-4-l~~~+-+----4~T ...--1w---.,Jo, HIP T XI - 12 13 14 15 c: vcc D C B A I.LI ..J ID <l U4 16 ---.,Jr:JV lC C 74LS 145 z I.LI lo1 06 05 04 03 02 01 v v l R/W ... ~!---+--+--+-+-+--+-~--. ?$4 U16 10 U1 5 Ul6 ooh 97654321 ( U151 ~6 < ~ ~ :1; <C a::,~ -vNco,..,!::::: i!. Ji i!. iL .1 .1 > I I.LI EXPANSION ~ I I.LI IN I I.LI I"' N -s;~ ~ ::> I I.LI >I I.LI IC) I I.LI co I I.LI CONNECTOR CONTROL BUS Control and Timing FIGURE 3.3 26 J:LL.LLIQUID I I I I I J. <l <l, <l APPLICATION <l <l .... CONNECTOR 10 D OUT U-5 (6102) D IN 12 9 e -- 14 J II H 13 12 12 14 11 _.... U-6 (6102) J 11 H 4 12 U-7 (6102) 6_...._ 5 14 J 11 H I 12 U-8 ( 6102) 3 ...... 2 14 J II .......... IO 12 U-9 (6102) ......, a ..... 9 13 J II 13 12 1213 U-lO (6102) I~ J 11 H u ~ ..... u '(/) > > u a:: (/) (/) 4 12 U-1.l (6102) 5 13 6 -- J II t--1 R39 I t 12 9 U-12 (6102) 10 13 3 cJ) <( ~ U> ,._ <( <( IC) <O <O <( - 'Ir ~ <( <( <( I'- <O N <( I() & <( - <( ~ U> I .r- ' , , ' Ir ' ADDRESS CONTROL BUS 16~ , ' '' , ' , Ir , J 11 IC) N 3 ..... 2 13 Ir , Ir • Ir , Ir ,. 2 5 6 15 4 ,., ' , ' ,' , , , Ir , S ID 0 BUS 1Kx8 RAM Memory FIGURE 3.4 27 ID 0 N~•IOCOl'­ ID 0 CD 0 CD 0 DATA CD 0 CD 0 BUS CD 0 ::> m ...J ct ~ it PBI ~A PB2 ~B PB3 ~C PB4 ~ 0 ro N u 24 - o <t 0000 ~ ( 74145) U> 0 in 0 0 ,.._ 0 IX> 0 t <JI 0 16 ~4 3 21~1 I---rI~IT.=---7........,..__I----.-Io_____,~________., R41 Q. R42 R43 < R45 R44 vyc : 6 < t ~~ ~~ I. . 1 .. R 19 .I. R 20 R 21 R R 22 23 I ~ /_/ I I~ I I I UIS u 20 lJ 19 I u 21 SG U22 u 23 SA R32 R31 > R30 R29 >R28 > R27 R26 > 3 U26 8 6 10 4 2 ...J ct 12 2 I COL G IN z 0:: PAG ~-+~~~~~~--~~-+~~~+--~~-+-~~--+-~~-+~~~o--~~~--<A-W I Cl. 0:: PAS 1---+~~~~~~~~~-wo--~~+--~~-t--~~-+-~~-+~~~1--~C~O~L-F--'IN"'--IA-IS I- PA4 ~-+~~~~~~~~~~--~--<--~~-+-~_~--+-~~---+~~~o--~C~O~L~E~IN"--'·A- 2 0 ~ w w Cl. PA 3 1---+~~~~~