GithubHelp home page GithubHelp logo

maccasoft / propeller-vt100-terminal Goto Github PK

View Code? Open in Web Editor NEW
44.0 14.0 10.0 696 KB

ANSI / VT-100 Terminal emulator for Parallax Propeller microcontroller with VGA and USB support

Propeller Spin 100.00%
ansi vga parallax-propeller-microcontroller vt100 rc2014 usb propeller-spin

propeller-vt100-terminal's Introduction

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

  • \ESC[{COUNT}A
    Moves the cursor up by COUNT rows; the default count is 1.
  • \ESC[{COUNT}B
    Moves the cursor down by COUNT rows; the default count is 1.
  • \ESC[{COUNT}C
    Moves the cursor forward by COUNT columns; the default count is 1.
  • \ESC[{COUNT}D
    Moves the cursor backwards by COUNT columns; the default count is 1.
  • \ESC[{ROW];{COLUMN}H
    Sets the cursor position where subsequent text will begin. If no ROW/COLUMN parameters are provided (ie. \ESC[H), the cursor will move to the home position, at the upper left of the screen.
  • \ESC[K
    Clear line from cursor right.
  • \ESC[1K
    Clear line from cursor left.
  • \ESC[2K
    Clear entire line.
  • \ESC[J
    Clear screen from cursor down.
  • \ESC[1J
    Clear screen from cursor up.
  • \ESC[2J
    Clear entire screen.
  • \ESC[{ROW];{COLUMN}f
    Same as \ESC[{ROW];{COLUMN}H.
  • \ESC[{TOP};{BOTTOM}r
    Selects top and bottom margins, defining the scrolling region. If TOP and BOTTOM are not selected, the complete screen is used (no margins).
  • \ESC[{NUM1};...;{NUMn}m
    Sets multiple display attribute settings. The following lists supported attributes:
    0 - Reset all attributes
    1 - Bright
    2 - Dim
    5 - Blink
    7 - Reverse
    25 - Blink off
    30..37 - Foreground color (black, red, green, yellow, blue, magenta, cyan, white)
    38;5;{NUM} - Foreground color to {NUM} (0-15)
    39;{NUM} - Default foreground color
    40..47 - Background color (black, red, green, yellow, blue, magenta, cyan, white)
    48;5;{NUM} - Background color to {NUM} (0-7)
    49;{NUM} - Default background color
  • \ESC[5n
    Terminal status request. Response is always \ESC[0n indicating the terminal is in good condition.
  • \ESC[6n
    Reports the cursor position to the application as (as though typed at the keyboard) \ESC[{ROW];{COLUMN}R
  • \ESC[s
    Save current cursor position.
  • \ESC[u
    Restores the saved cursor position.
  • \ESC[?1h
    Set cursor keys to application.
  • \ESC[?1l
    Set cursor keys to cursor.
  • \ESC[?12h
    Enable cursor blinking.
  • \ESC[?12l
    Disable cursor blinking.
  • \ESC[?25h
    Show cursor.
  • \ESC[?25l
    Hide cursor.
  • \ESC[{NUM}q
    Set cursor style. {NUM} is 0/1=blinking block, 2=steady block, 3=blinking underline, 4=steady underline.
  • \ESC[L
    Insert line.
  • \ESC[M
    Delete line.
  • \ESC[?42h
    Enable National Replacement Character Set.
  • \ESC[?42l
    Disable National Replacement Character Set.

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.

propeller-vt100-terminal's People

Contributors

bsekisser avatar maccasoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

propeller-vt100-terminal's Issues

Strange crash when paging down a particular file in a text editor

I'm using an RC2014 VGA Serial Console in a homemade CPU, and I am encountering a strange crash when trying to edit a particular text file. Here's a video demonstrating the problem: https://www.youtube.com/watch?v=OKDQznJkS2M

This happens reliably every single time I try to page down this file by 2 pages. Steps to reproduce (although nobody but me has this computer) are:

  1. open hamurabi.sl in kilo (it only works for hamurabi.sl, and it only works in the text editor - catting it to the screen doesn't cause any problem - I haven't yet investigated what specifically about this source file is causing the problem).
  2. scroll down twice (Ctrl-D, Ctrl-D)
  3. the VGA console will crash, and the screen will probably turn off (occasionally it shows a green-and-yellow pattern instead of turning off).

I wonder how we would go about debugging this? I think a first step would be to capture the exact bytes that are transmitted and replay them using a USB serial cable and see if it still crashes it - that would rule out some hardware-specific timing problem and would allow others to reproduce the problem. I'll work on doing that.

More standard VGA modes

Is it possible to implement a more standard VGA mode like 640x480@60.

For testing purposes really, I have two monitors that aren't supporting either mode. Oscilloscope readings of the vertical and horizontal sync look correct for both resolutions, as does the dot clock on the color lines.

I'm out of Monitors to try!

Thanks

Question about changing default text color

Hi Marco ! Congrats for your excellent work! Really enjoying your Terminal with an SC126 RC2014 board. Only one question, how do I change the source code in vt100.spin to set a different color for the Foreground attribute ? I successfully changed the CTRL-F10 setup screen to green using $20 and $A0 instead of $70 and $F0 for text attributes, but didn´t find where to change the default color for the terminal text and cursor.

I´ll really appreciate if you can point me to the correct section of the code so I can make the change.
Thanks in advance.

Regards,
Jose Luis.

full 9x16 support now available

Just to let you know that there is now a new version available which uses a real 9x16 font (liberated from some FON file). The colour blink attribute is currently MIA but can be brought back if necessary.

Build issue: Object exceeds runtime memory limit by 59 longs.

When building the project using the default .spin files and latest (1.00.78 2016) version of OpenSpin I receive the following error,

F:\Documents\6502\vt100>openspin -b -u vt100.spin
Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78 Compiled on Jan 16 2016 15:37:47
Compiling...
vt100.spin
|-usb-fs-host.spin
|-com.serial.spin
|-waitvid.80x25.nine.driver.spin
|-generic9x16-4font.spin
|-keyboard.spin
|-i2c.spin
vt100.spin : error : Object exceeds runtime memory limit by 59 longs.

question on build

I built the code changing the pins for the usb keyboard and serial to match the hobytronics board.. I was hoping I could turn that into this card for use on a single board computer.
it builds and loads but then the screen goes to sleep.. I dont have a keyboard or even usb header connected..

this is the schematic for there board. not much different from what I can tell. if I am missing something do you mind letting me know. Thank you . PS I have never used a propeller processor before.. so I am guessing..

lines I changed
vt100.spin
' ser.StartRxTx(8, 9, 0, 115200) changed for hobytronics
' debug.StartRxTx(31, 30, 0, 115200) changed for hobytronics
ser.StartRxTx(30, 31, 0, 115200)

and in USB_FS_HOST.spin

' modified for the Hobytronics serail_VGA from
' DMINUS = 1
' DPLUS = 0
DMINUS = 3
DPLUS = 4

link to their board

http://www.hobbytronics.co.uk/datasheets/serialvga-schematic-1-0.pdf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.