Register

Casio fx-9860G SD- How to read files in the sd card?

Discuss anything related to calculators. For specific help on certain games/programs check the Released Projects subforum.
Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Thu Jul 14, 2016 11:17 pm

There is a link on their page to a pdf manual in french so I couldn't understand it well but they have pictures of the cardlist program so i now think it may be a basic not c written program but I cannot find any downloads of it so far. Or is this cardlist something built in the os itself? I will try to translate the manual once i'm at a computer.

Member
User avatar
Posts: 39
Joined: Fri Aug 21, 2015 11:54 am
Location: France
Calculators: Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860GII, Casio fx-CG50

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby lephe » Wed Jul 20, 2016 4:01 pm

I have made a very rough translation of this manual (I hope I'm not too late). You can find it on Framabin (it will be deleted after one year).

Basically the CARDLIST program you can see on the images is a program sent by the device to the calculator to display the contents of the card and select files for various operations.

This device has its own driver and, among others, ignores subdirectories. I don't know exactly what you were planning to do with it, but it only interacts with the default transfer protocol and it might always send files to the main memory. It won't allow you to directly access the SD card.

I think the only requirements for the Prizm compatibility would be related to the transfer protocol and the file formats (because it reads program names among others). I believe that you can transfer Basic programs between fx-CG and fx-9860G models (there are even compatibility facilities in the language); therefore fx-9860G compatibility should be enough.

However, the device is very old. Current calculators include Graph 35+, Graph 75+, Graph 85 and Graph 95 SD which are not listed in the manual. (fx9860GII is Graph 85, which has no SD card support.) The protocol is likely to have evolved.

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Wed Jul 20, 2016 9:43 pm

Thank you so much for the translation and your explanations

Their approach seems to rely on the microsd devise and its button to generate the list of files to take care of transfers...

I wonder if a different approach can be taken with new "sparkfun openlog" devise and have an addin on prizm to list the files on microsd and take care of transfers without having to press any physical buttons on the sd board plus to be able to have higher file size limit and to access storage memory not just main memory when transferring from or to sdcard.

Maybe Simon can kindly point me to what system calls can do those listing and other things above via serial interface somehow

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Wed Jul 20, 2016 10:26 pm

AmazoNKA wrote:Maybe Simon can kindly point me to what system calls can do those listing and other things above via serial interface somehow
As far as I could read here https://learn.sparkfun.com/tutorials/openlog-hookup-guide the sparkfun openlog would be exactly the thing you need. It has a well defined serial interface to access the sd-card's file-system.
The syscalls you need are the syscalls to access the serial interface and the syscalls to write the user interface, like listing files, moving files a. s. o..
F. i. the addin could work like the MAIN MENU's memory function.
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Thu Jul 21, 2016 8:54 am

Thanks Simon, i have not received the hardware yet but will sketch something for the addin using the documentation link you posted. I will post back here once I have any progress. Thanks again

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sun Jul 24, 2016 2:31 pm

Is it correct that i will have to work around 512 bytes limit for how much can be written into receiving buffer, i.e i will have to loop it some way? Or shall I consider some specific protocol or perhaps some other routine by Simon (i cannot find it now but it was dealing with the problem of overwrite confirmations I think) instead of serial_write/read system calls... Or are the other protocol and routines totally specific for calculator to calculator communications and not useful for dealing with sparkfun microsd board? Thanks again

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Sun Jul 24, 2016 3:29 pm

AmazoNKA wrote:Is it correct that i will have to work around 512 bytes limit for how much can be written into receiving buffer, i.e i will have to loop it some way? Or shall I consider some specific protocol or perhaps some other routine by Simon (i cannot find it now but it was dealing with the problem of overwrite confirmations I think) instead of serial_write/read system calls... Or are the other protocol and routines totally specific for calculator to calculator communications and not useful for dealing with sparkfun microsd board? Thanks again
You will have to use the basic serial I/O-syscalls. I experienced these calls as very reliable. The calculator-specific protocol 7.00 will be of no use with this task. I think the serial function-part of your program will be far less complex compared to the user-interface.
The interrupt receive buffer has a capacity of 1024 bytes. I'd recommend to use an outer loop to transfer incoming bytes into a secondary (bigger) buffer, before processing them (f. i. write them to a file).
I'll be back!

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Sun Jul 24, 2016 4:25 pm

Thank you very much for your help

Senior Member
Posts: 116
Joined: Mon Mar 02, 2015 10:53 am
Calculators: Casio fx-CG20

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby AmazoNKA » Wed Jul 27, 2016 9:02 pm

My sparkfun reader still has not arrived but I was thinking about the tips you kindly gave me: what maximum size do you recommend - i know the storage capacity on the calculator is limited and according to your documentation it would take ca 3 min to write 2mb on the calculator... But i was not sure if 2mb is the absolute limit for a single file size or due to the secondary buffer size considerations perhaps... I know you use 2mb cap for memory backups from your insight addin so just wanted you to confirm please?

Also besides from and to storage memory would there be any need for sdcard to also main memory transfer ever or is it a completely different task or should be avoided for some reasons?

Thanks again

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Casio fx-9860G SD- How to read files in the sd card?

Postby SimonLothar » Thu Jul 28, 2016 9:21 pm

If I understood right, the sparkfun openlog supports 64MB to 64GB cards. I would use the cheapest card available, because even 64MB will be more than you ever need.
I do not think 2 MB is the upper filesize limit on the Prizm. I choose 2 MB for convenience, only. Perhaps in these days I had not much more space left in the storage memory of my Prizm. I do not remember.
The secondary serial buffer's size will not be a filesize limiting factor.
Whether you use the sparkfun to backup the main memory is up to you. Though, I'd consider this option, too.

BTW.: I ordered a sparkfun openlog, too. But no worries. I won't steal your idea. But to answer your questions, a piece of that hardware could be helpful.
I'll be back!

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 63 guests