• Please review our updated Terms and Rules here

KIM-1 getting stuck in loop

TheSmJ

Member
Joined
Dec 11, 2007
Messages
14
I revived my dad's old KIM-1 and after looking through the manuals, a spare edge connector and finding the necessary 5V 2A wall wart laying around I got the thing powered up.

Following the KIM-1 manual I enter the "add two numbers" program, move to the start position and hit "GO", and the KIM locks up. I try entering the program a couple more times thinking I just mistyped it somewhere, and even my dad tried entering it in himself and we get the same lock up. Watching it in step by step mode it seems to lock up at memory address 00015 (as I can remember, I'll double check in a little while) and it refuses to go any further.

Other applications I've tried typing in lock up the machine as well - the display just goes blank after hitting GO.

Any ideas? I thought about going through the ROM and checking for corruption, but if that was the case I doubt I would have gotten as far as entering the code in the first place.

My money is on the memory being at fault. I found a box of those chips laying around I could use if that was the case.
 
That would be my considered opinion as well.

Change them one at a time (if they are socketed, this is MUCH easier) and run the program after each chip change. The one that it works after changing is the bad one.

If they aren't socketed, try touching each chip in turn and see if one is hotter that the rest (Caution: it might be VERY much hotter, but, the chip logo it'll brand into your finger will fade in time :) )
 
Just tried messing with it again and it seems to be acting irregularly. Now it's just looping between postion 0005 and 0019 (0019 is never entered into the program). Before that the display would even blank out even during step by step mode.

The more I think about it the more it seems to confirm to be a RAM related issue. Problem is the chips are not socketed, the spare RAM chips I do have are 30 years old, and have no way to test them to see if they work in the first place.

My soldering skills are pretty good (if I do say so myself ;P ) and I should have no trouble replacing the troubled chips. What I'm worried about is weather or not I should trust the spares.

EDIT:

Is the 2102 RAM chip totally pin compatible with the 6102?

Is there a way to see which addresses are associated to which RAM chip?

What are the chances of the RAM on the 6530 ICs being at fault?
 
Last edited:
What are the chances of the RAM on the 6530 ICs being at fault?

I don't wanna trigger a panic, but FYI: the 6530s on one of my two KIMs died. So yes, there *is* a chance they can fail.

The KIM worked flawlessly for one day when I received it, then died. The symptoms you mention (display blanks) sound familiar, since one of the 6530s scans the display and keypad. On mine the display dies immediately, with segments failing one by one. I sincerely hope this is not the case with yours, as the 6530s are impossible to replace.

Good luck!

--Roland
 
The problem is, that IIRC they use 1 bit each from a byte, so it requires 8 chips to complete a set of 1K. Look for the data sheets to compare the differences, I can't recall what the difference. Mos/Commodore loved soldering the chips directly onto the board making replacement difficult.

Try running this clock program below, it is a clock, hour is at 60, min at 61 and seconds at 62. Start it at 200. Let me know what happens.

Vince

0200 A2
0201 EA
0202 CA
0203 A5
0204 60
0205 85
0206 Fb
0207 A5
0208 61
0209 85
020A FA
020b A5
020C 62
020d 85
020E F9
020F 86
0210 63
0211 84
0212 64
0213 20
0214 1F
0215 1F
0216 A6
0217 63
0218 A4
0219 64
021A E0
021b 00
021C d0
021d E4
021E F8
021F 38
0220 A9
0221 00
0222 65
0223 62
0224 85
0225 62
0226 d8
0227 C9
0228 60
0229 d0
022A d5
022b F8
022C 38
022d A9
022E 00
022F 85
0230 62
0231 65
0232 61
0233 85
0234 61
0235 d8
0236 C9
0237 60
0238 d0
0239 C6
023A F8
023b 38
023C A9
023d 00
023E 85
023F 62
0240 85
0241 61
0242 65
0243 60
0244 85
0245 60
0246 d8
0247 C9
0248 13
0249 d0
024a b5
024b A9
024C 01
024d 85
024E 60
024F C9
0250 01
0251 F0
0252 AD
0253 20
0254 5C
0255 18
 
Seems to work great. The hours, minutes and seconds count correctly.

One thing I noticed is the clock only starts when the single step switch is to the right (not below the "ON"), and when its on the left the screen goes black after hitting GO. My dad says before he put it away he was planning on cleaning the keypad because of debouncing issues... perhaps thats part of the problem.
 
Hi,
You may want to consider a different power supply as well. Those 5v wall wart type rarely have decent regulation and can cause problems. An old ATX power supply can be easily rigged to provide a good quality 5v. Maybe it is not the only problem but certainly it will appreciate better quality Vcc.

Best of luck! Thanks!

Andrew Lynch
 
KIM-1's are known for keybounce issues. Glad the clock program is working, this tells me it is not a 6530 issue.

Vince
 
Thanks!

Out of curiosity, how are you able to tell the chips are working based on this program?
 
Well, The 2nd 6530 is only used for ROM and any extra I/O the user adds to the KIM, so it isn't fully tested. The 1st 6530 handles the keyboard and display. Now, the chip is mostly an I/O chip and the output port is working good with the clock. The keyboard does use a 8 bit port that the display doesn't, but I think if I read correctly, the keys work with just keybounce.

So, you have the ROM working in the 6530 because it boots and runs code and the display works. There is a program out there I'd have to dig up that tests the memory for you, this might be something to check.

When the switch is ON, it is in single-step mode, which is correct. To use single step on the KIM program these 2 addresses:

17FA: 00
17FB: 1C
17FE: 00
17FF: 1C

This sets the vectors so you can use single step when you hit GO. You can then, step through the program.

Also, I agree, dump the wall wart. Grab a PC AT power supply and use that as a cheap bench supply. You can use ATX but you have to jumper two wires and add a switch.

Vince
 
As for the keybounce, you might wanna check the 556 timer IC's outputs. My other (working) KIM doesn't respond to RS, and I have to replace the 556. Currently the only way to bring it to life is to touch the RST line to GND. Maybe the 556 in your KIM leaves NMI asserted (low) in single stepping mode?

--Roland
 
Well, the 556 is only used for single-step button and reset so if there are problems with any of the other keys, it is keybounce.

Vince
 
Yeah I got a few of those old ATX supplies around too... the wattage is way too low on them now to be useful for anything else.

So you have to set those vectors every time you want to single step a program? Odd.
 
Yes, everytime. Only a pain if you plan on doing singlestep. The best hidden feature most people don't realize is on the KIM-1 is a TTY interface which can be made into a serial port with a simple circuit. With this serial port you can dump programs into the KIM-1. With the paper tape load and store feature in the KIM monitor, you can treat your PC like a paper tape machine! I added this circuit to the Micro-KIM when I designed it. There are a lot of programs out there for those with more memory. With the paper tape load and store feature in the KIM monitor, you can treat your PC like a paper tape machine! I thought about doing an add-on board for the KIM that gives you 32K RAM, serial port, cassette interface connectors but I just don't have time right now.

Vince
 
Ohh! Where can I find the circuit which makes the KIM serillal accessable? What software do you reccomend using on the PC's end to perform the functions it needs (the one built this decade, not 1977)?
 
Go to 6502.org here:

http://6502.org/documents/publications/6502notes/

The first user note 0 last page has the circuit you need. If your circuit doesn't have -5V, then use GND it works!

Run a cable to your PC (core 2 due windows XP pro will work great), any PC with hyper terminal.

Start hyper terminal, connect at 2400 baud, 8 bit, 2 stop bits, no parity, no flow control. Fire up the KIM-1, hit RS on the KIM, then on the PC hit enter. This is the way the KIM does a autobaud detect. You should see "KIM 1" on the display. Read the KIM-1 manual (available on 6502.org) for how to use the monitor.

Now, here is the FUN part. You can use the paper-tape feature to load and store programs. In hyper terminal you have the option to send a text file. Well, paper tape listing can be stored as text files. Users of the Micro-KIM already enjoy this feature. Sorry, had to throw in a cheap plug for my board. Really unlease the power of the KIM-1 with this RS232 circuit!

Vince
 
Quick question about that RS232 adapter circuit: It uses both one NPN and one PNP transistor, correct? The one closest to the bottom LOOKS like a PNP, but its been a few years since I've done anything with analog circuits.
 
Yes it is a PNP

looking at the circuit, the driver inverts it twice, which isn't right for rs232, unless the output is already inverted. (???) I've a feeling the 7404 is wrong
 
Last edited:
Yes it is a PNP

looking at the circuit, the driver inverts it twice, which isn't right for rs232, unless the output is already inverted. (???) I've a feeling the 7404 is wrong

PNP is arrow pointing inward, we used to say, peeing in the pot or Not Peeing in the Pot (arrow facing out).

Not sure what you mean by the 7404, there is one inversion required to get the bit in the proper orientation. On the Micro-KIM I used a NAND gate with both inputs tied together to make an inverter. Same circuit listed.

Vince
 
Not sure what you mean by the 7404, there is one inversion required to get the bit in the proper orientation.
Vince

The 7404 inverts the signal, the PNP transistor then inverts the signal again, meaning the signal ends up true.
Unless there's another inverter on the Kim1 (or the software generates inverted rs232) then it will end up the wrong way up for rs232 (-ve logic)

It's a bit odd because the receive circuit only inverts once.
 
Back
Top