Page 1 of 1

K1000uC – A Hobby Project

PostPosted: Dec Mon 31, 2012 10:14 am
by no0207
Part1: History

Once upon a time in Eastern Germany... there was a company named Robotron. In that country they were kind of a monopolist – the almost only company making everything in the range from pocket calculators to mainframe computers. From mid 70's they started activities into the new field of microprocessors. The first attempt was of limited success. It was a fully pin-compatible replication of the Intel 8008 processor named U808. It soon turned out that building systems around this microprocessor required a fortune of additional hardware. The results were 'hardware monsters'. But even some of them were still impressive – for instance a ticket machine for train stations where you could choose and purchase a train ticket interactively – that was pure ScienceFiction at the time! – and these ticket machines remained in practical operation for a number of years.
Another cool application of the U808 processor was the K1000 desktop calculator family – the main subject of this thread.
Robotron had inherited some of the traditional German manufacturers of high quality electro-mechanical devices such as Rheinmetall-Borsig Sömmerda. They used the U808 still for a number of years as basis for their accounting machines.
For practical reasons the U808 had a short livetime. Quickly the decision makers at Robotron had realized the Intel 8008 was not a good choice – and they switched to a replication of the Zilog Z80 processor which they called the U880. From today's perspective that was a really wise decision. The Z80 was not just a microprocessor but there was an entire family of highly integrated peripheral chips that allowed to design computer systems around that microprocessor with much less generic hardware. Guess I do not have to tell you guys much about the advantages of the Z80 architecture ;)

Re: K1000uC – A Hobby Project

PostPosted: Dec Mon 31, 2012 1:35 pm
by no0207
Part2: Robotron K1000

The Robotron K1000 was a Family of Desk Calculators built around the Robotron U808 microprocessor (Intel U8008). Atttibuted as „Kleinstcomputer“ (tiny computer) they actually weighted about 45 lbs and had dimensions of 23x17x7 inches. The weight came mainly from the cast aluminium chasis and the power supply unit.
The device has an impressive look - somewhat like a war tank. Its other main attributes: it is a terribly slow calculator, but it features high precision numerics.
The K1000 family actually consisted of the members:
K1001 – programmable desk calculator
K1002 – programmable desk calculator with magnet card reader
K1003 – programmable desk calculator with magnet card reader and thermo printer

The K1000's closest relative is probably the HP-9810, but the K1000 is by no means a clone of it or of anything else. It features a maximum of either 3992 program steps or 242 data registers – 8 program steps can be negotiated for one data register. It has some advanced capabilites such as indirect memory adressing, symbolic labels, alphanumeric printing.
Because of their numeric accuracy the K1000 calculators were fairly popular at Engineering Companies or Engineering Departments of bigger Companies.

Re: K1000uC – A Hobby Project

PostPosted: Jan Tue 01, 2013 3:19 pm
by no0207
Part3: First Contact

In 1984 I started studying Chemical Engineering. Already in the first semester we had a course called „Information Technology“. At that time the university was not very well equipped with computer hardware. So it came that besides learning the basics of theory we were exposed to an at the time fairly outdated type of computer for practical exercises: the K1000. For me it was still very very amazing! This was my first contact with programmable machines at all. And in addition my first contact with the Reverse Polish Notation. It was exciting developing a solution for a certain problem and then give it a try on the machine – things almost never functioned as expected at the first attempt! One of the more complex tasks we had to resolve for an exercise was to set up a program to calculate the day of the week for a given date, based on the rules of the Gregorian calendar. I still remember very well how we put ourselves under pressure within the group of students just to be the first one to come up with a working solution. The mean thing here was these „quick and dirty“ program drafts were almost never entirely correct - and the K1000 did not have a feature to insert additional code. If some instructions were missing in the middle of an already entered program, you either had to re-enter the program from that position on or do some ugly things such as jumping forth and back using GOTO instructions. I think even these failures were a good learning experience.
After some months we were taken away from the K1000s and exposed to more modern computers: CP/M, mainframes, even IBM compatible PCs. For a while the K1000 sunk into the waters of forgetfulness...

Roughly 13 years later, around 1997: In the meantime I worked at an Engineering department of a chemical company. Pentium compters were state-of-the-art then. One day a colleague had to design a restriction orifice for a certain pressure drop (fluid flow problem). At the time we had no commercial software for this particular problem, so he would had have to go for some fluid flow textbooks to find out how to calculate that. But then an elder colleague came up with a K1003 still sitting somewhere on a cabinet and magnet card with a 'ready to use' calculation program for this particular problem. I was very much impressed!
Two years later, that colleage had retired in the meantime, they were going to scrap the K1003 box and I could literally last minute save it.

Re: K1000uC – A Hobby Project

PostPosted: Jan Wed 02, 2013 4:12 am
by no0207
Part4: Simulation

In the summer of 1999 that K1003 was sitting on my desk at home – just beside my PC. At the time I was excited about Visual Basic with its easy way of clicking together a GUI for your own programs that made them almost look like a professional software. No big surprise – sooner or later I had the idea to start a project in VB which should look and behave like a K1003 – as far as that was possible. The GUI for that was quickly constructed, then I sat for days playing with the real K1003, studying its behavior and trying to code an equivalent in VB. Finally I came up with something that worked. However – somehow it did not feel „right“. At the time I already thought it would be really cool to extract the firmware out of the K1003 and write a program around it that executes that code in its original form. But reading out the ROMs of that beast was far beyond my capabilities. I had always been a „software guy“ – no experience with hardware at all :(
Somewhat later the K1003 went on a shelf in my basement. My VB simulation program of it got lost over time, which I do not regret very much – it was a nice experiment but beside of that not really memorable.

Re: K1000uC – A Hobby Project

PostPosted: Jan Wed 02, 2013 5:22 am
by no0207
Part5: Emulation

Many years later. In the meantime someone else – who can be attributed a real „hardcore repairer“ had drawn another K1003 in a hopeless state out of a scrap box. This guy managed to repair it! It is one of his hobbies to repair hopelessly damaged computers. Amongst other issues the ROM contents of that K1003 suffered from partial Alzheimer, so he and some other guys from the „robotron scene“ identified another working ROM board, extracted the contents and burned new EPROMs for replacement – these are 256 Byte Eproms of the type 1702A (!)
As side product from that activity the ROM image of the K1003 was now available. Another guy, who is an „old pro“ with assembler stuff, disassembled the code from that image later on – and even more importantly – commented some pieces of the code, in particular some of the I/O hooks which are weird stuff!
Early Summer 2011. In the meantime I had got ahold of a copy of the mentioned ROM image and the disassembled listing. Somehow I then had the idea to set up an Excel sheet with some VBA code as playground for executing and testing i8008 machine code. After one weekend that tool was ready and I could play with some bits and bytes. It took some more time to build a K1003 emulation on top of it, but I finally made it. Most challenging part was to hook up the I/O for keyboard and display. This Excel based K1003 emulation finally worked. However I would name it a „proof of concept study“. The shapes based display consumes a lot computing power, so in the end the entire thing is terribly slow. Also the „user interface“ was everything else but nice. At the time I considered learning Java to program a nicer emulator, something of the quality of Achim Buerger's GO9800. But then things unexpectedly developed in a different direction. Someone in a forum had commented: „It would be cool to implement that on an AVR!“. I had no idea what the guy was talking about – AVR, what the hell is that? After some googling I was soon infected by the Atmel virus...

Re: K1000uC – A Hobby Project

PostPosted: Jan Thu 03, 2013 10:31 am
by no0207
Part6: Infected by the Atmel virus

I had always thought electronics was a very complex subject with a problematic learning curve. So I stayed away from it all of my life. Another reason to stay away from it: no soldering skills, and noone among my friends and relatives to ask for hints and tricks or simply how to do certain things. Short after the mentioning of the magic word AVR things should change though. I googled a lot, soon found out AVR denotes a family of microcontrollers from the vendor atmel. Although „microcontroller“ is an everyday word, until then the concept had not been clear to me at all. I ran into tons of tutorials, quickly realized how terribly simple it would be to put together what is considered the „Hello World“ in the field of microcontrollers – all the pieces of hardware I would need were a battery, an atmel, a resistor and a LED. I was really amazed!!!
It was coincidence that very recently I had freshened up my skills with the C programming language. Very soon I discovered I could build my experiments on breadboards – no soldering skills required to achieve results!
For a short while I experimented with blinking LEDs, put together a clock with a four digit number display and alarm function and things like that on atmel basis. Soon my thinking came back to the original plan of replicating a K1000 calculator. The attached sketch reflects my first, somewhat naive plan how to achieve that. One powerful atmel would represent the Central Processing Unit, some other, less powerful atmels could handle the keyboard and display. They all would communicate via I2C, or TWI in atmel terminology.

Re: K1000uC – A Hobby Project

PostPosted: Jan Thu 03, 2013 11:07 am
by no0207
Part7: First Part for the First Prototype

I then played a bit with 3 atmel controllers sitting on a breadboard, connected via I2C bus. One controller, dedicated as „master“ sent commands to the others to make them switch LEDs, display numbers or check if a button had been pressed in the meantime. That all worked out surprisingly smooth, in most cases things functioned as expected at the very first attempt. So in early September 2011 I started wiring the first part for my very own K1000: one half of its 16 digit display. The attached photo shows that part. It is basically an Atmega8 which serves an 8 digit multiplexed display and listens on the I2C bus for contents to display.

Re: K1000uC – A Hobby Project

PostPosted: Jan Thu 03, 2013 3:18 pm
by no0207
Part8: Microcontrollers – the world of unkept promises

It was only a question of days to complete a board with the other half of the display and to add the „master“ microcontroller that would serve as CPU. Very quickly I had a piece of hardware as shown on the attached photo. However it would not yet display the number Pi as on that photo, because it still was a brain-dead machine! Putting together the hardware was one thing. But vitalizing it with an appropriate software was yet another story. At this point I got a practical insight to one basic issue with modern consumer electronics. It is terribly easy to put together some pieces of electronics that can do a job in principle. But writing a quality firmware requires time and effort. Now I understood much better why my cheap DVD player had such a lousy user interface. Or why an extention module for my good old C64 – a semi-hobbyist project with very promising hardware – ended as desaster because the developer had lost interest in further development of the software long before it was finished.
Had to wait some more weeks for my vacation days in fall 2011: plenty of time to rewrite the 8008 emu in C and to implement and test all those funny K1000 I/O hooks. Development and testing of the software took much more time than construction of the hardware. The C language also gave me some hard times. One of the funny stories: it took me quite some time to find a certain bug in the program: when you take an unsigned integer variable which has the value of 0, and you subtract 1, even then the result is not smaller than 0! This reads trivial, but at the time of debugging it was everything else than that.
After two weeks my atmel based K1000 was more or less functional. But as can be seen on the picture I only had two buttons, so for the time I „simulated“ keyboard entries by connecting the wires of a button with different keyrow/keycol pins of the atmel step by step. It became clear at this point that construction or identification of a suitable keyboard would be a challenge or could in the worst case even be the show stopper for my project.

Re: K1000uC – A Hobby Project

PostPosted: Jan Fri 04, 2013 5:35 am
by no0207
Part9: Keyboard

At that time I envisioned constructing a very ugly keyboard from single buttons as you can order them from part suppliers. I would do it „as good as can“ but the result still would be ugly. In the end I would hate my project result just because of the ugly do-it-yourself keyboard. I was not happy with that perspective at all.
Around that time I developed an increasing interest in the cash point systems at supermarkets. Very soon I realized – what they have there is almost what I would need! Hope I did not irritate the cashiers too much when looking at their systems so very fascinated. I realized some cash point systems were unsuitable, others were more or less configurable. But I had no idea where to purchase a suitable system at an affordable price. Here in Germany companies with commercial customers typically do not sell items to private persons because there are some sick tax restrictions in place :(
Then a friend advised me to search for the keyword POS (point of sale) at ebay. It was a case of very lucky coincidence when I ran into the Wincor-Nixdorf TA85 keyboard. After all it turned out the TA85 was an almost perfect choice for my project. It is a 7x12 key matrix, most keys have a removable plexi glas cap, you can put your own labels into the keys easily. Second hand this keyboard is available at ebay for around 17 Euro. Typically these used keyboards are full of dirt, but with some experience it is very easy to disassemble and clean them. And they are robust – after all they were originally designed to survive at cash points – probably the hardest service for keyboards at all.

Re: K1000uC – A Hobby Project

PostPosted: Jan Fri 04, 2013 12:48 pm
by no0207
Part10: Putting it all together

Once I had second hand aquired a Wincor-Nixdorf TA85 keyboard I was confident everything would come to a good end. However there was still one decision to be made: I could either use it „as is“ with its PS/2 interface or put its interna into pieces and use it as matrix type keyboard? I decided to go with the second option, because this matched my original project much better. The consequence of this decision: I had to unsolder the keyboard membrane connectors from its PCB! So I endend up learning how to unsolder a connector before I ever had soldered anything! Bought a special „unsoldering iron“ with a hollow tip and an integrated vacuum pump which in fact turned unsoldering into a fairly easy task.
Finally I took an old piece of wood from my basement and mounted all the pieces on it for the sake of mechanical stability. My first working prototype was finished. Yipieee!!!! Even though it does not look very nice I will keep that prototype because it is a very unique piece with a special story behind it. But this is not the end of my project story...

Re: K1000uC – A Hobby Project

PostPosted: Jan Sun 06, 2013 1:33 pm
by no0207
In the late fall of 2011 I started constructing a second prototype.
The first prototype consisted of 3 atmels, communicating via the serial TWI (I2C) bus. A friend who designs microcontroller systems as profession had blamed me "that is overkill!" - one microcontroller could handle the task. I should consider using some shift registers, latches etc. around one microcontroller. So I gave it a try. The second prototype was still a breadboard construction, but somewhat nicer designed as compared to the first attempt. On the photo it sits beside a real K1003. As you can see the real thing is a monster!

Re: K1000uC – A Hobby Project

PostPosted: Jan Tue 15, 2013 4:57 am
by no0207
in early 2011 it became more and more clear I could not move that project any further unless I would learn soldering - and maybe learn in addition how to design a PCB.

At the time I faced two things that were really helpful:
1. The comic "Soldering Is Easy" at
2. The "Hive" project:

The latter explicitely encourages you to solder a thing together wich has some complexity. It was a big help for me to go through that exercise. In parallel I started first attempts to design PCBs for my project. In my first attempts I relied on auto-routing - the first board I ever had produced looked ugly - and did not work properly because of a bug in the router!
Finally I found out for myself as long as the space constraints on a board are not too extreme manual routing is a much better choice. The attached picture show my very first (autorouted) design of a PCB and a later manual redesign of it.

Re: K1000uC – A Hobby Project

PostPosted: Jan Tue 15, 2013 12:30 pm
by no0207
At this point the story has almost reached its *preliminary* end. In the spring of 2011 I tried some PCB design programs. Obviously they all have their advantages and disadvantages - and each of them has its learning curve. I know the "de-facto standard" among hobbyists is Eagle, but even the hobbyist version is expensive and its usage in my opinion much to restricted. Finally I ended up with choosing "Sprint Layout" for my hobbyist usage. It is inexpensive and from my point of view one of the most intuitive programs I ever tried. On the downside it does not integrate PCB design and schematics - it is only PCB design. However it has some testing tools that compensate that disadvantage at least partially. So I designed my own boards and had them produced by a PCB manufacturer - it was an amazing experience - typically you have to wait around 10 days for the real world result of your design work - or pay a fortune for a quick shot.
The attached photos show the PCBs, the base plate and an assembled device. This is - at least for now - the end of my story.

Re: K1000uC – A Hobby Project

PostPosted: Jan Wed 16, 2013 7:35 pm
by jac_goudsmit
Interesting project! Lots of interesting information and great pictures!

Have you considered putting a website online about it?


Re: K1000uC – A Hobby Project

PostPosted: Jan Mon 21, 2013 2:19 pm
by no0207
Have you considered putting a website online about it?

Yes, I started a Wiki site, but that is currently only available in German language. This calculator is a very special animal with limited public interest - most of the guys wo built one were in the past somehow infected with the real thing ;)