Close

"FTDI"-type USB-Serial link?

A project log for Vintage Z80 palmtop compy hackery (TI-86)

It even has a keyboard!

eric-hertzEric Hertz 08/26/2021 at 00:470 Comments

Now, it seems, rather than working on my FLASH backup software (which was an offshoot/tangent of my original project goals, and which also got offshot for several weeks), I've become somewhat fixated on the idea of a new "homebrew" graphlink, using one of the many now-commonly-available USB-to-Logic-Level-Serial-RxTx adapters, e.g. the "FTDI" built-in to most arduinos...

Personally, I'm rather fond of the PL2303, And I built my college research project with a CP2101 (as I recall), Though, an FT232, etc, would also do the job, /sans/ the RS232 level converter found in retail USB-RS232 converters... I'm talking about the little boards I'm almost certain are a few bucks from sparkfun or adafruit, these days.

...

The idea is: wire-up the Tx to the "white wire" and Rx to the red. Maybe add a pull-up resistor. Ground, of course. And bam you've got yourself a $5 USB graphlink that works with TILP.

But, this isn't an easy task, making this possible.

... Though, it's mostly software, which most folk would never see the inner workings of.

So, here's an overview of the inner-workings, starting with an "It's not /that/ easy, even for the end-user"

The thing is, the TI linking protocol, at the lowest level, is not /at all/ compatible with Asynchronous Serial of the sort coming from such USB converters, (or a real serial port with a MAX232-like level-shifter, if you'd prefer).

So, this creates a chicken-egg problem. If you want such a simple/affordable/ubiquitous interface between your calculator and your computer, you've got to teach the calculator how to communicate with it.

If this were the era of my middle/high school years, that'd simply mean asking Bobby in Math Class to download the utility from his calculator. But, I get the impression TI-8x "sneaker-net" isn't nearly so common these days. So, you could download the utility off the internet, but how would you transfer it to the calculator, when you need that utility on the calculator to download the utility from the computer onto the calculator?

Right. So, for the user, it wouldn't be /exceptionally/ difficult...

The TI-86 allows you to enter custom programs by-hand in hex-code.

Get a calculator from Goodwill, grab the "FTDI" you've already got in your drawer, type in some hex, load up TILP, select "upload AsyncLinkUtility" then, thereafter, it just works.

.

Now, forgetting for a moment how much friggin' work it would be to make it that simple for the user...

I gotta wonder how much is reasonable to expect of them.

So far, it seems, it'd be about 32 hex-codes that have to be hand-entered (in hex, 64 characters) just to create /a container/ for the utility which will later be uploaded.

OK, then we need /more/ hex values for the calculator to understand the bytes coming in from the computer's Tx line... I'm guessing also somewhere around 32 bytes to be hand-entered.

I /think/ it could be done about that small... about 128 characters to be typed, and 64 spaces. Typed /correctly/ mind-you!

I dunno, that seems like a lot when there are other options from the parts-drawer. OTOH, those other options are also lacking in many ways. 

Also, as far as I know, the TI-86 is the only one which /can/ run hand-entered applications. So, this'd be useless for TI-85's, 83's, etc. (Lacking sneaker-net).

...

Another option is just to throw a microcontroller inbetween. And, in this era of arduinos and such, that's not a huge ordeal--for someone proficient-enough to wire-up an "FTDI"--to wire-up and program. Maybe even less-so than hand-entering the upload utility. The microcontroller speaks native TI linking protocol on one side, and Async Serial on the other (maybe even acts as a USB-CDC serial converter). 

This option, really, is /way/ better, in a lot of ways. E.G. it wouldn't interfere with normal linking with other calcs, and it doesn't require special utilities on the calc. But, not everyone has /the/ arduino sitting in their drawer... whereas, I think they'd be more likely to have an "FTDI" of any manufacturer.

...

So, realistically, the "FTDI" route is a bit niche, maybe, and would be a LOT of work... it probably doesn't make sense.

But, that's where the brain is at these past several days.

I think it can be done. I think it can even be done without need for level shifters from 6V to 3.3V logic.

I keep convincing myself it's a fool's errand, yet keep getting new ideas that I have to look into. The latest being: how much code would it take to upload the full utility into a TI-OS "program" container/variable... about 32 bytes, minus the actual communication.

Doable.

...

FYI, regarding 3.3V logic levels: the TI-86 has a diode after the 6V pull-up resistor on its "input".  The input can be turned into an output. Driving that side of the diode low would effectively remove the 6V pull-up from the wire. Thus, using that wire as essentially an open-collector /output/, a 3.3V pull-up resistor can be added to the 3.3V ["FTDI" or microcontroller] input (if it doesn't already have one).

That leaves, then, the /input/ wire, Rx on the calculator, wired to the 3.3V Tx output from the "FTDI"... this is where the concern lies, despite its seeming backwards to worry about a low-voltage output driving the input of higher-voltage logic. The problem is the 6V pull-up resistor can't be disabled in this case, so that resistor /could/ send current into the 3.3V output, when it's driving high. When driving low it's not a concern, the low-side output transistor is designed to take current in. When driving high, though... it's designed to put current out. Most likely it won't be an issue, that current would be tiny... it might feed back into the positive rail, some circuitry might get 3.4V instead of 3.3... it might be fine. OTOH, it could be a problem. Being an /output/, it may not even allow reverse current. And then there'd be 6V on your 3.3V-rated pin.

Anyhow, I dig the ability to disable the pull-up...

....

And, yahknow, I've convinced myself again this is a "fool's errand," isn't at all necessary for my goals for this project, probably wouldn't be made use of by many, would require a tremendous amount of coding in things I still know little about, so on... yet can already barely resist thinking about how to achieve it. Heh!

Discussions