|
|
| Display mode: | black and white |
| Text mode: | 40 characters x 25 lines |
| Semigraphic mode: | 80 x 75 "points" |
| Printable characters: | ASCII 32 - 127 |
| Keyboard: | IBM PC AT compatible |
| Control characters: | 11 |
| Serial line speeds: | 1200 Bd to 115.2 kBd |
| Power supply: | 9 - 12 V or 5 V (built-in version) |
| Current consumption: | cca 30 mA + keyboard consumption |
TV terminal utilization is very easy. Connect video output to video (AV) input on TV set. Set communication speed on J1 jumpers. You can connect PC keyboard but it isn't necessary. Turn terminal ON and display will show current parameters. The terminal is in full operation 3 seconds later.

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.
Wiring diagram for standalone version
Wiring diagram for built-in version
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 40x25 character screen. I have selected well-known and available type - ATmega8.
The U1 microcontroller has to maintain 3 independent processes:
- Video signal generation.
- Character reception from the keyboard, decoding and dispatch to serial line.
- Receiving characters from serial line and storing it in the memory.
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.
It is very easy to make both versions of TV terminal. Mount and solder every component to PC board. Check up complete device. The last operation is downloading program into microcontroller. Set fuses: RESET=ON, BROWN-OUT LEVEL 4.0V, OSCILLATOR=EXT. CRYSTAL HIGH FREQ.
Component bill is here...
PCB for standalone version
PCB for built-in (SMD) version
... and circuit layout is here.
For standalone version
For built-in (SMD) version
Click on the picture for 600 dpi picture (save it and print).
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.
PCB for standalone version is designed to suit in KG22M plastic box (see programmer biprog). Make 3 rectangle and 1 round holes in box (style "attach, see and then use file or drill").
TV terminal responds to 3 character types:
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.
| Character | Decimal value | Hexadecimal | Description |
| SOH | 1 | 0x01 | Set mode "CR or LF for new line" (Unix, Apple like) |
| STX | 2 | 0x02 | Set mode "CR and LF for new line" (Microsoft like) |
| BS | 8 | 0x08 | Backspace |
| TAB | 9 | 0x09 | Horizontal TAB - move cursor to position modulo 8 |
| LF | 10 | 0x0A | Line feed (see SOH and STX as well) |
| FF | 12 | 0x0C | Form feed (clear screen) |
| CR | 13 | 0x0D | Carriage return (see SOH and STX as well) |
| DC1 | 17 | 0x11 | Cursor ON |
| DC2 | 18 | 0x12 | Cursor OFF |
| DC3 | 19 | 0x13 | Next byte will specify X position of cursor |
| DC4 | 20 | 0x14 | Next byte will specify Y position of cursor |
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.
| Speed |
|
|
|
| 115200 Bd |
|
|
|
| 57600 Bd |
|
|
|
| 38400 Bd |
|
|
|
| 19200 Bd |
|
|
|
| 9600 Bd |
|
|
|
| 4800 Bd |
|
|
|
| 2400 Bd |
|
|
|
| 1200 Bd |
|
|
|
This TV terminal is very easy device. Even a beginner should assemble it without problems. TV terminal is practical for your microcontroller-controlled device. Most of modern microcontrollers have built-in universal serial unit. So you can design user interface very easy with TV terminal and few line code in your microcontroller.
TV terminal is advantageous for:
- device with a lot of displayed information,
- debugging phase of design (I work on the PC and TV terminal is interface for debugged microcontroller),
- to make keyboard and display for occasionally gadget is waste of time.
(c) 19.May.2008