Post Reply 
Connecting Sharp PC-G850VS to PC
02-12-2023, 03:07 AM (This post was last modified: 02-17-2023 06:04 PM by robve.)
Post: #12
RE: Connecting Sharp PC-G850VS to PC
(01-18-2023 10:29 AM)polbit Wrote:  SUCCESS!

A new FTDI adapter did the trick! Now I just need to make it into a permanent cable with the 10k resistor, and I am in business.

Great to hear! But others have not been so fortunate to get the DIY FTDI adapter for the PC-G850(V)(S) to work. There are several reasons why it may fail. Some are obvious, but the FTDI CST input issue and 3.3V versus 5V FTDI adapter wasn't obvious to me, since the PC-G850 UART operates at 5V.

I'm posting my notes here in case someone finds this useful or would like to comment.

Checklist to avoid problems
  • Adafruit FTDI Friend (FTDI FT232R device) works fine at 3.3V with the PC-G850(V)(S) that uses 5V. I also tried FTDI at 5V by switching the solder jumpers, but wasn't able to send files from the PC-G850 to the PC any longer. I checked everything, continuity, voltage levels, tried another FTDI, etc. Changing back to 3.3V worked again. So 3.3V is probably best (?)
  • The PC-G850 UART signals are inverted. Therefore, the FTDI RXD, TXD, CTS, RTS signals must be inverted. Other non-FTDI chips may not be reprogrammable to invert the levels, such as SparkFun Serial Basic breakout.
  • Sending files with minicom doesn't work reliably on my MacOS M1. After experimentation I found this to be an FTDI driver bug (see next post, because MacOS Intel and Windows appear to work OK). Hardware flow control is supposed to prevent this problem, but apparently the FTDI driver 1.5.0 for MacOS M1 is not respecting its inverted CTS input connected to the PC-G850 RTS? The adapter has a pull-down resistor for the PC-G850 RTS level, which should work to let the PC wait before the PC-G850 is ready, but it doesn't? In my case, measurements show 0.07V for RTS inactive (not ready to receive) and 3.3V for RTS active (ready to receive), which means the signals are OK. To work around this, I added ascii-xfr option -l100 to wait 100ms between lines sent (e.g. see minicom settings below).
  • A power-only USB cable isn't suitable to connect to a FTDI breakout.
  • Install a FTDI driver CP210x or VCP for MacOS/Windows/Linux.
  • UART settings on the PC-G850 and minicom (or picocom etc) should match obviously (e.g. see settings below).
  • Be careful to avoid ESD that can destroy the PC-G850. When connecting the DIY adapter to the PC-G850 discharge static first.
  • When receiving a file on the PC-G850 (TEXT Sio Load), letting the PC-G850 automatically add line numbers is not a good idea, because lines that start with a digit will make the resulting concatenated line number unusable. This may happen when the TEXT Sio Format is set line number = no. Setting line number = yes at least produces an error.
  • When using a microcontroller instead of FTDI to connect to the PC-G850, a level shifter must be used, such as the 74LVC245. Most microcontrollers operate at 3.3V and are not 5V tolerant.

[Image: FTDI-adapter-2.jpg]

My parts list
- Adafruit FTDI Friend (or SparkFun FTDI breakout 3.3V or TTL-232R cable)
- A PCB mount male header breakable with 17 pins or more, for 11 pin + 6 pin connector
- 1.5mm thick polystyrene sheet to construct an adapter box
- 10kOhm resistor

The FTDI Friend 6 pin connector aligns with the PC-G850 11 pin layout for a null modem connection. FTDI VCC is not used. Solder 5 wires of 1.5cm (0.6in) in length to connect a 11 pin header to a 6 pin header as follows, see PC-G850(V)(S) Users Guide:
6 pin   11 pin
1 GND   3 GND
2 CTS   4 RTS
3 VCC   -
4 TXD   6 RXD
5 RXD   7 TXD
6 RTS   9 CTS
Also solder the 10kOhm resister between GND and CTS (CTS on the 6 pin side). The resistor is placed length-wise, parallel to the wires.

The adapter box
I made mine with polystyrene, which was a lot simpler than 3D printing. I also cut two matches (the ones that come in a larger box that are thicker and longer than the standard matches) which I superglued to form the edges of the box. The diameter of the matches are exactly the right width to form the box: the connectors fit perfectly. Then a few dabs of hot glue to close the box.

[Image: FTDI-adapter-1.jpg]

Settings and operation
Use FT_PROG FTDI programmer to invert UART RXD, TXD, CTS, RTS.

PC-G850(V)(S) press TEXT then Sio Format to set to baud rate = 9600, data bit = 8, stop bit = 1, parity = none, end of line = CR LF, end of file = 1A, line number = yes, flow = RS/CS

To connect with minicom:
$ minicom -b 9600 -8 -D /dev/tty.usbserial-2 -c on
where /dev/tty.usbserial-2 is for MacOS with Adafruit TDFI Friend and may differ for other OS.

Minicom settings for file transfer are set with CTRL-A Z O then select "File transfer protocols" then add or change the ascii setting:
I ascii /opt/local/bin/ascii-xfr -ens -l100 Y U N Y N
J ascii /opt/local/bin/ascii-xfr -enr Y D N Y N

where /opt/local/bin/ascii-xfr is for MacOS and may differ for other OS.

Set the PC-G850(V)(S) to receiving by pressing TEXT Sio Load. Then send a file with minicom CTRL-A Z S select one file to send.

PS. Sending files as WAV files created with PocketTools the cassette interface CE-126P is at least as fast as the serial interface, but never has any reliability issues Smile And you get a nice little printer that also serves as a battery backup for the PC-G850(V)(S) Big Grin

PPS. See also Silicium about USB cables with HW handshake with the FTDI chip and various Sharp Pocket Computers.

- Rob

Edit: mention FTDI drivers and ESD, add comments, add RealTerm observations.

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Connecting Sharp PC-G850VS to PC - polbit - 01-15-2023, 02:07 PM
RE: Connecting Sharp PC-G850VS to PC - robve - 02-12-2023 03:07 AM

User(s) browsing this thread: 1 Guest(s)