(This is an adaptation of my post in LiveJournal (in Russian). Also, a UT-88 computer can be hard to find, but the ideas below can be easily applied to any 8080/8085/Z80 kit, for example, the ones available from Wichit Sirichote. In fact, I was using his 8080 kit to write and debug the code example.)
The UT-88 computer (and its slightly improved version) in its minimal configuration only has a cassette tape recorder, a small keyboard (18 keys), and six seven-segment displays as its 'screen'.
And this is how we can connect a small display to the UT-88 without soldering (see photo).
The idea of using a serial debug monitor as a display for the UT-88 came to me as soon as I saw it on Tindie. The monitor's description claimed that it was sufficient to simply send it characters over the serial line at the speed of 9,600 baud, and they will be displayed on the screen.
The only problem is that the UT-88, in its minimal configuration, doesn't have a serial data transmission port... But wait—how is data recorded onto a cassette tape? Here's the electronic schematic. It turns out that if you send a byte to port A1 (using the OUT A1
instruction), its least significant bit (D0) will appear at the output of the D-type flip-flop DD4.2 (on the schematic)—this is the first step for storing this bit on magnetic tape.
So, all that needs to be done from a hardware perspective is to connect (using the clip for 14-pin ICs):
- Pin 7, the ground pin of the К155ТМ2 chip, to the 'GND' pin on the monitor
- Pin 14, the power supply pin of the chip, to the 'VCC' pin on the monitor
- Pin 9, the Q2 output, to the 'RX' pin on the monitor.
What remains is the software emulation of data transmission through the serial port at the speed of 9,600 baud—a simple 'bit-banging' algorithm. We just need to clarify the exact data transmission protocol. In layman's terms, we simply send a bit 1
('idle state'), then a bit 0
('start bit'), followed by the least significant bit (D0) of the byte, then bit D1, and so on up to bit D7, and finally, a bit 1
('stop bit'). After sending each bit, a fixed time interval must be maintained so that the sent sequence of bits resembles data transmission at the speed of 9,600 baud.
For an example please see the example code (manually assembled).
When you run the program (by pressing the '6' button on the UT-88 keyboard), the display should show 'Vot tak vot!' ('Just like that!').
Why do we arrange a sequence of bytes to send a sequence of bits when, theoretically, we could simply shift the accumulator to the right and send it to port A1
eight times? This is to make sure that the transmission of all 11 bits, including the start and stop bits, is exactly the same. For the same reason, interrupts are disabled during the actual transmission of the sequence.
Sending the zero byte clears the display screen - as in the example at address C007
.
Comments