maccasoft / propeller-vt100-terminal

ANSI / VT-100 Terminal emulator for Parallax Propeller microcontroller with VGA and USB support
47 stars 9 forks source link
ansi parallax-propeller-microcontroller propeller-spin rc2014 usb vga vt100

Propeller ANSI / VT-100 Terminal

Firmware for a serial terminal add-on board designed for the RC2014 computer. It adds VGA video output as 80x25 text (720x400@70Hz) with ANSI / VT-100 terminal emulation, and USB keyboard input. Using a single Parallax Propeller microcontroller running at 80MHz.

The board

Connections

Assembly

  1. RC2014 bus
  2. USB Keyboard
  3. VGA
  4. Programming header (optional prop-plug compatible)

JP1 and JP2 can be used to disconnect the board from the standard RX and TX lines on the bus and connect to another serial port (for example to the secondary port of the dual serial board). Use the top pads to connect the RX and TX lines respectively.

The USB host driver supports keyboards only, no other devices are supported including hubs.

The programming header can be used as an auxiliary serial input, all characters received are sent to the RC2014 as they were typed by the user. Beware that the port levels are 3.3 volts only.

Firmware compile

The firmware can be compiled using OpenSpin and uploaded to the EEPROM either using the Prop-Plug serial adapter for in-circuit programming or a stand alone programmer.

Compile with the following command:

openspin -b -u vt100.spin

The compiler generates a file named vt100.binary that can be written to the EEPROM using a stand alone programmer.

In-circuit programming

The firmware can also be written to the EEPROM using a Prop-Plug serial adapter connected to the board using the programming header as illustrated on the picture above (be sure to connect the cables properly, the leftmost pin marked 3.3v is not used with the Prop-Plug adapter).

Download the Propeller Loader tool, connect the adapter to a USB port and issue the following command:

propeller-load -p /dev/ttyUSB0 -e -r vt100.binary

The -p parameter specifies the serial port assigned to the Prop-Plug adapter in the notation used by the operating system (/dev/ttyUSBx for Linux, COMxx for Windows).

After programming the board is reset and the new firmware immediately usable.

Terminal Settings

Press CTRL-F10 on the keyboard to switch to the terminal settings screen from which it is possible to configure the keyboard language mapping, cursor style, cursor keys mapping and more. Press the setting's key to toggle between options. Press CTRL-F10 again to permanently save the settings and return to the terminal screen.

Available keyboard languages are: DE (Germany), FR (France, QZERTY), IT (Italy), NO (Norway), UK (United Kingdom) and US (United States).

Available cursor key mappings are: VT-100 (reset mode sends \ESC[A, \ESC[B, etc.), VT-100 APPL. (set mode sends \ESCOA, \ESCOB, etc.) and WordStar which sends control characters compatible with the WordStar word processor.

Press CTRL-F9 to toggle the National Replacement Character Set option.

Terminal ANSI Codes

The following escape sequences can be used to control the terminal behaviour

Where \ESC is the binary character 1Bh (or 27) and {NUM}, {COUNT}, {ROW}, {COLUMN}, {TOP}, {BOTTOM} is any sequence of numeric characters like 123.

Usage from BASIC

10 PRINT CHR$(27);"[1;31m";"TEXT IN RED";CHR$(27);"[0m"

Schematic

Schematic

Parts List
R1 = 10.000 ohm 1/4 watt R19 = 10.000 ohm 1/4 watt
R2 = 4.700 ohm 1/4 watt R20 = 22.000 ohm 1/4 watt
R3 = 4.700 ohm 1/4 watt C1 = 10 uF 63v elettr.
R4 = 510 ohm 1/4 watt 1% C2 = 100.000 pF poly.
R5 = 240 ohm 1/4 watt 1% C3 = 100.000 pF poly.
R6 = 510 ohm 1/4 watt 1% C4 = 100.000 pF poly.
R7 = 240 ohm 1/4 watt 1% XTAL1 = 5 MHz crystal
R8 = 510 ohm 1/4 watt 1% IC1 = MCP1700-3302E/TO
R9 = 240 ohm 1/4 watt 1% IC2 = P8X32A-D40
R10 = 240 ohm 1/4 watt 1% IC3 = 24LC256
R11 = 240 ohm 1/4 watt 1% SP1 = Piezoelectric buzzer
R12 = 130 ohm 1/4 watt 1% JP1 = 2 pin male header
R13 = 130 ohm 1/4 watt 1% JP2 = 2 pin male header
R14 = 130 ohm 1/4 watt 1% CN1 = USB-A connector
R15 = 47 ohm 1/4 watt CN2 = 40 pin male header, right angle
R16 = 47 ohm 1/4 watt CN3 = DB15 HD female connector
R17 = 47.000 ohm 1/4 watt CN4 = 5 pin male header
R18 = 47.000 ohm 1/4 watt

Board shared on OSHPark and available on Tindie.