SHARP:USB-cable HW-handshake

Talk in english

Modérateur : Politburo

Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 68
Inscription : 06 mai 2015 12:06

SHARP:USB-cable HW-handshake

Message par spellbound » 09 oct. 2017 23:40

This post is about how to obtain a reliable, full speed connection between a SHARP pocket computer that is equipped with an RS-232 interface and a PC/MAC. It's about utilizing bidirectional (RTS/CTS) hardware handshake so you do not need the XON/XOFF-protocol, line-delays or lowering baud-rates at all.

SHARP pockets to which this applies are (at least):
  • PC-1600
  • PC-E500 series
  • PC-13xx series
  • PC-1475
  • PC-E220
  • PC-G8xx series
  • ...
or in general every SHARP pocket with a 15pin or 11pin RS-232 interface.

There are already many solutions out there but none with a true one-fits-all approach.
Furthermore the wirings I've seen for the E500 and 1350|60 all require the activation of the XON/XOFF-protocol for LOADing.
Especially fixed wirings/cables that offer bidirectional hardware handshake for the PC-1600 in principle cannot do the same for the E500 or 13xx series and vice versa, because there are subtile but relevant differences.

In fact, I found that there are three different types of built-in RS-232 interfaces in the family of SHARP pockets:
  • PC-1600
  • 15pin Standard
  • 11pin Standard
Lets start with the USB-side of an adaptor/cable, which can be the same for all three types:
I recommend an FTDI USB-adaptor/cable with the FT232R-chip, 5V, open ended.

e.g. here:

Setup FTDI
Download the tool FT_PROG from the website of the manufacturer:
With this tool you must logically invert the signals RXD, TXD, RTS and CTS of the FTDI-chip, because the FTDI-chip exposes UART-TTL signal levels, but the RS-232 interface of the SHARP pockets operates on inverted UART-logic. This is a one-off process and the settings are persisted within the integrated EEPROM of the FTDI-chip.

So you now have a cable that exposes the following signals with inverted UART logic, 5V HIGH:

Now lets care about the specifcs of the three interface types mentioned above and appropriate wirings and settings for bidirectional hardware handshake.

PC-1600 Interface
The port pinout of that machine is as follows:

As you can see, the TXD and RTS outputs of the PC-1600 are -8.5V LOW and +5.6V HIGH.
The PC-1600 is the only SHARP-pocket, that provides true RS-232 signal levels,
which is the reason for the CE-1601L - CE-1605L beeing just cables and not level shifters like the CE-130T - CE-133T and others.
But the FTDI-chip seems to have internal clipping of negative voltages, so we can use a straight forward null-modem wiring, DTR/DSR/CD can be ignored.

Setup PC-1600:

Code : Tout sélectionner

SETCOM "COM1:",9600,8,N,1,N,N
The SNDSTAT, RCVSTAT and OUTSTAT statements are mandatory! - they activate the RTS/CTS hardware handshake for both directions.

Setup Terminal Program (CoolTerm, hterm, ...)
  • baud = 9600
  • data bits = 8
  • parity = none
  • stop bits = 1
  • XON/XOFF = off
  • RTS/CTS (RS/CS) = on
  • line delay = off
  • character delay = off
  • RTS (initial) output (button/toggle) = ON/HIGH (deactivate to pause transmission from the pocket)
Thats it for the PC-1600 :-)

Unfortunately this wiring does NOT provide bidirectional hardware-handshake for the 15pin SHARP standard interface!

15pin Standard Interface
SHARP pockets with this type of interface are the following:
PC-E500 series, PC-1350, PC-1360, PC-1475 and all others with 15pin RS-232 interface except the PC-1600.
There are two relevant differences between the 15pin PC-1600 interface and the 15pin standard interface
  • Voltage levels are 0V LOW and 5V HIGH
  • The meaning and behavior of the RTS signal
In the mid to late 1980's there was a transition in the industry regarding the interpretation of the RTS signal of the RS-232 standard towards the new RTR meaning (which was not RS-232 standard conformant).

The original, historical meaning was: RTS = "Request To Send", i.e. the computer wants to send data out and requests permission form the connected device to do so via RTS. The device then answers by CTS. The problem is, that this protocol is asymmetrical (RTS and CTS are not independent) and the computer has no means to signal the connected device to pause a data transmition going from the device to the computer, in case the latter is busy.
This soon became a big problem in computer-to-computer communication. What was/is really needed is this: By RTS the computer allows the connected device to send data to the computer. In other words this new interpretation has the meaning of "Ready To Receive" (RTR). RTR and CTS have a symmetrical meaning (i.e. supporting both directions) and are independent from each other. In fact today the meaning of RTS has "quietly" been shifted to RTR, although the label RTS has been kept.
This is also true for the RTS-signal of the PC-1600!

From the pinout below we can read that in the mid 80ies SHARP decided to deal with this problem by providing the original standard conformant RTS(RS) signal as well as an additional RTR(RR) signal for it's standard 15pin interface:

So for a wiring that supports bidirectional hardware handshake, we need the RTR(RR) signal and NOT the RTS(RS) signal from this type of interface!

Additionally at least the PC-E500 series requires a DTR/DSR/CD handshake in order to activate the interface.
So we need a respective loopback for that. That means for the SHARP 15pin standard interface we basically have this wiring:

Setup PC-1350/60 for bidirectional hardware handshake:

Code : Tout sélectionner

OPEN "1200,N,8,1,A,C,&1A"
Setup PC-E500(S) for bidirectional hardware handshake:

Code : Tout sélectionner

OPEN "9600,N,8,1,A,C,&H1A,N,N"
The terminal program config is as above (except the max baud rate of 1200 for e.g the 13xx)

11pin Standard Interface
This type of RS-232 interface is the latest in the line of SHARP pocket computers, so it is not astounding that its RTS-signal already has RTR semantics.
Pockets with this type of interface are: PC-E220, PC-G850V(S) and all other with an 11pin RS-232 interface.
Typically the 11pin interface supports different operational modes - here is the pinout for RS-232 mode:

The PC-G850V(S) sets DTR to HIGH when the interface is activated, but does not care about DSR and CD. On the other hand, a DTR/DSR/CD loopback is not harmful, so lets include it in the wiring, just to be safe.
Additionally, for the PC-G850V I found it necessary to incorporate a 10KOhm pulldown resistor to the RTS signal. Without that, the host computer has no defined LOW level and does not pause data transmission, when the G850V requests it - leading to I/O errors.

PC-E220 and PC-G850 setup:
Menu TEXT->Sio->Format
baud rate = 9600
data bit = 8
stop bit = 1
flow = RS/CS

One-Fits-All 15pin
If you want to build an adapter/cable that supports the PC-1600 hardware handshake as well as the 15pin standard, you obviously have to merge the two wirings from above. And that leads to the necessity of a toggle switch (or similar):

11pin to 15pin Adaptor
If you want a solution that supports all three types of interfaces, you could build a modular adaptor with a removable 11pin-to-15pin adapter part that has a 1:1 signal mapping and incorporates the toggle switch. The DTR/DSR/CD loopback and the RTS-pulldown resistor then remains on the part that is attached to the cable.

Here is a picture of how this could look like:
finally you can cover the open wirings by a shell or use a PCB.

I hope this was inspiring and informative.
Dernière édition par spellbound le 15 oct. 2017 14:09, édité 1 fois.

Avatar de l’utilisateur
Fonctionne à 9600 bauds
Fonctionne à 9600 bauds
Messages : 4679
Inscription : 31 oct. 2006 16:08
Localisation : 67310 Westhoffen
Contact :

Re: SHARP:USB-cable HW-handshake

Message par pir2 » 15 oct. 2017 10:12

THanks for this detailled explanation, i will see if this is applicable to the 2 USB-cables i've bought some years ago .... and never really tested :oops:

Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 68
Inscription : 06 mai 2015 12:06

Re: SHARP:USB-cable HW-handshake

Message par spellbound » 15 oct. 2017 13:58

Hopefully yes - good luck :)

btw - I just put an order for a little FTDI<->SHARP-11pin adapter PCB for some friends of mine:

(for the 11pin-SHARP<->15pin-SHARP adaptor part I already have a couple of PCBs.

I think there will be some PCBs left over that I might offer here at the forum.


Revenir vers « Silicium in english »

Qui est en ligne ?

Utilisateurs parcourant ce forum : Aucun utilisateur inscrit et 1 invité