I have had to solve the same problem some time ago. I have chosen normal small TV set for that. A lot of families change TV in this time because of digital broadcasting or modern flat and slim LCD and plasma displays. So they put older TV set away and it is dormant somewhere. Or you can buy older TV very cheap.
Aim of construction
"Button by button" assembling of keyboard is complicated and mechanical design is a weak point in hobby construction. Special keyboards are usually inaccessible or expensive. That's why I have chosen standard IBM PC keyboard. PC keyboard solves as design as character variability - there are all characters on keyboard. Economic view is very advantageous and accessibility is almost unbeatable. The size is disadvantage of PC keyboard but beside TV set it doesn't matter.
I have developed 2 versions of TV terminal. "Built-in" version is designed for utilization in device. The second version is standalone device with external power source.
The described TV terminal accomplishes these results:
Schematic wiring is similar for both versions. You can find differences in the power supply part and in the serial line interface. Standalone version has got voltage regulator and simple RS232 to TTL converter. I have used only 2 transistors for logic voltage converter. Integrated circuit takes much more space.
As you can see wiring diagram is very easy. Most of the functions are centred in the microcontroller U1. There must be minimally 1 kB RWM for 40×25 character screen. I have selected well-known and available type - ATmega8.
The U1 microcontroller has to maintain 3 independent processes:
Independency for every of these 3 processes was the most complicated task. Video signal must be generated utterly on the dot. Program was created in assembler and compiled code is here.
Microcontroller clock is on maximum frequency - 20 MHz. Frequency 22 MHz would be better, but for reproducibility I accepted 20 MHz. This backtracking brings slight differences in the horizontal width of pixels. Forgive me - it is only hobby design (or maybe you will notice this never :-).
The power supply voltage regulator and logic level converter are included in the standalone version. To keep circuit easy I selected (inspired by biprog) simple converter with 2 transistors. There is no problem with short serial line. But if you connect long wires with bigger capacity then communication can produce errors in higher speeds. Be careful with used keyboard. Consumption most of them is reasonable low, but there are types with consumption above 100 mA. High current causes overheating of U2 voltage regulator. Use voltage regulator 7805 in the TO220 case or reduce power supply voltage in this event.
Setting in operation
Properly programmed microcontroller with running oscillator will produce video signal. Change slightly value of R7 when TV doesn't synchronize.
Connect built-in version directly to other microcontroller. Logic levels respond standard convention (log. "1" = 5 V). I suggest connecting serial line input and output for the first test. Type text on keyboard and check TV screen.
Component bil list
Click on the picture for 600 dpi picture (save it and print)
Application of TV terminal
All remaining control characters (21) are displayed as a square. Characters 192 - 255 are ignored. Active control characters are in the table. To tell the truth, I have modified function for control characters SOH, STX, DC1,... DC4. Emulation e.g. VT100 terminal is to no effect for such easy device. Terminal control is easier and quicker with this reduction. Default "new line" is achieved by CR+LF.
Cursor positions start in the upper left corner. Upper left corner is 0,0 - bottom right corner is 39,24. Semigraphic characters are split into 6 squares. Semigraphic code is explained in the picture.
IBM PC AT compatible keyboard can be connected to terminal. You can use both keyboard types - with PS2 connector or original DIN5. Standalone version is ready for PS2 connector. Use DIN5/PS2 reduction for keyboard with old DIN5 connector.
You can type printable characters directly. Special characters (e.g. control characters or characters above 127) can be placed as well. Left ALT must be pressed at first and then 2 hexadecimal characters follow. E.g.: for LF character press successively keys "left ALT" + "0" + "A". This way you can place all characters 0 to 255.
Special keyboard mode is remnant from the development time. When you press F12 key then keyboard is switched into "SCAN mode". Pressing of key will produce text string with base SCAN code of the key. E.g. press keys "A" and "B" - terminal will send text string "1C 32 ". Key F12 stops this mode as well.
There must be the same speed on the both devices for the proper communication. Serial line speed is conditioned through JUMPERs J1-0, J1-1 and J1-2 (see table). Communication is 8 bit always. Communication parameters are displayed for about 3 seconds on the screen after the start.
TV terminal is advantageous for:
PCB Pricing: https://jlcpcb.com/quote
News on theme: