Corsham Technologies KIM Clone User manual

1
Corsham Technologies, LLC
www.corshamtech.com
617 Stokes Road, Suite 4-299
Medford, NJ 0 055
KIM Clone User Manual
Revision 5 and later Boards
Introduction
Thank you for buying our KIM Clone board, which provides an almost identical look-
and-feel to the original M S Technologies KIM-1 computer.
This board should be very compatible with the original KIM-1 but is not exactly the
same, so there might be a few programs that won’t work on it. However, we’re kept
the hardware very similar and preserved the entry points to all the major
subroutines in the KIM monitor. Some functionality has been removed, such as the
cassette interface, so any code that makes direct calls to cassette storage/retrieval
functions will not work.
Overview
The KIM Clone has a lot of features packed into it while still employing a fairly
standard design with commonly available parts.
•RAM from 0000 to 13FF. The original KIM-1 had only 0000 to 03FF.
•EEPR M from 1800 to 1FFF containing a modified KIM monitor.
•6530-like I/ , timer and RAM like the original KIM.
•RAM from 2000 to DFFF.
•Either RAM or EEPR M from E000 to FFFF.
•Vectors can point to either the original KIM monitor or your own code.
•No cassette interface for program storage.
•The spare 6532 has a header for connection to a Corsham Tech SD Card
System.

2
•The teletype interface is now a USB device that appears as a C M port on a
personal computer.
•Bigger buttons on the keyboard.
•A standard power connector taking 7.5 to 9 volts DC input.
•A power switch.
•Expansion connectors.
Power-on reset.
It’s Out of the Box. Now What?
Let’s make sure a few switches are set to the right positions. These should have all
been set by us when we did final testing, but a quick check is always a good idea.
Before plugging anything in, make sure these switches are set to the proper
position:
•Set S1 (P WER) to FF.
•Set SW2 to KBD.
•Set SW3 (VECT RS) to KIM.
•Set SW4 (SST) to FF.
Plug in the power supply to the AC power and then J1 (8 VDC).
Are you ready? Turn on the Power switch and you should see LED1 (P WER) come
on and the 7 segment displays all come on with a random pattern.
Congratulations! Your KIM Clone is up and running!
Where to Get More KIM Information
Or, where to go from here
There are two reference books you’ll want to get, either via the many sites that host
these documents or acquiring paper copies.
he KIM User Manual
This was one of three books that came with the original KIM-1 and was the most
useful. It contains instructions on how to use the monitor program, how to expand,
etc. There are many copies on-line but some of them are missing pages (as did some
versions of the original paper version). This one is one of my favorites as it has all
the pages and is nicely indexed:

3
http://www.kim-1.com/usrman.htm
he First Book of KIM (otherwise known as FBOK)
The User Manual was great, but lacked any useful programs, so a bunch of early KIM
users gathered dozens of good programs and bundled them as the First Book of KIM.
If you owned a KIM, you owned a FB K.
Again, many copies are on-line, such as:
http://www.classiccmp.org/cini/pdf/Commodore/The%20First%20Book%20of%
20KIM.pdf
Both of these appear on eBay and Amazon, usually at crazy prices, but sometimes
you’ll find them at reasonable prices.
FBOK in the KIM Clone
If you’ve looked through FB K, you might have noticed a couple fun programs that
we put into the KIM Clone EEPR Ms. At address 1800 is Lunar Lander, and at 1803
is Farmer Brown. Read the instructions first, then run them with these sequences of
key strokes:
Lunar Lander
[AD] [1] [8] [0] [0] [G ]
This was always a hit when family came over to visit and see what my computer
could do. Remember that very, very few people had computers back then so being
able to play a game was typically the first experience most people had back then
with a computer they could see and touch.
As Lunar Lander is running, the leftmost four digits are the altitude while the two
right digits are the current speed. The goal is to land with a speed of 5 or less, while
not using all your fuel. You can see your fuel by pressing the F key, then switch back
to altitude with the A key.
My late brother-in-law Glenn used to work on landing with the fewest number of
keystrokes, the ultimate goal being able to land with one or two. I can’t remember
whether he ever achieved his goal, but here is a three-key sequence that works
nicely for me:

4
When the lander hits a speed of 75, press 5. This applies enough thrust to maintain
the current speed. Now just coast down towards the plant’s surface. When the
altitude reaches 1000 (feet? Meters?), press 8. You’ll be dropping fast, but the rate
of descent will slow down. nce your speed reaches 5, press the 5 bottom and just
wait for a safe landing.
Short version:
•When speed reaches 75, press 5.
•When altitude reaches 1000, press 8.
•When speed reaches 5, press 5.
After Glenn passed away, I spent many hours trying to perfect various two-button
solutions, but never got a one button solution that worked reliably. So here it is, but
it requires careful attention when doing the first button press. If the speed reaches
83 then you’ll almost certainly die:
•When speed reaches exactly 82, press 6.
•When speed reaches 5, press 5.
Farmer Brown
This was another favorite of family and friends. When this was loaded into RAM, the
fun part was changing the table of the six animal patterns. Since this version is in
EPR M you can’t do that, but it’s still a fun game. I like running this at vintage
computer shows and demonstrate the “graphics” capabilities of a computer with six
7-segment LEDs (not much) to kids.
[AD] [1] [8] [0] [3] [G ]
Press RS (reset) to end either game.
Using the Y Mode
Back when the KIM-1 was popular, teletypes were the most common terminal, as
they were readily available used for a decent price. A lot has changed in 40 years.
Now we use our PCs/Macs/whatever and run a terminal emulator.
The KIM Clone has a type B USB connector on the back edge. When this is plugged
into your PC, it might take a minute for the proper device driver to be loaded, but
you should get a new C M port corresponding to your KIM.

5
Suggested parameters are:
•2400 baud
•8 bits
•No parity
•Two stop bits
Set S2 to TTY, press RS (reset), then hit ENTER/RETURN on your keyboard and the
KIM Clone should respond with a prompt like KIM Clone v1.0. Please reference the
KIM User Manual for what to do at this point.
Known Issues
Despite our best efforts, there are some issues you should be aware of.
Rev 3 and older boards did not have expansion capability.
Some rev 1B boards do not support single step properly. All boards shipped since
12/3/2017 have a modification done to allow single step to work properly. For
those with a rev 1B board who want to see if their board has been modified or not,
look on the bottom of the board to see if there is a .001 uf capacitor between pins 7
and 8. If the capacitor is present, then the board supports single step.
For the 6502 in single step mode, it single steps everywhere except in the monitor
EPR M, so any calls to functions in the extended monitor also single step.
While using single step, the NMI line is driven directly and is not using an open
collector. Ie, single step and an external NMI won’t work together.
Changes between Revision 2 and Revision 3 Boards
Revision 3 boards had a number of minor changes to fix know issues on Revision 2
boards. No new features or capabilities were added.
•IC19 was removed
•IC18 changed from 74AVC1T45 to 74LVC1T45
•IC16 changed to 74LS00
•IC7 and IC8 changed to 74LS145
•R37 and R38 changed to 470 ohms
•C18 was added
•IC17 had power routing fixed

6
Changes between Revision 3 and Revision 4 Boards
•Addition of expansion connectors
•Removal of reverse current protection diode
•Reset circuit was replaced by a single part which also does power-on reset
•Larger circuit board with many parts moved around
Connectors and Switches
There aren’t a whole lot of switches and connectors, but the few deserve some
explanation.
J1 – POWER
This is the power input jack. This feeds the 5 volt regulator so while supplies as
high as 12 volts could be used, we really recommend 7.5 to 9 volts maximum so as
not to overheat the regulator. The center pin is positive, outer sleeve is negative.
There is a diode to protect the board from incorrect polarity.
S1 – Power
This is the main power on/off switch. No further explanation is necessary. Note
that the USB interface chip derives power from the main PC, so the power switch
does not turn off the USB interface.
SW2
This selects the input/output device. Normal KIM mode is to have it in the KBD
position which means the LEDs and the keyboard are the “console” for the KIM.
This is the normal mode for a KIM-1.
When the switch is set to TTY then the monitor will use the external terminal (USB)
as the console. Remember when you first choose TTY that you’ll need to press RS
(the red button) and then hit RETURN on your terminal so the monitor can measure
the baud rate. Typically baud rates of 4800 or less work best.
SW3 – VEC ORS
The 6502 has three interrupt vectors: RESET, NMI and IRQ. n the KIM they all
default to pointing to code in the KIM monitor, but our board allows you to use
vectors in the KIM EPR M or the expansion EEPR M.
This switch is normally set to the KIM position.

7
SW1 – SS
This enables the single-step option for the 6502 processor, but it requires a
capacitor be added to the bottom side of the board on U16 between pins 7 and 8.
Please reference the KIM User Manual for details.
JP1
This selects whether E000-FFFF are connected to RAM or EEPR M. If you wish to
use the extended KIM monitor in the Expansion EEPR M socket, this must be set to
the EEPR M position.
JP2 – AUX IRQ
Installing this jumper connects the interrupt line from IC9 to IRQ. This is normally
not installed.
JP3 – MAIN IRQ
Installing this jumper connects the interrupt line from IC9 to IRQ. This is normally
not installed.
JP4 – 6502
If you are using a 6502 processor then this must be installed. If you are using a
65C02, this must be removed. If installed, pin 1 of IC1 (the processor) is grounded.
SV1
This connector is used to access the I/ pins on the 6532 chip at IC9. It is meant to
be used along with our SD Card System to provide mass storage for the KIM Clone,
but can also be used for general purpose I/ . Be aware, though, that there is no
buffering between these pins and the 6532 pins so care must be taken not to draw
too much power or exceed 5 volts on these pins.
Pin 1 and 2 can be located from this photo of the board; the pin numbers are no
longer visible once the connector is installed:

8
All of the even numbered pins are on row closest to the top edge of the circuit board
while all the odd numbered pins are on the other row.
Pin Use Pin Use
1 PA0 2 PB0
3 PA1 4 PB1
5 PA2 6 PB2
7 PA3 8 PB3
9 PA4 10 PB4
11 PA5 12 PB5
13 PA6
15 PA7
17 PB6 18 PB7
23 +8 volts 24 +8 volts
25 Ground 26 Ground
Any pins not in the chart above are not connected to any signals on the KIM Clone
board. The +8 supply lines are most likely 8 volts, but whatever power level is
applied to J1 and then run through the 1N4001 diode at D2. While we haven’t rated
exactly how much power can be drawn from these pins, it is meant to be enough to
power a typical microcontroller such as an Arduino.
The pin usage might seem odd but they were arranged this way to agree with the SD
Card System, which was based on pin mappings used on the Corsham Technologies
SS-30 parallel card.
JP5 – 8K ENABLE
These jumpers control whether an address in that particular 8K address space will
be mapped to the on-board RAM The four jumpers and their corresponding address
rages are:

9
Label Address Range
K1 0400-07FF
K2 0800-0BFF
K3 0C00-0FFF
K4 1000-13FF
JP6 – 1K ENABLE
These jumpers are normally installed. They control whether an address in that
particular address space will be mapped to the on-board RAM The four jumpers
and their corresponding address rages are:
Label/Address Range Normally Installed
0000-1FFF No
2000-3FFF Yes
4000-5FFF Yes
6000-7FFF Yes
8000-9FFF Yes
A000-BFFF Yes
C000-DFFF Yes
E000-FFFF Yes
Addresses 000-1FFF are part of the KIM’s lower 8K which are always mapped to on-
board RAM, R M, timers and I/ devices. Putting in the jumper for 0000-1FFF will
cause a lot of confusion as multiple devices will respond to the same address.
Addresses E000-FFFF are also affected by JP1, so if the jumper is installed for that
block, then JP1 determines if the space is mapped to RAM or EEPR M.
Expansion Connectors
The primary improvement in the Rev 4 design is the addition of many bus signals on
two edge connectors to make it possible to add custom designed add-on boards.
Please note that none of the signals are buffered so it is highly recommended that
any external board provide its own buffer so as not to load down the bus too much.
Any pin marked as reserved is not connected to any signals on the KIM Clone, but
are meant for specific uses on motherboards. Please do not use them for custom
boards.

10
Both connectors are female on the KIM Clone. EXPA has 30 connections while EXPB
has 40. The connectors are standard 2x15 or 2x20 pins with .1” (2.54mm) spacing
between pins.
EXPA is located above EXPB. The lower pins on EXPB (39 and 40) are centered 1.5”
from the bottom edge of the board. The top pins (1 and 2) are located 3.4” from the
bottom of the board. EXPA pins 29 and 30 are located 4.4” from the bottom of the
board, and pins 1 and 2 are 5.8” from the bottom. These distances will remain the
same in future versions unless there is major problem that requires changes.
EXPA Connector
Pin KIM Clone Use
1 & 2 Ground
3 & 4 +8 VDC
5 & 6 Reserved Reserved for +5 on motherboards
7 /RESET 6502 RESET line, active low
8 PH2 6502 phase 2 clock
9 PH0 6502 phase 0 clock
10 S 6502 S signal
11 R/W High = read, low = write
12 PH1 6502 phase 1 clock
13 /RDY
14 /IRQ
15 SYNC
16 /NMI
17 /RAM_SELECT Pull low to select RAM on KIM Clone, or pulled
low when KIM Clone RAM is
selected.
18 Reserved Reserved for motherboard use.
19 & 20 Reserved
21 – 30 Not used User-defined functionality
EXPB Connector
Pin KIM Clone Use
1 & 2 Ground
3 A15
4 A14
5 A13
6 A12
7 A11

11
8 A10
9 A9
10 A8
11 A7
12 A6
13 A5
14 A4
15 A3
16 A2
17 A1
18 A0
19 Reserved
20 Reserved
21 Reserved
22 Reserved
23 Reserved
24 Reserved
25 D7
26 /0000-1FFF
27 D6
28 /2000-3FFF
29 D5
30 /4000-5FFF
31 D4
32 /6000-7FFF
33 D3
34 /8000-9FFF
35 D2
36 /A000-BFFF
37 D1
38 /C000-DFFF
39 D0
40 /E000-FFFF
6502 Vectors
If you’ve selected to use EEPR M in the top 8K, you have two options for the 6502’s
interrupt vectors. The interrupt vectors are at FFFA to FFFF, and normal operation
would have the vectors fetched from the lower EEPR M, acting as the original KIM-
1 did. However, our board allows you to use the vectors in the top of the high
EEPR M so you can have your own interrupt code.

12
Using switch SW3, labeled as VECT RS, selects whether to retrieve vectors from the
lower EEPR M by selecting KIM, or from the upper EPR M by selecting R M.
You might be asking yourself why does the last block stop at FFF7 instead of FFFF?
Because this board maps the three 6502 IRQ, NMI and RESET vectors back to the
lower EEPR M, preserving normal operation of the KIM-1. There is a complete
discussion of this in the KIM-1 User Manual, section 6.2 “Interrupt Vector
Management.”
Monitor Entry Points
We’ve kept all of the primary KIM-1 entry points but here is the official list of which
ones are present in our modified KIM monitor:
Address Name Description
1C4F START
1C77 TTYKB
1CD3 STEP
1DC2 RTRN
1DDB SCAN
1E1E PRTPNT
1E2F CRLF Print a CR/LF on the TTY.
1E3B PRTBYT Print value in A as two hex digits to TTY.
1E5A GETCH Get one character from TTY, return in A.
1E9E UTSP Print one space to TTY.
1EA0 UTCH Print character in A to TTY.
1F19 SCAND
1F40 Not named Used by Farmer Brown, First Book of KIM
1F63 INCPT Increment P INTL and P INTH
1F6A GETKEY
1F91 CHK Add A to the checksum.
1F9D GETBYT Get two hex digits.
1FAC PACK
We are definitely open to user input, so if there is a subroutine in the original KIM-1
monitor that you feel is necessary to keep, just let us know. I’ve got a macro in the
source code to make sure certain pieces of code are exactly where they should be, so
adding a new “must not move” point is easy… just let me know where it is.

13
For Dave
Who’s Dave? Dave McWherter, who was an amazing 6502 programmer who got
started on personal computers with a KIM-1 computer. Dave went on to become VP
of Engineering at Franklin Computer, designed several processors for Franklin
Electronic Publishers, earned a number of patents, did the impossible on many
occasions, and was a great inspiration for anyone who had the pleasure to work
with him.
The story goes that Dave was a plumber’s apprentice and his boss bought an HP
programmable calculator that he became fascinated with. Dave bought a KIM-1 and
started learning assembly language at night while caring for his family. He found his
way to Delta Data Systems, clearly demonstrated an uncanny knack for assembly
language programming and eventually was hired as the VP of Engineering at a
young Franklin Computer Corporation, where he hired a 19 year old local 6502
programmer to join his staff (me). If you dig around the web you’ll find lots of
references to Dave in the lawsuit between Apple Computer and Franklin Computer.
Dave was completely outside the box all the time. There was no program that
couldn’t be improved and he’d tinker with working programs, sometimes coming
back after a weekend saying he re-wrote the program to run several times faster,
used half the memory, or now had a new feature nobody ever realized was needed
but would soon become commonly used.
Dave astounded us almost constantly. Not liking the crude 6502 assemblers of the
day, he wrote a better macro assembler that included a linker so that common
routines could be written once and then linked in as needed. ver a weekend he
wrote a complete editor that was faster, smaller and better suited to our job than
anything else on the market. Even more amazing, he wrote all of these tools on an
Atari 800 (also a 6502 based machine) and then ported them back to the Franklin
system by use of a standard I/ library he developed.
Unfortunately, Dave passed away in 2015, leaving behind a lot of amazing code,
outstanding development tools, and a lot of friends.
Bob Applegate
August 2017

14
Revision History
Version
Changes
1, 1A Internal engineering versions.
1B First release.
2 Renamed version 1B
3 Many minor improvements such as fixing noisy power issues.
4 Larger board better reset circuit, expansion connectors
Errata
None.
Parts List (definitely not done yet)
N T UPDATED F R REV 4 or 5 B ARDS YET!!!
Note that all capacitors are .1” (2.54mm) pin spacing.
All resistors are ¼ or 1/8 watt.
Part Number Description
PCB 1 Printed Circuit Board (Corsham Tech)
IC1 1 6502 or 65C02 processor
IC2 1 628128-7 128K static RAM
IC3, IC9 2 6532
IC4 1 FT232RL USB interface
IC5 1 28C64 EEPR M or 27C64 EPR M
IC6 1 28C16 EEPR M of 27C16 EPR M
IC7, IC8, IC10 3 74LS145
IC11 1 74133
IC12, IC13 2 74LS06
IC14 1 LM556
IC15 1 74LS138
IC16 1 74LS00
IC17 1 74LS08
IC18 1 SN74LVC1T45DBVT

15
1 Power jack CUI Inc PJ-102A, Digikey CP-102A
Q1-Q6 6 2N4403
LED1 1 5mm blue LED
LED2-LED7 6 LTS-4802 seven segment LED, Digikey 160-1527-5
LED8, LED9 2 3mm blue LED
VR1 1 LM78S05 positive 5v regulator
Misc. Heat sink and hardware for VR1
D1 1 EGP20A
D2 1 1N4001
SC1 1 1 MHz oscillator
SV1 1 26 pin socket
JP1 1 3 pin header
JP2, JP3, JP4 3 2 pin header
SW1-3 3 1 position DIP switch
S1 1 Toggle switch, Digikey EG2362
S2-S24 23 MR N B3F-4050, Digikey SW413
C1 1 22uf, 25v electrolytic cap
C2, C3, C7 1 uf disc capacitor
C4, C8-C17 11 .1 uf disc cap
C5, C6 2 .22 uf cap
C18 1 .001uf cap
R1, R8-R13,
R30-R31
9 1K
R14-R19 6 220
R2-R7, R20-
R22, R34-R35,
R39
13 3.3K
R23-R29 7 130 ohms (can be higher value)
R32, R33 2 47K ohm
R37, R38 2 470
1 mron B32-1280 red keycap
6 mron B32-1240 blue keycap
16 mron B32-1210 black keycap
7 Rubber stick-on feet
Notes:
IC6 can also be a 27C32/28C32 device. Put the monitor in the top 2K.
Table of contents
Popular Computer Hardware manuals by other brands

evertz
evertz EMX Series user manual

Radica Games
Radica Games DAVID-II 716 Operating and maintenance instruction manual

Texas Instruments
Texas Instruments TMS320C642x DSP user guide

Texas Instruments
Texas Instruments DAC8803/14 EVM user guide

Phanteks
Phanteks GLACIER G3090Ti ASUS BACKPLATE installation guide

Daikin
Daikin DCC Series installation instructions

Cypress Semiconductor
Cypress Semiconductor CY7C1399B Specification sheet

Cytron Technologies
Cytron Technologies SHIELD-LIPO user manual

Alphacool
Alphacool Cool Answer manual

Sandberg
Sandberg 133-74 user guide

Thermo King
Thermo King Smart Reefer 3 user manual

Velleman-Kit
Velleman-Kit K5201 Illustrated assembly manual