Connecting with a Graphic calculator.

Hey guys :),

about an hour ago i had the fantastic ideo to connect my Casio Graphic Calculator ( Casio fx-9860GII) to my Arduino board. And it works, more or less. At the moment a LED is flashing if i execute a Program on the Calculator. The program contains that:Send(A)
that means, that the variable "A" is sent. The Calculator is connected via a stereo TRS.

The Arduino Code looks like that:

int Calc = 12;  

int led = 13;

int CalcReading=0;


void setup() {
 
 Serial.begin(9600);  
pinMode(led, OUTPUT); 
}

void loop() {
  
  CalcReading = digitalRead(Calc);    
  

  if (CalcReading >= 1) {
    
     digitalWrite(led, HIGH);
     delay(200);
     digitalWrite(led, LOW);
     delay(200);
    
    Serial.println(CalcReading);         
  }
    
}

Now i wan't to get the Variable...how can i save the sent data?

You could try using the software serial libraries, but you need to work out the serial speed and protocol.

PS, for a digtialRead a ">= 1" isn't really necessary.

How can i work out the two things cO?

First, go to Casio's site and get the manual for the calculator, if you don't already have a copy. Then, go over to here:

http://casiokingdom.org/

...and see what you can dig up; you might register for the site, and post a message introducing yourself and your issue. Tell them you have a serial cable connected to an Arduino (clue them in on that; point them back to the site and this thread), and that you know how to use the SEND command, but you don't know if the serial data is standard or in some kind of special "packetized" format or something. Maybe somebody there has played with this, and knows what the format is.

You will most likely use on the Arduino the software serial library for communications with the calculator; it is very simple to use, you just have to specify a few http://casiokingdom.org/parameters (pins, speed, etc), and then you can use simple commands to send and receive data from the calculator - see:

...for more information on the software serial library.

The library does have limitations, though - it will only work up to 9600 baud; so hopefully the standard SEND/RECEIVE commands don't go faster - if they do, then you have a few options (provided the cable from the calculator is TTL serial levels, of course):

  1. Try to figure out how to lower the speed on the calculator - I'm not sure this is possible, from my brief reading of the manual.

  2. Hook up to the hardware serial port on the Arduino (pins 0 and 1); of course, this means you can't monitor the comms using the USB connection, because the FTDI chip uses these same pins. The nice thing with using the hardware serial connection, though, is the commands/interface are built into the Arduino and easy to use.

  3. Get a TTL serial UART chip that can handle the speeds, interface that to the Arduino, hook it up to a couple of pins, and start writing an interface library.

Hopefully someone on the Casio Kingdom board can give you or point you to some help; you may have some googling ahead of you. You might want to write a nicely worded email to Casio support telling them you are wanting to interface the calculator to the Arduino for a school project (regardless of how true this is; they may give you better help if they think you are doing this for a school project) - they may tell you exactly what you need...

Good luck.

:slight_smile:

Yeah thank ya, I'll try it there :).

?: It seems that the calculator works with 9600 bauds...