Index wersja polskawersja polska

Casio FX-602P - hardware

Random Access Memory

The uPD444G appears to be an smd version of a standard 1024 x 4-bit static RAM chip uPD444C.
On the uPD444G pin diagram below the GND (negative supply voltage) and VCC (positive supply voltage) labels conform to the original uPD444 data sheet. In the FX-602P they are reversed, because the positive rail is used as a ground reference.

uPD444G pin configuration


The Expansion Port

expansion port

Pin functions

Expansion
Port Pin
Symbol Function
1CEChip enable output, active high
2GNDGround (positive supply voltage rail)
3D8Data input/output (bi-directional)
4CONT-3V when operational, 0V when stand-by
5OPSelects the Command Register (OP=0) or Data Register (OP=1)
6VDD1-3V (negative supply voltage rail)
7SPClock output

The waveforms

FX-602P expansion port waveforms

The voltage swing of logical signals is 3V. Negative logic applies, i.e. high level is assumed as logical 0, while low level as logical 1.


The Cassette Interface

The FA-2 cassette interface uses the same HD43110 controller chip as the FA-3 one, so the tape interface protocol used by the FX-700P applies to the FX-602P as well.

Additional commands used by the FX-602P

Code Function Description
001100Wait This command suspends the data transfer for a while when reading from the tape. The calculator issues it after loading of the file header, then reads a single data bit. The meaning of this value is unknown to me (the interface always returns 1).
110100Counter This command defines the frequency of the music tone. It expects an 8-bit value (the least significant bit first).
frequency = 32768Hz/value
001110Play the sound After sending this command, signal of frequency specified by the Counter command appears on the MIC output.
111110Stop the sound This command terminates generating the music tone.
111100Close Apart from closing the communication channel, this command has an additional function.After sending it, the calculator can read a single data bit which returns the Cal/Music switch state (Cal=0, Music=1). Otherwise, this switch doesn't seem to influence the function of the controller.

Example of playing music

1.  OP=0 111100         ;test the Cal/Music switch
    OP=1 1              ;returned value=1,
                        ;means the switch in the "Music" position

2.  OP=0 111110		;stop the sound

3.  OP=0 110100         ;preset the counter according to the note pitch
    OP=1 01001010       ;value=0x52 (frequency=400Hz)

4.  OP=0 001110         ;play the sound

5.  delay depending on the tempo

6.  goto 1, until all notes played

7.  OP=0 000000         ;reset

8.  OP=0 111110		;stop the sound

The Printer Interface

The FP-10 printer command codes have the last transmitted bit set.

Available commands

Code Function Description
000011Presence After sending this command, the calculator reads a single data bit. Returned value=1 means the printer is present.
011001??? This command always appears immediately before the Presence command, function unknown.
100001Read status After sending this command, the calculator reads a single data bit. Returned value=0 means the printer is busy, while 1 means it's ready to accept data.
110011Send control This command is followed by a printer control byte. Order of bits:
  • the start bit=0
  • 8 data bits (the least significant bit first)
  • the parity bit
  • 2 stop bits=1
  • 4 "don't care" bits (the FX-602P sends 1010)
The busy/ready status needs to be tested with the Read status command before any data transfer.
010011Send data This command is followed by a data byte. Otherwise as the Send control command.

Known printer control codes

Code Function
0x10 Prints a string using the FX-602P alpha mode.
0x11 Prints a number using the FX-602P numbers mode.
0x13 Function unknown, sent by the FX-602P to the printer after power-on.
0x1F Terminates strings sent by the FX-602P to the printer.
0x29 Selects the FX-702P printing mode.

Power-on sequence

1.  OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

2.  OP=0 000101         ;read status - repeat this sequence,
    OP=1 0 or 1         ;until the interface returns 1

3.  OP=0 010010         ;this command seems to be directed to the tape
                        ;interface, perhaps it fixes some interaction
                        ;issues

4.  OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

5.  OP=0 110011         ;send control code 0x13
    OP=1 0110010001111010

6.  OP=0 000101         ;read status - repeat this sequence,
    OP=1 0 or 1         ;until the interface returns 1

7.  OP=0 010010         ;command for the tape interface

8.  OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

9.  OP=0 110011         ;send control code 0x10
    OP=1 0000010001111010

10. OP=0 010010         ;command for the tape interface
    OP=0 000000         ;reset
    OP=0 111110         ;command for the tape interface

The FX-702P sends only the Reset command after power-on.

Printing example

1.  OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

2.  repeat the above test

3.  OP=0 110011         ;send control code 0x11
    OP=1 0100010000111010

4.  OP=0 000101         ;read status - repeat this sequence,
    OP=1 0 or 1         ;until the interface returns 1

5.  OP=0 010010         ;command for the tape interface

6.  OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

7.  OP=0 010011         ;send data (0xFF in this example)
    OP=1 0111111110111010

8.  OP=0 000101         ;read status - repeat this sequence,
    OP=1 0 or 1         ;until the interface returns 1

9.  goto 5, until all data bytes sent

10. OP=0 010010         ;command for the tape interface

11. OP=0 011001         ;unknown Code 011001
    OP=0 000011         ;test for printer presence
    OP=1 0 or 1         ;returns 1 when printer present

12. OP=0 110011         ;send control code 0x1F
    OP=1 0111110001111010

13. OP=0 000101         ;read status - repeat this sequence,
    OP=1 0 or 1         ;until the interface returns 1

14. OP=0 010010         ;command for the tape interface
    OP=0 000000         ;reset

The FX-702P calculator skips the 010010 commands.

FX-602P numbers mode

Numbers are printed using following sequence:

  1. control command 0x11
  2. eight data bytes
  3. control command 0x1F
Character encoding        Example numbers and their encoding
Code Character
0x0-0x9 digits 0-9
0xAdecimal point
0xEminus sign
0xFspace
      
     -1234.         FF 5F 4A 23 E1 FF FF 0F
      1.234E 78     78 8F 34 A2 F1 FF FF 0F
     -1.234E-78     78 8E 34 A2 E1 FF FF 0F
3.141592654         FF FF 54 26 59 41 A1 03
-1.23456789         FF DF 89 67 45 23 1A 0E
-12.3456789         FF CF 89 67 45 A3 12 0E
     1.2345         FF 9F 45 23 1A FF FF 0F
   1.234567         FF BF 67 45 23 1A FF 0F
   1234.567         FF 8F 67 A5 34 12 FF 0F
        1.2E 09     09 6F A2 F1 FF FF FF 0F
 1.23456789E 45     45 DF 89 67 45 23 1A 0F
        1.2E-09     09 6E A2 F1 FF FF FF 0F

FX-602P alpha mode

Strings are printed using following sequence:

  1. control command 0x10
  2. data bytes
  3. control command 0x1F

Printout of all character codes 0x00-0x7F.