SX28 Serial to TV
Serial Video Display Using Ubicom SX Microcontroller
Here are some pictures of my entry to the SXLIST Video Virtual Peripheral Design
Challenge and Contest. http://www.brouhaha.com/~eric/ubicom/servid/photos/
* serial input at 1200 bps 8N1 (eight data bits, no parity, one stop bit),
* monochrome displayo of four lines of twenty characaters
* 1 volt peak-to-peak composite video ouptut into 75 ohm load
* ASCII character set, 95 displayable characters
* Subset of VT52 control characters and escape sequences
* Automatic scrolling
* no extra "4" characters when scrolling
* interlaced or non-interlaced video selectable by conditional assembly
* approximate NTSC timing (525/60)
* approximate PAL timing (625/50) selectable by conditional assembly
- maybe. PAL timing of an earlier version was only tested in a
cursory fashion. Since then the line type table for PAL has
been rewritten in an attempt to more closely meet PAL scanning
specifications (e.g., 5 each equalization, vsync, equalization
pulses per field). However, this newer code has not been tested
in PAL mode at all.
This is a preliminary release. As such, it basically works, but there
are some known bugs (and probably a lot of unknown ones):
* some escape sequences are acting a bit flaky
● Supported control codes:
$0A Line Feed
$0C Form Feed - clear display and home cursor
$0D Carriage Return
$1B Escape - introduce escape sequence
$7F Delete - ignored
All unrecognized control characters are ignored.
● Supported escape sequences:
ESC A - Cursor Up - wraparound rather than scroll
ESC B - Cursor Down - wraparound rather than scroll
ESC C - Cursor Left
ESC D - Cursor Right
ESC H - Cursor Home
ESC I - Reverse Line Feed - may scroll
ESC J - Erase to End of Screen
ESC K - Erase to End of Line
ESC Y <col> <row> - Direct cursor addressing, col and row offset by 32
SERVID is designed such that user application code may be added to
(or replace) the serial character processing. In this release
of the code there are 919 words of program memory free for a user
application, and 21 bytes of RAM free. The video generation is
entirely interrupt driven, so the user application code can run at
non-interrupt time without any critical timing constraints.
● Software Requirements:
As written, SERVID will only assemble with the GPASM assembler,
version 0.8.14 or newer. GPASM is Free Software:
● Hardware Requirements:
SERVID requires a processor clock of 42.954545 MHz (12 times the NTSC
color burst frequency). Note that future versions of SERVID may
change to a clock frequency of 57.272727 MHz (16 times the NTSC color
burst frequency). Digikey offers suitable Epson oscillators which they
program to customer spec; a suitable 8-pin DIP footprint (4 actual pin)
part is part number SG-8002DC-PHB-ND.
SERVID uses an 8-bit D/A converter on port B to generate the video output.
A simple R-2R resistor ladder will suffice.
The serial input should be fed into port RA0. If a conventional
EIA-232 receiver (MC1489, MAX232, or the like) is used, the variable
ft_ser_noninv near the top of the servid.asm source file should be
set to 0. For a non-inverting serial input (such as the crude
resistor-only method, see the file SCHEMATIC), ft_ser_noninv
should be set to 1.
_A Technical Introduction to Digital Video_ by Charles A. Poynton,
published by John Wiley & Sons, 1996
ANSI/SMPTE 170M-1994 "SMPTE Standard for Television - Composite Analog
Video Signal - NTSC for Studio Applications"
ITU-R Reccomendation BT.470-6 "Conventional Television Systems"
Many thanks to Richard Ottosen for designing and building the hardware,
helping debug the code, and providing numerous helpful suggestions.
He also adapted my delay routines to the SX. Several years ago
he wrote the original test pattern generator for the PIC16C5x, which
inspired my PIC-PONG game, and now this program.
Thanks to Richard Ottosen and Loren Blaney for supplying a better
character generator font than the one I started to throw together.
Thanks to James Newton for posting the challenge:
Thanks to Ubicom for making fast yet inexpensive microcontrollers:
Thanks to Loren Blaney for writing SXPROG, which allows the Parallax
SX-Key programmer (Rev. C only, unfortunately) to be controlled from
environments other than M$ Windows:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published
by the Free Software Foundation. Note that permission is not granted
to redistribute this program under the terms of any other version of the
General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
NOTE: it is sometimes claimed that compliance with the GPL is
awkward for commercial interests. Licenses for non-GPL use of this
program may be negotiated with the author.
● SCHEMATIC (ASCII art) : Schematic for SERVID
$Id: SCHEMATIC,v 1.4 2001/01/04 23:52:55 eric Exp $
Copyright 2001 Richard Ottosen
● BOM (Bill Of Materials)
Bill of Materials for SERVID
$Id: BOM,v 1.2 2001/01/04 23:52:55 eric Exp $
Copyright 2001 Eric Smith <firstname.lastname@example.org>
All parts but the microcontroller are available from Digikey.
Digikey part numbers are given except for the microcontroller,
for which a Mouser part number is given.
Q. Vendor Part Part Number Description
-- ------ --------- ------------- ----------------------------------------
1 Ubicom SX18AC/DP 619-SX18AC/DP microcontroller, 18-pin plastic DIP
1 Epson SG-8002DC-PHB preprogrammed oscillator, 42.9545454 MHz
1 CTS 761-3-R220 8 * 220 ohm DIP resistor network
2 CTS 770-103-R120 5 * 120 ohm SIP res. network, isolated
1 15 ohm 1/8 watt resistor
1 33K ohm 1/8 watt resistor
1 180K ohm 1/8 watt resistor
1 0.1 uF ceramic capacitor
1 BNC or RCA jack for video output
1 DB25 connector for serial input
1 5V regulated DC power supply
The source code, object code, and documentation for this project is available
under the terms of the Free Software Foundation's General Public License, Version2.
The official home of the project, including distribution files, documentation,
and bug tracking, is now on SourceForge.
The distribution is also available from this server:
servid03.zip ( 31K, Tuesday, 30-Jan-2001 23:25:52 PST)
● Serila to Video SX28 Source
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License version 2 as published
; by the Free Software Foundation. Note that permission is not granted
; to redistribute this program under the terms of any other version of the
; General Public License.
; This program is written to be assembled with the GPASM assembler,
; version 0.8.14 or newer: ; http://gpasm.sourceforge.net/
; NOTE: there are references in this code to PAL and NTSC. Technically
; those are color standards. In most cases the references to PAL and NTSC
; are really intended to refer to 625/50 and 525/59.94 scanning, or (in
; non-interlaced mode) 312/25 and 262/29.97 scanning.
SERVID - Serial video display using Ubicom SX microcontroller
Copyright 2000, 2001 Eric Smith <email@example.com>
Home page: http://www.brouhaha.com/ubicom/servid/
|SX color TV 게임기|
|SX18 영상(NTSC) 동기검출|