Casio FX-880P: Reading and Writing Programs

Saving and loading programs on a Casio FX-880P

This post refers to the following Casio programmable calculators:

FX-840P, FX-841P, FX-850P, FX-860P, FX-860Pvc, FX-870P, FX-880P, FX-890P, VX-1, VX-2, VX-3, VX-4, Z-1, Z-1GR, FX-603P

These calculators are compatible with the Casio FA-6 Cassette Interface however given the rarity of that hardware, and the difficulty in using magnetic tape to record and playback the software on these, I though I’d explore various ways of transferring data to and from these calculators.

Option 1 Cassette Interface

Buy the FA-6 cassette interface that has a serial interface built in or use the cassette interface to capture the data as audio, not recommended.

Option 2 Build Your Own Cable

You can find the specs online to build your own serial cable like this guy did:

http://blog.damnsoft.org/rs232-ttl-adapter-for-vintage-fx-casio-calculators/

Notes on making a custom connector

Or another method…using the parallel cable and LPT on your computer:

Take a cable like that connecting your printer to the parallel port of your PC. This should have 25 pins on the PC side and 36 pins on the printer side.
Open the printer connector and search for the numeration of the pins, from 1 to 36. Write the colours of the cables connected to pins 2, 10, 11 and 19.
The connector of your calculator should have 30 holes, and you can adopt this for them using only the four noted above that need to be connected to the calculator like this:

Casio Pin↔PC LPT Pin—>Signal

5↔2 —>Data

21↔10 —>ACK

22↔11 —>Busy

30↔19 —>GND

However, most of us don’t have electrical expertise so that’s why I recommend…

Option 3 Casio Serial / USB Adapter

This is the adapter I bought to connect the somewhat proprietary Casio connector RS-232/serial port:

https://www.casio880.com/en/product/interface-cable-for-calculators-casio-fx-880p-and-fx-850p/

or here:

https://www.ebay.com/itm/Cable-Interface-USB-Casio-FX-880p-FX-850p-etc-FA-6-/162315613859

At the time of writing, these are listed for 65-70 Euro. This calculator is designed to connect to the FA-6 cassette interface and that provides audio, serial and parallel ports to save and load programmable content to and from the calculator.

If you are still interested in using the audio interface to save and load , stay tuned for a future blog post on that one.

Ideally your Windows PC or Mac has a physical serial port but these days, that is very unlikely unless your machine is very old. I tested this running Windows 7 using VMware Fusion on a Mac but it also applies to any Windows PC running Windows 7 or newer.

If you have a Windows PC you should be able to plug in the USB/Serial Adapter and the drivers should load automatically. If you are on a Mac read the next section on configuring that using VMware.

VMware and/or Windows Serial Port Configuration

  1. Enable serial port in (VMware) BIOS

  2. Add serial port to list of devices

  3. Power up the (virtual) machine

  4. Plug in the USB / Serial adapter

When prompted, choose to connect it to the Windows guest (not the Apple host in my case).

Windows should add a driver, mine tried to download one via Windows Update but failed so I downloaded FTDI drivers from here:

https://cdn.sparkfun.com/assets/learn_tutorials/7/4/CDM21228_Setup.exe

or visit here

https://www.ftdichip.com/Drivers/VCP.htm

and do a manual driver update/install.

Check Device Manager to see if the COM ports show up and are configured. There should not be a question mark next to the serial port or USB ports listed there.

I installed drivers in Windows 7 32-bit and device manager now sees both a Communications Port (COM1) and a USB Serial Port (COM3). I think it allocated COM3 as the BIOS reserves COM1 and COM2 in “hardware” so it allocates the next available port but some machines allocate a high number like COM15 or higher.

To see which ports you have available, start the Command prompt as Administrator from the run box on the start menu. Then run the MODE command which will display all CON and COM ports available to the machine.

MODE

You should see the serial port(s) added to the virtual serial port; in my case COM3. This was enough to get it working for me however, the VMware documentation says you may need to tweak the BIOS settings to get his to work so YMMV.

The operating system also has default settings for the COM port so you need to configure it to match either the calculator defaults or the settings you use when connecting. I used 2400, N, 8, 1. To set the COM3 port to this, run the following on the command line as administrator:

MODE COM3 BAUD=2400 PARITY=N DATA=8 STOP=1

Test load from the prompt prompt by opening the LOAD command on the calculator and type this at CMD prompt: 

set /p x="10 PRINT Testing" <nul >\\.\COM3

Calculator Configuration

Note: if you change the calculator batteries you should change either the large ones or the small one to preserve the memory and any programs. If you have wiped the whole thing or the batteries are both completely flat, replace the CR2023 batteries and press the reset button on the back after you first power it up. You may need to press All Clear on the front as well then you can use the calculator again. 

Casio RS-232 Serial Interface Specs

The Serial Interface is asynchronous full-duplex that is configured as a set of parameters either on the “command line” of the calculator or in code that is executed at run time. 

Port		: COM0
Baud rate	: 300 bits/second
Parity		: Even
Data bits	: 8 bits
Stop bit	: 1 bit
CS		: not used
DS		: not used
CD		: not used
Busy		: XON/XOFF
Code		: SI/SO not used

The default values for all parameters are COM0:2,E,8,1,N,N,N,B,N

Casio RS-232 Serial Interface Syntax

Example 1

10 REM Send to serial port

20 OPEN “COM0:2,E,8,1,N,N,N,B,N” as #1

30 PRINT #1, “HELLO”

40 CLOSE

Example 2

10 REM Receive from serial port

20 OPEN “COM0:2,E,8,1,N,N,N,B,N” as #1

30 INPUT #1, A$

40 CLOSE

Example 3

Write the contents from program area P0 to the computer on the connected COM port at 2400 baud

Mode 1 SAVE "COM0:5,N,8,1"

Example 4

To write the contents from the computer COM port at 2400 baud to program area P0

Mode 1 LOAD "COM0:5,N,8,1"

Example 5

Read from COM port and write to P0 at 4800 baud

Mode 1 LOAD "COM0:6,N,8,1"

Notes on Baud Rate

With 1 start bit, 1 stop bit, 8 data bits and no parity bits there are 10 bits/baud. 300 baud *10 = 3000 bits/second or almost 3Kb/s or 3000/8 bits = 375KB.

# = Baud Rate

1 = 150

2 = 300

3 = 600

4 = 1200

5 = 2400

6 = 4800

Cassette Interface syntax

CAS0 = Positive Phase (default setting)

CAS1 = Negative Phase

e.g. read a file named TESTFILE using positive phase at 300 baud

OPEN “CAS0:(S) TESTFILE” FOR INPUT  AS #1

e.g. write file named SAMPLE at 1200 baud

SAVE ”CAS0:(F) SAMPLE”
LOAD"(S)" 300 baud
LOAD”(F”) 1200 baud

MacOS USB/serial adapter detect

ls /dev/cu*

Then use the right “serial” port for the terminal session e.g.

screen /dev/cu.usbserial-12345678 2400

Ctrl-A Ctrl-\ Y to quit

or

minicom -s

and select the COM port settings then press Esc to initialise the modem

Ctrl-A Q to quit.