This is a copy of interesting things from a Deuch MAKER, Willem Aandewiel

To get “the real vintage feeling” I wanted to design a “solid state” cassette interface that “works” like a real cassette recorder.

 KIM_TapeDevice.jpg (262806 byte)  KLIK på billedet for at se det i fuld størrelse...   (CVlick for full size)

It was possible to store more than one program on a cassette tape and by keeping track of the tape-counter (writing it down on the cassette) 
one could position the tape at the start of a particular program, punch in some magic numbers on the KIM-1, press the “GO” button to start the 
tape-loading program and then press the “play” button on the cassette recorder. Some squeezing sounds (like the one you might know from the
early modems) later and after a few minutes the program was loaded into the KIM-1.

Recording was similar with some other magic numbers and pressing the “record” and “play” button on the cassette recorder simultaneously.

A program is recorded to tape using two frequency’s; 3.623 Hz and 2.415 Hz to convert ‘1’ and ‘0’ bits to a pulse-train.

(page E-3 of the KIM-1 User Manual)

Decoding the pulse-train
I tried to let the ESP8266 decode this pulse train but the timing 
is too tight to decode the train into bits and also be able to convert
 the bits in bytes and store them to a file. So I fell back to the 
mighty little ATtiny85 processor to convert only the pulse train to 
‘1’ and ‘0’ bits and feed the bits to the ESP8266 for further 

The duration of one bit takes 7.452 milli seconds.

To distinguish between a ‘1’ or ‘0’ bit the ATtiny only has to record
the duration of the change in frequency from long- to short- and 
from short- to long-pulses. It starts a timer at the moment the 
pulse duration changes from approx. 414 µSeconds to 276 
µSeconds. The timer stops at the moment the pulse changes back
to ~414 µSeconds.

If the duration is shorter than 3.726 milli seconds it has found a ‘1’ 
and makes the output pin High and if the duration is longer than 
3.726 milli seconds it has found a ‘0’ and it makes the output pin

To load a program from the Tape Device to the KIM we can skip 
the modulation to the 3kHz and 2kHz frequency’s and simply feed 
the one’s and zero’s to the KIM.

Design Goals
The Tape Device user interface must consist of the four buttons 
found on every cassette recorder. A “fast rewind”, “record”, 
“play” and “fast forward” button (on the real cassette recorder 
there also is a “stop” button but we won’t use that button in this

Because of the today’s possibilities and state of technology we 
can store a large amount of program’s on a small device so we 
need a way to present to the user where we are on the “tape” 
but we can present more than just a tape-counter. 

Wouldn’t it be nice if, besides the tape-counter, there was
room for a description of the program and maybe the start 
address to run the program from. And because a large number 
of program’s can be stored on this device it would also be nice to 
be able to write-protect a program so it can’t accidentally be


Wemos D1 mini

I have chosen to use a ESP8266 processor on a small board from
Wemos (the Wemos D1 mini).

From the EEPROM memory of the ESP8266 about 3 Megabytes is
used as a filesystem to store programs.

This Wemos D1 board has an USB port to program the ESP8266 
and that port can also be used as an interface to a computer, 
which we will use  to enter a description to a program and to make 
the program Read Only or Read/Writable.


For the display the SD1306 with an I2C interface is perfect. 
This picture shows that as sequence $07 
(it’s a hexadecimal number) a program with the description
“chessClock” is stored. The program is “Read Only” and the
startaddress is $0200.

The KIM is a 5 volt device and the ESP8266 is a 3.3 volt device
(the ATtiny can be both, but we power it with 5 volt) so to 
connect signals to one-another, level shifters are necessary. 
N-Channel MosFets are ideal suited for this task.



This was the hardware design...

The software for the ATtiny and the ESP8266 can be found on GitHub:

And here you find a short demo of the KIM Tape Device: