Jump to content



Photo
- - - - -

Fx-9860g System Call And Protocol Documentation


  • Please log in to reply
19 replies to this topic

#1 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 05 June 2008 - 10:11 PM

SimLo and I have been working a while on gathering information on the fx-9860G OS, specifically its system calls (built in functions). I've 'distilled' a PDF file from our notes, and written a chapter on the protocol.

What is covered?
A trimmed topic list:

Hardware
Software
- System calls
- File formats
Communication protocol
- Packets and packet flow
- Packet types
- Examples
API (system calls)
- Cursor control
- Serial interface access
- Setup variable access
- Alpha variable access
- libc standard functions


Where can I download it?
Here: http://downloads.sou...erse-docs-1.pdf (non-direct, just wait a moment)

Who will find it useful?
-Programmers familiar with C and the SDK
-People who want to know how to communicate with the calculator LINK program (serial/USB)
-Curious people ;)


We hope this will be useful, and that it could spark some interest in you folks :).

#2 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 06 June 2008 - 04:31 PM

great work, thanks to you and to SimLo.

#3 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 08 June 2008 - 03:39 PM

If you ever want to replace cumbersome FA-124, neurOn's protocol documentation is an excellent choice to refer to. I have done some serial programming my life, but I've rarely seen such a handy description of a communication protocol (which is one of the more complex ones I encountered). And the protocol applies both to USB and serial.

#4 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 08 June 2008 - 10:34 PM

If you ever want to replace cumbersome FA-124, neurOn's protocol documentation is an excellent choice to refer to. I have done some serial programming my life, but I've rarely seen such a handy description of a communication protocol (which is one of the more complex ones I encountered). And the protocol applies both to USB and serial.


Seems interesting, where can we find the documentation please?
I hope it is in engilish (my french is bad).

#5 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 08 June 2008 - 11:37 PM

Seems interesting, where can we find the documentation please?
I hope it is in engilish (my french is bad).

By 'neur0n', he means me. It is the docs mentioned in the first post (in english).

#6 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 09 June 2008 - 09:54 AM

OK'neur0n' thank you.

#7 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 12 June 2008 - 04:01 PM

We hope this will be useful, and that it could spark some interest in you folks :) .


Using syscalls is a very efficient way to program.
Instead of coding functions anew, which are already present in your calc, simply use them. It saves a lot of code. You can concentrate on the important stuff. Using a very small C-interface (about 20 bytes) you don't even need a library to bind.
Among about 4000 syscall-table entries some very interesting and well (worldwide)tested serial-, RTC-, keyboard- and display-functions (and then some) can be found.

#8 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 12 June 2008 - 06:47 PM

Hi,
Is it possible to use the USB and 3-pin serial interface simultaneously?
I?m trying to use fx-9860G as a field real time controller; read data from a sensor, use simple algorithm and a lookup table to decide the control action, send commands to an actuator to take action. This must be done in 100Hz or faster.
The 3-pin (simplex) serial interface reads data and the USB sends the control action.
Any possible ideas?
Regards.

#9 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 12 June 2008 - 07:08 PM

i thought this was already done by kucalc aready

http://revolution-fx...itle=Memory_map

#10 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 12 June 2008 - 07:15 PM

I'm moving the thread here as it's more appropriate here.

@Guest: I've known about the the "syscalls" for years, however I never took the time to dwelve deeper into them.

Speaking of the hardware wiki, as for the documentation, I found it funny that some info was taken from the Hardware Wiki and not cited (such as the T6K driver) whereas my post about the CPU speed was. Wouldn't you want others to learn about the Hardware Wiki? :lol: Or not?

#11 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 12 June 2008 - 07:42 PM

Hi,
Is it possible to use the USB and 3-pin serial interface simultaneously?
I'm trying to use fx-9860G as a field real time controller; read data from a sensor, use simple algorithm and a lookup table to decide the control action, send commands to an actuator to take action. This must be done in 100Hz or faster.
The 3-pin (simplex) serial interface reads data and the USB sends the control action.
Any possible ideas?
Regards.


I have no experience with programming FX9860G-USB yet.
Perhaps AndreasB knows details concerning this.

If it would be possible to control the actuator with the serial output, this could be a job for a FX9860G.
Normally I use the serial port with 115 kBaud (1kByte interrupt controlled receive buffer), so 100 Hz should not be a problem.

#12 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 12 June 2008 - 08:19 PM

If it would be possible to control the actuator with the serial output, this could be a job for a FX9860G.
Normally I use the serial port with 115 kBaud (1kByte interrupt controlled receive buffer), so 100 Hz should not be a problem.


But the 3-pin is simplex, I need a duplex communication.

Is it possible to operate in real time?

Thank you.

#13 Andreas B

Andreas B

    Casio Freak

  • Members
  • PipPipPipPip
  • 160 posts
  • Gender:Male
  • Location:Norway

  • Calculators:
    fx-9860G SD

Posted 12 June 2008 - 08:37 PM

Speaking of the hardware wiki, as for the documentation, I found it funny that some info was taken from the Hardware Wiki and not cited (such as the T6K driver) whereas my post about the CPU speed was. Wouldn't you want others to learn about the Hardware Wiki? :lol: Or not?

Well, the CPU speed post was cited only because we have not checked/confirmed it. The paragraph before also states that we did not discover the specs, and I do think that is fair.. We should include a mention of the revolution-fx project though.

Is it possible to use the USB and 3-pin serial interface simultaneously?
I'm trying to use fx-9860G as a field real time controller; read data from a sensor, use simple algorithm and a lookup table to decide the control action, send commands to an actuator to take action. This must be done in 100Hz or faster.
The 3-pin (simplex) serial interface reads data and the USB sends the control action.
Any possible ideas?

I have no experience writing programs using USB.

#14 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 12 June 2008 - 08:42 PM

But the 3-pin is simplex, I need a duplex communication.

Is it possible to operate in real time?

Thank you.


FX9860G serial can operate in both directions. It is 64 bytes hardware-buffered in both directions and interrupt-buffered (1kB receive, 256 bytes transmit) in the software layer. What do you mean with 100 Hz. Is it the required baudrate (which would be very slow)? Or is it the rate of incoming datablocks? Then the size of these datablocks would be of interest. As stated before I operate FX-link with 115200 baud without problems.

#15 ECE

ECE

    Casio Freak

  • Members
  • PipPipPipPip
  • 152 posts
  • Gender:Not Telling
  • Location:USA

  • Calculators:
    ClassPad300 Plus o.s3.06.1000
    fx-CG20 o.s1.04
    fx9860GII SD o.s2.00
    fx9860G Slim o.s1.10
    fx9860GSD o.s2.01 (GII hacked)
    Algebra FX2.0 Plus
    CFX9850GBplus
    fx5800p
    fx3650p
    fx570ES Plus
    EA-200 Casio Data Analyzer

Posted 12 June 2008 - 09:39 PM

By 100Hz, I meant reading the sensor and sending the control action 100 times per second.
From the documentation above and the wiki site mentioned by kucalc, it is obvious that fx-9860G has a lot of potentials; one can use it as a portable controller in the field. And I?m intending to do so but; I need to collect more information about s/w controlling this SH-3 platform.
Thanks to the great work done by many guys in this forum giving us more insight look with lots of details.

#16 Manuel Naranjo

Manuel Naranjo

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male
  • Location:Rosario, Argentina

Posted 14 June 2008 - 03:53 PM

SimLo and I have been working a while on gathering information on the fx-9860G OS, specifically its system calls (built in functions). I've 'distilled' a PDF file from our notes, and written a chapter on the protocol.

What is covered?
.....


Pretty good job guys. I will take a look.

#17 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 14 June 2008 - 05:14 PM

Pretty good job guys. I will take a look.


As far as I recognized, you have been involved unraveling the communications protocol.
Thank you, the same to you!

#18 MrTeatime

MrTeatime

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 30 August 2008 - 01:47 PM

i thought this was already done by kucalc aready

http://revolution-fx...itle=Memory_map


Are you kidding? You won't call this a syscall documentation! Gimme a break!

---
I am searching the forums for usable syscall-related topics for some days now.
AndreasB's doc is the single one I found which you can work with. It would be fine if he would release some sequel. We need a complete documentation.

#19 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 17 September 2008 - 02:38 PM

@MrTeatime: Hmmm, now why does your IP address match up with SimLo's..... :D

#20 SimLo

SimLo

    Casio Addict

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Germany

  • Calculators:
    FX-9860G/FX-9860G SD

Posted 17 September 2008 - 04:31 PM

@MrTeatime: Hmmm, now why does your IP address match up with SimLo's..... :D


@kucalc: Could you tell me the matching IPs, please. I'd like to check this out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users