FTDI USB and BASIC 3
1802 Membership Card


Introduction

Web page last updated Jan 9 2021. A USB to TTL adapter with FTDI brand FT232 series chip, is shown in installation and in use with the Rev J 1802 Membership Card, and with the Lee Hart / Chuck Yakym BASIC 3 ROM "MCBASIC3J.bin" for Rev J. In 2020 we added connection information to the 1802 MC CPU board in use only without the front-panel card.

For more information on USB to serial adapters and the 1802 M/S card (or other uses), check this Web page of TTL USB notes.

Note: The information on this Web page is not guaranteed to be complete, accurate, or correct. Use this information or the products mentioned, entirely at your own risk. There are many kinds of USB to TTL boards, with other brands of USB serial controllers. And of course, I cannot warrant that device's use on someone's computer, or how someone operates their computer. - Herb Johnson

FTDI-chipped board

[FTDI] [FTDI]

This particular board was distributed in May 2018, by "sukra" via Amazon. This is one of a number of USB-TTL adapter boards sold with the FTDI brand FT232R USB serial chip . Look for that brand and model (FT232RL, FT232RU, etc.) There's also USB cabled products, which encapsulate the FT232R chip and are terminated with leads to provide individual female connectors. There are many brands of these boards and cables, and various prices. Again, I cannot warrant any of these products myself.

Check the FTDI manufacturer's Web site for "Virtual Comm Port (VCP) FT232R" drivers, and for FTDI brand FT232R chip docs on the FT232R chip and driver.

So, look for one of these boards from some microcontroller or hobby supplier or a supplier on Amazon, Ebay, etc. On the board, there's a number of solder-holes, to connect to most of the chip's pins. They are ignored for this use. Of course the micro-USB connector is cabled to your computer; the 6-pin pins connector will be wired to the power/serial connector of of the Rev J 1802 M/S Card front-panel. If you are only operating the 1802 Membership Card CPU board, also read this linked material.

[FTDI]

At the connector end of the USB board, are the six TTL and power lines. As in the photo, with the boards component side toward you and the connector down, the lines are left to right: DTR, RX, TX, Vcc, CTS, GND. There's a jumper across RX and TX for loopback testing. Above the connector, there's a jumper block which selects either 5V or 3.3V operation of the board; it's jumpered for 5 volt operation, and so connects Vcc to the USB's 5-volt supply.

The card has nice features. There's TX and RX LEDs which are active when those lines are active. Of course there's a power LED to show USB power is active.

[FTDI]

Here's an approximate schematic, I don't guarantee it will match your board. Essentially the board brings out the pins of the FTDI brand FT232R chip. The link is to my copy of a PDF of the FTDI FT232R document. The board has TX and RX LED's to show serial-side operation, a power LED to show USB power. There's a 3.3V/5V jumper, set it to 5V for the 1802 M/S Card. YOu can jumper TX and RX conveniently, for a local serial loopback test of the board. I suggest you verify the operation of the board in loopback, with your installed FTDI driver and with your comm software, before use on the 1802 M/S card.

FTDI serial logic

[FTDI]

Here's the "active logic" of the FTDI card's serial TX and RX. When serial is "inactive", no characters in progress, the TX and RX lines are at 5 volts. When a character starts, the "start bit" is 0 volts; that's considered the "active" voltage level. Next, the serial character's bits are either 1's or 0's - least signifigant bit first, a "1" bit is 5V and a "0" bit is 0V. Then, the "stop bit" is inactive and so is 5 volts. Some would say, this "logic" is "active low" because the data bits are 1's when the voltages representing them are zero volts. I'm sorry if this is confusing; it confuses me and has confused many other people through the decades. - Herb

So an ASCII character 4 as ASCII 34 hex, as 8 bits no parity, would be an 8-bit frame of "0 0010 1100 1" in order from left to right, start bit, 8 bits, stop bit. The oscillograph image shows these "bits", again a "0" or start bit is near the top of the image (5 volts) and a "1" or stop bit is graphed near the bottom of the image (0 volts). (Of course the image represents "0001011001", all the bits in immediate succession, then inactive "1"'s following.)

Other hardware signals on the FTDI card are RTS and DTR. Study up on these "RS-232 hardware handshake" signals if you are interested. We will only use DTR, which is "active low" or 0 volts when the FTDI card is in data-operation and powered. That will be discussed later.

The FTDI software driver (or the communications program that calls the driver) sets up the serial features of 7 or 8 bit, parity, baud rate, etc. Those have to match the serial features, of the software on the 1802 Membership Card. That's discussed next.

FTDI Windows driver

[FTDI]

I connected the device to my Windows 7 box, with no FTDI drivers previously installed. I wanted to see what "device" Windows would see. The image shown here, shows that the device is seen as "FT232R USB UART". That's what we want, it appears to confirm the chip on the board "is" a FT232R USB UART device.

[FTDI]

The FTDI driver is obtained directly from FTDI themselves, to be downloaded and then installed. Possibly, the seller of your board or cable will recommend a Web location for a driver. Use reasonable caution when downloading and installing ANY software, it's at your own risk. You can either download an executable which installs itself; or install yourself.

You install yourself by downloading a ZIP set of driver files, unZIP them into a folder. When you plug in the device, it won't see a driver and it will grouse. Then operate Window's Device Manager to direct Windows to "look for the drivers" in that directory.

The first install or use may issue complaints. But after unplugging and plugging in the USB device after driver install, it appears to sort itself out. This is not a full explanation of how to install Windows device drivers. Seek other advice or information.

[FTDI] [FTDI]

The loaded device driver on my Win 7 box, sets itself up as "COM 4" as shown. Under "Port Settings", you can directly control the usual UART features - baud rate, bits, parity, etc. - from the Device Driver. Under the "Advanced" button, you have "advanced settings" for the USB serial buffers, and some options such as "latency timer", "timeouts", and so on.

Communications (serial) programs

I'm using Windows and Hyperterminal. There are other operating systems, and other serial communications programs. I'm not gonna argue the merits of these over others. Things I'll do to make Windows and Hyperterminal work for me, are about the same for other operating systems and other programs for you. Advice: read the manual or documents, look for hidden features and settings. For instance: make sure your comm program can address the same "COM port number" (COM1, COM2, etc.) that the FTDI/USB driver "opens" as a serial port (Lee Hart). Good luck! This is not a how-to book on use of Windows or device-drivers. - Herb Johnson

Cabling and backup power

[FTDI]

The FTDI-chipped board has a mini-USB connector, so you'll need a mini-USB to USB cable to your personal computer. Get the correct mini-USB for the board you obtain.

The FTDI-chipped board has male pins, as does the 1802 M/S Card power/serial connector. It was convenient to obtain a bundle of these. They are made from colored flat-cable, for use with those plugboard breadboards. On Amazon and Ebay I found them as "Breadboard Jumper Wires Female to Female Ribbon Cable 20cm". Several dollars bought 120 different male/female pairs; for a few dollars you can get female/female only. If you use an FTDI-chip based USB cables with female-pinned end wires, obviously you won't need additional connecting cables.

Cabled as described, the FTDI card is powering the 1802 MC with USB power. Be sure the FTDI dongle is jumpered to provide 5V and not 3.3V. If you power your 1802 MC seperately, Don't connect the FTDI Vcc to the 1802 MC, and read the note in this document about "parasitic power".

Note on Membership Card memory backup. The 1802 M/S card has a supercap, to hold a voltage on the RAM when the card is not powered. That's useful for programs you've stored or toggled in! But when the FTDI card is wired-up to the M/S card - the FTDI card will drain the supercap voltage when the FTDI is not USB-powered. I don't have a great solution beyond "disconnect all the FTDI wires"; you can disconnect the GROUND wire and that reduces the supercap power drain. Read the 1802 M/S card manual about the "supercapacitor". Also read the note in this document about "parasitic power".

Loopback and power tests

FTDI and comm program, hardware loopback

[FTDI]

I connected the USB/TTL board to the Rev J Membership Card as follows. First, Vcc to +5 and GRN to Gnd - those provide DC power to the M/S card. Next, the USB card has its TR and RX pins shorted - that's for "hardware loopback" testing of the FTDI USB board, it will "echo" back any serial characters sent to the FTDI board by your comm program.

Next, to operate the Membership Card, the USB board "/DTR" pin (output) is connected to the M/S card "/ON" pin (input). When DTR is active, it's logic-low or 0 volts. The M/S Card /ON needs a logic low to enable the M/S card's displays and the 1802 microprocessor and logic. When a Windows comm program (like Hyperterm) operates or "calls" the USB/TTL card (as COM 4), the program will enable DTR (drive it low) and thus enable the M/S card. When Hyperterm "disconnects", DTR will be driven high and disable and reset the M/S card.

So, with these cables in place - Vcc, GND, and /DTR to /ON, and the FTDI TX and RX shorted, I was able to loop-back test the USB-TTL adapter. I also confirmed the M/S card would power-up, and enable/reset when the comm program toggled DTR. With DC power and the FTDI card "active" from the comm program, I could operate the M/S card, toggle in patterns in memory, and verify the M/S card was ready for use.

Software loop through the M/S card

For serial testing with the 1802 M/S card, you have to connect Tx and Rx through to the FTDI dongle; and have some kind of operating software on the 1802 Membership Card to respond to serial data. Those connections in detail, and use with the BASIC 3 Rev J ROM, will be described later.

But if you wish, without the IDIOT monitor or BASIC3 ROMs, you can toggle-in into the M/S card, a simple software loopback program which copy the serial-in signal on /EF3 to the serial-out signal on Q. Simply put: remove the TX/RJ jumper and connect RX of the FTDI to TX of the M/S card; and TX of the FTDI to the RX of the M/S card. (You can look ahead to the BASIC 3 tests, to see some wiring photos and descriptions.)

The simplest software loopback is to test EF3 and echo its value (or its inverted value) to Q. To "invert", swap the BN3 and B3 instructions in the code below. We will use this test, with the FTDI card connected and operating, to confirm the FTDI card is connected, the serial communications program is operating, and the 1802 Membership Card *hardware* is operating with this simple software. There's more serial loopback programs among these M/S Card test programs.

   0000                     	ORG    0000H        ;
   0000   7a            L0:	REQ    ;clear Q
   0001   3e 00         L1:	BN3    L0    ;loop to clear Q while EF3=0
   0003   7b                	SEQ        ; but when EF3=1, set Q
   0004   30 01             	BR    L1    ; and keep checking EF3.
                        ;if /EF3 is high, EF3=0, Q -> 0 over and over
                        ;if /EF3 is low,  EF3=1, Q -> 1 over and over. 

Connections and Tests with BASIC 3 ROM

Connections to the 1802 Membership Card

More information on the 1802 Membership Card is available on my home page for that product. Owners of the complete kit who build the CPU and front-panel boards, can read the manual. The front-panel board for Rev J and later has a combined power and TTL serial connector P4 with serial, power, and reset signals available. I'll also describe connections if you use the 1802 MC CPU board by itself, to its 30-pin connector.

[FTDI]

(The section above, described a software loop test through the M/S card; if you wired up TX and RX already, you've already looked at and performed these wiring instructions.) Otherwise, these are instructions and photos for wiring the FTDI board to the 1802 Membership Card front-panel P4 connector, for use with the comm program you'll use to "talk" to the M/S card.

You can follow the colored wires in the photos, and the pin connections are listed below. The color of wires I used were a matter of convenience, but I recommend RED for Vcc and BLACK for GND because those are expected colors and those connections are signifigant. Of course, if you use some other USB/TTL product, read its documentation and the 1802 M/S card documentation for the correct connections.

[FTDI] [FTDI]

FTDI wire front-panel P4
GND blk - CTS (key) Vcc red V+ Tx yel RX Rx gre TX DTR ora /ON

If you are running the 1802 MC CPU board by itself, there's corresponding pins for power, serial and /ON (reset) on the 30-pin interconnection pins on P1. Reference your CPU board's documents for details.

[FTDI] [FTDI]

FTDI  P1 pins
GND     "-" 30 or 1
CTS  --
Vcc     "+" 14
Tx      TX  12
Rx      Rx  26
DTR     R=  13 (or short P1 13 to 14 if you don't use DTR)
        w=e short P1 10 & 11 

For testing the FTDI board as a USB serial device, you can short the FTDI chip board's TX and RX. Then the chip will "loopback" to your computer. Again: the 1802 M/S Card's /ON connection MUST be logic-low (ground) for the M/S front-panel to operate. Of course the M/S Card must have Vcc and GND connected to the FTDI-chip board for DC power. And of course, TX and RX connected for communication. With the /ON connected to the board's DTR, when the USB serial connection is "active" or "called", DTR will be driven low; when "disconnected" DTR will be driven high. (Your serial software may use other terms to describe the action of DTR.)

[FTDI]

...And here's the results. Setting Hyperterm at 4800 baud, 8 bits, no parity, 1 stop. The card, incidently, has a 4MHz ceramic resonator. So BASIC thinks it's running at 2400baud (he he). But the prompt came right up. The correct answer is "C" to the C/W? question. Subsequent testing of BASIC 3 and the 1802 M/S card and the FTDI-chipped board, seemed to confirm general operation for some hours. Read the BASIC 3 manual supplied with the ROM image for further information of use.

FTDI USB and other Membership Card programs

The FTDI USB dongle also works with Tiny BASIC. Check the linked Web page for a description of Tiny BASIC with the IDIOT ROM monitor, and how to set it up to run with the FTDI device. I found some issues on the 1802 side, see the "cautions" notes below. In any event IDIOT shows you how to operate the serial interface in 1802 assembly language. It's a useful ROM monitor, too. - Herb

Cautions and a request

Parasitic power

... is a condition where the FTDI dongle starts to power the COSMAC computer, even if the FTDI Vcc is not connected through to the Vcc (+5V) of the COSMAC. The current from the TTL logic-high TXD and DTR is enough to run the 1802 Membership Card! Or at least try. Of course, if you power the 1802 MC from the FTDI dongle, this is not a problem.

The solution, if you power your COSMAC or 1802 MC seperately, is to put a backward isolating diode between the FTDI TxT transmit, and the 1802MC RXD receive. And on the 1802MC side of the diode, add a 22K resistor to Vcc. So when the 1802 MC is unpowered, its Vcc (and resistor) is grounded. So TXD from the FTDI can't raise the voltage above a diode voltage-drop (.6V) through the resistor. When the resistor is powered on the 1802 MC side, the diode only adds a voltage-drop to the logic-low.

                        22K
                      |\/\/\----  Vcc 1802 MC   
              __|/ ___|___________
    FTDI TXD    |\                RXD 1802 MC

This was called to my attention, by a discussion in cosmacelf groups.io in Nov 2020 by Todd Ferguson, discussing his ELF-ish 1802 computer and the problem cited. Details are in this note extracted from the discussion. - Herb

non-FTDI USB serial-to-ttl boards

If your USB serial "breakout board" doesn't have the FTDI FT232 chip, it has of course some other product. You will need that product's Windows or Linux or OSX USB drivers, they will install differently. It may have TTL connection pins in some different order. It may not include DTR or CTS. So, consider the information here as clues about what you have to do.

fake FTDI chips and bricking

In 2014, there were knock-off FTDI FT232 chips produced and distributed in products. FTDI's response was to provide a Windows driver that "bricked" any fakes - made them inoperable. End-users were unhappy about this, and FTDI withdrew that driver. It's unlikely in 2018 you'll find such a driver; you may find Web pages which describe how to "unbrick" a chip. But in 2016, FTDI distributed another driver which detects fake-chips, and the driver returns an unexpected warning text "Fake FTDI chip detected" in use. It's unclear in 2018, if FTDI continues to distribute that class of driver. Apparently, Linux drivers did not have these "features".

In 2018, legitimate FT232RL chips are distributed by major suppliers for about $3 each; so devices with legitimate FT232RL chips should cost several US dollars each. If you buy a "FTDI" USB adapter for $2, $3 or so, even if it appears to have a FTDI-labled chip, it may be "fake" - it has a microcontroller not from FTDI and it may not work at all speeds and all conditions. Each FTDI chip has a unique serial number output; fakes have the same serial number and a Web search will likely verify common faked serial numbers.

Arguments about FTDI's actions, FTDI's responses, and workarounds are available on the Web.

7 bits versus 8 bits; UT4, IDIOT, Tiny BASIC

I've used the Rev J and FTDI with the IDIOT ROM monitor, and it works with Tiny BASIC with IDIOT; but there's a problem, and a fix. These old RCA programs, use "7 bits Mark parity" and so do confusing things with the 8th "parity" bit. So, I had to set Windows Hyperterminal for "8 bits no parity 1 stop" and also change "settings" under "ASCII setup" to "force incoming data to 7 bit ASCII". Careful and painful oscilloscope work, showed me that IDIOT/UT4/TinyBASIC will "produce" ASCII characters with 7 bits and "mark" parity for the 8th bit, which looks like ordinary 8-bit ASCII. But they "echo" 7 or 8-bit characters with bit 8 "on" and so those look like old-school IBM PC graphics characters. So you need to set your comm program for 8-bit no-parity ASCII *and* ignore the 8th bit on recieve, to avoid this problem.

The 4-way version I have of IDIOT provides an "IDIOT-1" version that matches the "active RX and TX" state of the FTDI board with Rev J. One of the four versions should work - but you need to do what I've described above. If that gets fixed, it will be described on the IDIOT Web page. UT4 and TinyBASIC - good luck! ;)

Other commentary about USB-to-serial dongles

Jan 2021: Comments from my vintage computing colleages about these USB serial dongles, can be summarized as follows. 1) RS-232 to USB may not provide sufficient EIA voltages or currents for old or industrial devices. Watch out for that, consider building a robust RS-232 hardware interface. 2) "Dogey device drivers" may limit one's control of these dongles. 3) USB 1.1 ports on older PC's may have limitations. 4) If one brand/model of dongle (the controller chip, the manufacturer) doesn't work, try another. Some of these may be fakes or just poorly made. 4) Consider a vintage computer instead of a modern computers. - Thanks to my friends, Herb.

Your results may vary

I've taken considerable time and effort, to describe my actions and provide this detail of information, in case the reader encounters some issue or problem. Some detail I provide, may be of particular help or suggest a strategy to resolve problems. I cannot account for every detail or action or possible issue. If there's any information here, which is incomplete or incorrect or inaccurate, you are welcome to contact me; I'll consider modifications accordingly. Thanks and good luck with your use of the 1802 Membership Card, and use with the products mentioned or other similar USB/TTL products. - Herb Johnson


This page and edited content is copyright Herb Johnson (c) 2021. Contact Herb at www.retrotechnology.com, an email address is available on that page..