PC utilities updated

The PC utilities page has seen an update of th4 Conversion hex formats utility.

Programs to manipulate the binary and hex formatted files of interest for SBC owners. Intel hex, MOS papertape, Motorola S-record, binary, hex conversion fort eh 8 bit world.
Runs on Windows, Linux, Mac due to Lazarus and Freepascal. Source included.


FABGL library serial and development board

A page dedicated to the FABGL library and baords and how I use it for serial terminal emulation and CP/M emulation (Altair 8800 and CP/M 3 multitasking, IBM PC coming).

FABGL terminal emulator and CP/M

Most SBC’s have a serial interface to work with the computer, using either a RS-232-C compatible interface with a DB-9 connector or more often the TTL interface with pin connector.
A VT100 ANSI termainal emulation is ideal for these machines, whether from a PC or standalone. Teraterm or Minicom are fine examples on Wondows and Linux, with the possibility to transfer data into the SBC’s.

To use the SBC standalone a video terminal is a good solution, cheap, with mostly a monitor with VGA and a PC keyboard, often PS/2.
Examples are the ASCII Video Terminal or the Raspberry PI (any, Zero is low cost) with PIGFX or ESP32 absed, the subject of this page: FABGL software and hardware.

FabGL is mainly a Graphics Library for ESP32. It implements several display drivers (for direct VGA output and for I2C and SPI LCD drivers). FabGL can also get input from a PS/2 Keyboard and a Mouse. ULP core handles PS/2 ports communications, leaving main CPU cores free to perform other tasks. FabGL also implements: an Audio Engine, a Graphical User Interface (GUI), a Game Engine and an ANSI/VT Terminal. .

VGA output requires a digital to analog converter (DAC): it can be done by three 270 Ohm resistors to have 8 colors, or by 6 resistors to have 64 colors. There are several fixed and variable width fonts embedded. Unlimited number of sprites are supported. However big sprites and a large amount of them reduces the frame rate and could generate flickering. When there is enough memory (on low resolutions like 320×200), it is possible to allocate two screen buffers, so to implement double buffering. In this case primitives are always drawn on the back buffer. Except for double buffering or when explicitly disabled, all drawings are performed on vertical retracing (using VGA driver), so no flickering is visible. If the queue of primitives to draw is not processed before the vertical retracing ends, then it is interrupted and continued at next retracing.

There is a graphical user interface (GUI) with overlapping windows and mouse handling and a lot of widgets (buttons, editboxes, checkboxes, comboboxes, listboxes, etc..).

Finally, there is a sound engine, with multiple channels mixed to a mono output. Each channel can generate sine waveforms, square, etc… or custom sampled data.
Audio output, like VGA output, is generated using DMA. CPU just mixes audio channels and prepares waveforms.

FabGL development board
FabGL development board from fabgl on Tindie

This is the reference board to develop and make new experiments with theE FabGL graphic library, which includes VGA output, Audio output, PS/2 Mouse and Keyboard input, Micro SD socket and Arduino style stackable headers.

  • three jumpers to select colors count (8 or 64).
  • 5V logic level converter to have 5V compatible serial port. This is configurable (and be disabled) using jumpers (see UART PATH) allowing TX on GPIO2 or GPIO12 and RX on GPIO34. TX must be disconnected when programming the board.
  • additional four pins header with RX (5V), TX (5V), GND and VCC (5V).
  • PS/2 port pullups connected to 3.3v instead of 5V to reduce ADC noise.
  • Includes PCB, ESP32-WROOM-32 and all required components and connectors already assembled.

Having the SD card connector makes extra things possible, like the Altair8800 and otrh CP/M emulator, see below.

FabGL Terminal

FabGL Terminal from fabgl on Tindie

This is a serial terminal based on FabGL library.

  • Supports following terminal types: ANSI, VTxxx, ADM 3A, ADM 31, Hazelttine 1500, Osborne, Kaypro ant VT52.
    German, Italian, UK and US keyboard layouts.
  • Configurable 5 Volts serial port.
  • Two PS/2 ports for Keyboard and Mouse.
  • One VGA output, up to 64 colors.
  • One audio out (line level, not amplified).
  • Powered from USB port can power a Z80 board, like the MBC2.
  • Bottom 8 PINs connector, with RX, TX, GND, 5V signals (also compatible with MBC2-Z80 board).
  • Upper 8 PINs connector 6 GPIOs (3.3V volts).
  • Preprogrammed with FabGL Serial Terminal, but reprogrammable with any compatible FabGL program. For example you can run VIC-20 emulator with this board.
  • Can be connected to a 3.3V device (like Raspberry pi) using IO2 pin as TX

While the library may look very sparsely documented, there is a large collection of youtube tutorials and examples available made by the author:

I use the serial terminal on my MBC-2 and MBC-V20, it is a “plug on” solution and functions fine with a real PS/2 keyboard.

FABGL serial with V20-MBC

FABGL serial with MBC-2

CP/M emulator

The ESP32 is a powerful system, and running a CP/M emulator is withingn its capabilities. The FABGL library offers two CP/M emulators, an Altair emulator and a CP/M 3

The CP/M examples are not that difficult to install.

For the AltairDOS version it is wise to study the emu menu. It has an option to Get or Send a disk to serial, you need the Python programs (and transfile for xmodem trasnfer) on the PC side for that.
Two disks are standard, two more are possible, stored on the SD or the ESP32 Flash SPIFFS. Use Format File system from the menu, and after rebooting, you have to create the CP/M filesystem, running “FORMAT” command. Then press “C” or “D” (uppercase). At “COMMAND” prompt write “FULL” and press enter. Now press “C” (still uppercase). You should see tracks formatting and verifying. Press “S” to exit.

The AltairDOS in this emulation is based upon the Burcon CP/M implementation, Here the original CP/M and Sysgen disks with documentation (for SIMH).
CP/M for the Altair 8800 and Altair Floppy Drives

CP/M 3 multitasking


NOP testers

I built two NOP testers, simple standalone devices to do a simple sanity check test if this CPU is at least doing something that can be expected. Not a thorough test of speed, instructions, all address lines or datalines or control lines. 

Retro Chip Tester


The Retro Chip Tester was developed to test “old” memory chips from the 1970s and 1980s, which are often no longer recognized by today’s programming devices.

January 2021: I am building one!

  • PCB ordered and received from See
  • Parts ordered at Reichelt and received
  • LCD ordered at amazon,de and received


The PockeTerm is a 4″ X 2.5″ single board terminal that uses a VGA monitor and a PS/2 keyboard for its input and output. Dual serial ports gives the user the option of transferring data to/from a PC while still connected to the host device. This terminal was designed to work with vintage computers but is compatible with most systems including Unix and Linux systems. A low cost color choice terminal that has VT-100 compatible commands for controlling cursor and screen functions. Want to program the propeller microcontroller or install an update to the firmware? No problem, just connect the PockeTerm to your PC, run the Propeller Tools software and you can program it from your PC, no expensive Prop Plug required.

The PockeTerm has a full featured screen with Function key status at the bottom of the screen. Click on the image for a full size photograph of the screenshot.

CTRL-F1 Selects Baud Rate
CTRL-F2 Changes text color of the main display section
CTRL-F3 Turns on/off the 2nd serial port that connects to a PC.
CTRL-F4 Force incoming data to 7 bit ASCII. Strips the 8th bit, required for some systems
CTRL=F5 Change cursor type. Choose from underscore, solid block, or none. Also, choose from blinking or not.
CTRL-F6 Add line-feed to carriage returns


Pocketerm Setup and Users Manual 2009
Pocketerm Setup and Users Manual V3 2009
Pocketerm Circuit diagram
Pocketerm Bill Of Materials
Pocketerm Firmware
Pocketerm CD

PS/2 keyboards

I have succesfully assembled the kit, the manual guided me just fine through the steps. Took me just over an hour.
The PockeTerm worked right away. Thanks to mfortuna’s tip, put jumpers in 1&2 and 5&6, and testing is independent of cables and computers to connect.

A standard keyboard with PS/2 worked. What did not work was my mini-USB keyboard (standard PC keyboard without numerical pad, and smaller size, like notebook keyboards) connected via an USB to PS/2 converter. The USB keyboard is ok, works with the PC’s and the Apple 1 kits via the USB-PS/2 dongle. I bought it because the smaller size looks better with the small computers and takes less desk space With the scope I found the PS/2 clock/data line (cant remember which one), to be open, as if nothing connected. So something is missing to make the USB device come alive. I googled around and found this:
In it I saw a schematic how to connect a Parallax mini PS/2 keyboard, and it was different from the PockeTerm PS/2 interface. It has additional 10k pull-ups connected to the PS/2 clock and data. I soldered in the two 10k’s and the mini keyboard came alive!

Program the Propeller Notes by Vince Briel

  1. Go download propeller tools from parallax here:
  2. Install propeller tools
  3. Place the firmware directory from your PockeTerm CD onto your hard drive here:
    C:\program files\parallax inc\propeller tool v1.2.7 (r2)\
  4. Connect your PockeTerm to the RS232 port labled PC and turn on your PockeTerm.
  5. Under the propeller tools program click on the section File and find the firmware directory you just copied onto your hard drive and select the file
  6. Press F11 on your PC keyboard and the propeller tools will compile and attempt to find a Propeller chip connected to a serial port on your PC. If your
    connection is good it will program the RAM first on your Propeller chip then program the EEPROM.

The PockeTerm makes a really good development board for learning how to program the Propeller chip. For more information on programming the Propeller,
please visit the Parallax forums here:
The above steps will program the Propeller with the code that is now resident on the EEPROM onboard the PockeTerm. Change step 3 to the location of the program you wish to insert onto the PockeTerm.


Ascii Video terminal

Design by Geoff Graham in the magazine Silicon Chip, 2014

I have the kit as sold by Silicon Chip, and recently bought the assembled version at Budgetronics.

All technical information, like circuit diagram, sources, documentation are available at Geoff Graham’ website.

ASCII VT100 compatible video terminal Already buid on PCB and ready for use.
Ideal interface to connect your microcontroller with a VGA monitor (or a composite videomonitor), standard PS2 keyboard and USB.


    • Single chip ASCII video display terminal with VT100 and VT52 emulation
    • VGA or Composite Video output with automatic switch over. Composite can be PAL or NTSC
    • VGA can display 24 lines x 80 characters or an extended resolution of 36 lines x 80 characters
    • Composite video can display 18 lines x 48 characters (PAL) or 15 lines x 44 characters (NTSC)
    • Standard PS2 compatible keyboard input with support for standard US keyboard layout or French, German, Italian, Belgian, Russian or United Kingdom keyboard layouts
    • TTL or RS232 serial input/output. Baud rates from 40 to 1,000,000 bits per second with odd, even or no parity and one or two stop bits
    • USB input with serial emulation. This can be used as a USB to serial converter
    • Extended VT100 terminal emulation. Extensions include graphics codes for drawing lines, boxes and circles (which can be hollow or filled)
    • Graphics resolution is 480×288 pixels in VGA 25 line mode, 480×432 pixels in VGA 36 line mode, 288×216 in PAL composite and 264×180 pixels in NTSC composite mode
    • Three built in fonts (standard, large and jumbo) and four character attributes (normal, underline, reverse and invisible)
    • Power requirement is 5V at 50mA plus any current drawn from the 3.3V pin on the serial connector, USB power supply

It works well for me. Nice crisp picture on my VGA terminals. Easy to use and configure, versatile as VT100 or VT52 with some extensions.

Serial USB adapters testing

So I have a collection of those USB to serial adapters, some with cables and DB-9 connectors, some with cable and Dupont connectors, and some USB TTL type connectors on a PCB with male or female Dupont pin connectors for USB-A, mini or micro USB. Most not documented or unsure if the voltage levels are 3.3V or 5V ..

First some background. These are all descendants of the EIA RS232 standard in some way. Terminology, asynchronous serial format, voltage levels, start bits, stop bits, 7 or 8 data bits, hardware and software handshake, and the way it is abused in many of these devices. And so common nowadays in Arduino and ESP8268, ESP32 and even Raspberry Pi world.

If you are new to the serial world and want to use these devices and understand how, study the next chapter. You will learn and know what I am talking about: DCE, DTE, DSR, DTR, TxD, RxD, CTS, RTS, DTR, RI, CarrierDetect, UAR/T’s, TTL voltage levels being reverse to RS232 voltage levels, a ‘0’ being negative RS232 voltage up to 15V, a ‘1’ being as low as -15V.


RS232 asynchronous information

This picture shows where RS232 came into being about 50 years ago,

Read these PDF’s:
RS232 Protocol – Basics
EIA RS232-C Standard Protocol
EIA RS232-E Standard Protocol
Fundamentals of RS–232 Serial Communications
RS232 Physical Layer Interface Standards
RS232 (TIA/EIA-232-F)
RS-232: Serial Ports

USB Serial TTL devices

These little devices came into use to communicate with small computers like SBC’s, Arduino and ESP’s and PC’s. Throw out the overhead of the + and -15v, limit or leave out the handshake signals, (mis)use the DTR signal to reset the Arduino, use it to download firmware or collect data from sensors on the small computers and process it on bigger machines. And act as the power supply the little computer.
Based on special UAR/T IC’s, very small footprint, and dirt cheap.

Testing USB Serial TTL adapters

What you need:
– A PC, Raspberry Pi or another Linux or Windows PC. Any PC platform supporting USB ports will do.
– The program SerialTester, see below
– A small breadboard
– A collection of Dupont cables with male and female connectors
– A multimeter, a most simple one will do


Testing USB serial adapters is not that difficult, you need a terminal emulator, which are available in lots of formats and capabilities. Putty, Minicom etc all allow to choose a serial port, set baudrate and other parameters like hardware handshake, software handshake, number of data and stop bits. With a loopback test (which means connecting serial out TxD to serial in (RxD) you can test the serial connection by typing characters and seeing the characters appear on screen.

What I miss in these programs is a way to inspect the modem control lines. So I wrote a little program for that.
SerialTester allows to do the loopback test and shows the state of the modem control lines.
You can change the DTR and RTS lines since these are set of cleared by the USB serial port. The other lines are read from the USB serial adapter.

Get the program here:
Windows 10 installable executable
source (Lazarus + Freepascal) and executable for Windows, Linux and executable for Raspberry Pi

Use the program as follows to completely test and document (write down test results on the next steps!) the adapter.

1. It is a GUI/Windows program, so start as usual on your operating system. Raspberry runs this program fine, but Linux is not so forgiving in plug and play of USB devices, so expect some hangs and reboots. CH340 chipsets can have a temper, and SerialTester sometimes fails, where Minicom succeeds.

2. Insert the USB adapter, do not connect anything yet to the adapter
For the USB-A types it is handy to have an USB-A male -female cable to bring the adapter to the table

– Check if the USB adapter is recognized by the operating system
For Windows start Device Manager and look for COM Ports, like COM8 in the example below
On Linux start a terminal and type “lsusb”, insert the USB serial adapter and look for added USB device serial adapter, in the screenshot an FTDI adapter.
The command “ls -l /dev/ttyUSB*” will show devices like “ttyUSB0”.

3. Click Port settings and click in the field Port drop down button. A list of serial adapters will be shown, pick one. Note that on a Raspberry the serial port ttyAMA0 on the GPIO connector will be shown also. Here we want the ttyUSBxx device.

Select 300 baud as baud rate, this will help seeing the transmit with the multimeter., leave the rest default.

Press OK

4. Open the Port by clicking the button Open Port. Look at the status displayed, it should tell the port is opened. If not opened, you might have a driver problem, see the sections below on CH34x, FTDI and Prolific 2303HX devices.
You will also see the DTR and RTS fields light up red, as opening also sets the DTR and RTS pin high.

5. Switch on the multimeter and read the prints on the USB or the color of the wires.
– First find Gnd. Indicated with the label GND or a black wire.
– Now find Vcc, indicated with VCC or the red wire. Measure the voltage, should be 5V, 3.3V. Some adapters have a jumper to select the voltage. Some adapters also change the voltage on the other lines, some do not. Measure!

6. Find the TxD pin. Connect the multimeter to the TxD pin. It should be +3.3V or 5V. Also check if changing VCC to +3.3V or 5V makes any difference, some adapters do, some do not change the voltages on the pins.

7. Enter a long string in the Send field, and press Send (or Send CR for a line ending). Observe the readout on the multimeter, it should be lower than the value in rest. Nothing will be shown in the received fields.

If not, then this is not the transmitting pin. Check RxD if that is the transmitting pin, for all my adapters it was TxD, but who knows what manufacturers do ..

8. Inspect the adapter for a DTR line if any. Connect the multimeter to the corresponding pin and measure the voltage. Press the DTR button in SerialTester and check if the voltage changes on the pin.

9. Repeat for the RTS line.

10. Locate the RxD line. Connect this line to the TxD pin and send a string again. Now you should see the Receive and Receive hex fields filled with the send string.

11. Now if any pins are not tested yet, they have to be the other modem control lines. The labels on the adapter will tell or experiment and measure. Connecting to ground or VCC with a 2k2 resistor (to be safe) will show on the display of the SerialTester program the corresponding level.

Chipsets: FTDI, Prolific, Silicon Labs, CH340

The USB Serial adapters contain a UAR/T IC, made by a small group of manufacturers.

1. FTDI. Comes with the highest recommendations. Many types. Well supported in Linux and Windows.
Due to fake IC’s made in China the current drivers check and try to make a fake inoperable.
If you encounter in Windows a non-working FTDI adapter, you cna only use it in Linux, after ‘repairing it. See here how to do that

2. Prolific. Supported in Linux and Windows.
Also due to fakes, older (not fake!) IC’s made by Prolific are not supported by the current Prolific driver in Windows. Device manager shows PL2303HXA PHASED OUT SINCE 2012. PLEASE CONTACT YOUR SUPPLIER.

Easy to solve with an older version of the drive, like in this archive. Unpack in a folder, Update driver, Look on this PC, Have disk, Browse to the folder.
Windows may ‘update’ the driver again, just rollback the update in Device Manager. For permanent fix, see also this page how to enable group Policies on Windows 10 Home and prevent any updates.

3. CH34x. I sometimes encounter problems under Linux with this chipset. Windows runs fine.


‘Blue’ closed connector with cable
Prolific PL2303
Male Dupont connectors
Black Gnd
Red +5V
Green Tx (sending data) 3.3V
Yellow Rx (receiving data)
Betemcu CH340
Status LED red, send LED blue
Edge pin connector maleGND Gnd
VC +3.V or 5 V slide switch
TX 5V Sending
Rx 5V receiving
CTS connect ground for ‘on’
Button switch of Vcc
D-Sun-V3.0 CH340
Status LED red Send blue led Received blue led
Edge pin connector male
RxD receiving
TxD sending at 3.3V or 5V
3V3 3.3V
Vcc jumper to +3.3V or 5V (no jumper 3.3 V)
5V 5V
Tienu ZX2H1911A1 PL2303HXA
Status LED red Sending green LED Receiving Yellow LED
Edge pin male
5V 5V
3.3V 3.3V
TxD sending 3.5V
RxD receiving 3.5V
Gnd Gnd
Red status LED send receive green LEDs
Edge pin male
Jumper +5V Vcc +3.V
Jumper 5V – Vcc – 3.3V
All modem signals to edges RI CTS RTS
110 baud not supported
DTR 5V or 3.3V following jumper
TX sending 5V or 3.3V following jumper
RX receiving 5V or 3.3V following jumper
VCC 5V or 3.3V following jumper
CTS 5V or 3.3V following jumper
Gnd Gnd
4D Programming Cable CP2102
Dupont female
Gnd Gnd
Tx Sending 3.4V
Rx Receiving 3.4V
+5V 5V
FTDI cable no ident,
lights in cable red (receive) green (send)
Dupont female
Black Gnd
Blue CTS 3.4V
Red +5V
Green Sending 3.4V
White Receive 3.4V
Yellow RTS 3.4V
Tienu FTDI232H
USB-A FTDI edge pin red status LED green send, yellow receive
RXD Receive at 3.5V
TXD Sending at 3.5V
3.3V 3.4V
5V 5V
FDTI basic Sparkfun female dupont bottom
Mini USB
5V 5V
TxD sending 5V
RXI receive 5V
Square CP210X Red status
LED Red LED send Red LED receive
Micro USB Male Dupont Edge
3V3 3.3V
DTR 3.4V
RXD sending 3.4 V
TXD receive 3.4V
+5V 5V
FTDI232 Mini USB
Jumper 5V – Vcc – 3.3V
All modem signals to edges. Voltages follow Jumper setting.
MBC2 cable Prolific 2303
black GND
red 5V Vcc
Green TX sending at 3.4V
White Rx
UC-2102 Cable CP210X
Male edge pin connector
DTR 3.4V
TxD sending 3.4 V
+5V +5V



Large update on Pascal

A large update to my history of Pascal and its standards, where it comes from, the early compilers, sources of first compilers, unique articles and rare books, originally scanned, written by Niklaus Wirth, Per Brinch Hansen, Tony Hoare, Dijkstra, Jim Welsh and many more. Come and see it at the school of Wirth.