Casio fx-9860G SD- How to read files in the sd card?
- AmazoNKA
- 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?
Did they also drop hex or raw mode from this function or is it of no help
- Code: Select all
read File + START+ LENGTH TYPE - Output the content of File starting from START and going for LENGTH. If START is omitted, the entire file is reported. If LENGTH is omitted, the entire contents from the starting point is reported. If TYPE is omitted, the OpenLog will default to reporting in ASCII. There are three output TYPEs:
ASCII = 1
HEX = 2
RAW = 3
You may leave off some trailing arguments. Check the following examples.
Basic read + omitted flags:
Example: read LOG00004.txt
Output: Accelerometer X=12 Y=215 Z=317
Read from start 0 with length of 5:
Example: read LOG00004.txt 0 5
Output: Accel
Read from position 1 with a length of 5 in HEX:
Example: read LOG00004.txt 1 5 2
Output: 63 63 65 6C
Read from position 0 with a length of 50 in RAW:
Example: read LOG00137.txt 0 50 3
Output: André-- -þ Extended Character Test
- SimonLothar
- Senior Member
- 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?
I meant the writing commands "append file" and "write file".
They use control codes below 0x20 (f. i. 0x1A, 0x0D). These control codes mustn't occur in the data-stream.
But we will go into detail, when you have received your sparkfun openlog.
They use control codes below 0x20 (f. i. 0x1A, 0x0D). These control codes mustn't occur in the data-stream.
But we will go into detail, when you have received your sparkfun openlog.
I'll be back!
- AmazoNKA
- 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?
I have just received it today - my god it's tiny - I didn't expect it to be so small - probably not breadboard compatible - I will check a bit later but someone else will need to solder it for me. Just want to double check with you if I need to cross tx and rx or does tx from calculator goes to tx on openlog and so on please. Thanks again.
Regarding writing to sd I imagine it is less important than being able read binaries from sd to be copied over to the calculator so even with some writing limitations it will be quite valuable expansion of calculator's functionality (at least to begin with. And perhaps later better bootloader can be applied to openlog or some workaround on calculator side can be designed to deal with control codes.)
I'm really impressed with your progress and feel that I'm only slowing you down with my questions but I truly appreciate your answers and hope you don't mind me being so scattered and not up to your speed.
Regarding writing to sd I imagine it is less important than being able read binaries from sd to be copied over to the calculator so even with some writing limitations it will be quite valuable expansion of calculator's functionality (at least to begin with. And perhaps later better bootloader can be applied to openlog or some workaround on calculator side can be designed to deal with control codes.)
I'm really impressed with your progress and feel that I'm only slowing you down with my questions but I truly appreciate your answers and hope you don't mind me being so scattered and not up to your speed.
- SimonLothar
- Senior Member
- 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?
This tiny little thing is valuable, indeed.
Concerning your questions: No bother. No bother.
I am glad, that you had this idea. It is a very interesting project.
Concerning the soldering: I will post a detailed description of how I interfaced the "board".
Concerning your questions: No bother. No bother.
I am glad, that you had this idea. It is a very interesting project.
Concerning the soldering: I will post a detailed description of how I interfaced the "board".
I'll be back!
- SimonLothar
- Senior Member
- 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?
Manufacturers documentation: Show
Connections to some fx-calculator:
GRN and BLK: not used
RXI: connect to Stereo 2.5 mm plug tip
TXO: connect to Stereo 2.5 mm plug middle
GND: connect to Stereo 2.5 mm plug base and to GND of the power supply
VCC: connect to VCC of the power supply
I use an USB standard A plug to power the sparkfun openlog.
I connected pin 1 of the USB connector to VCC and pin 4 of the USB connector to GND (see https://en.wikipedia.org/wiki/USB "5.2.1 standard connectors").
You are not slowing me down. In the first place I want to check for the basic capabilities of and for the problems with the openlog's serial interface. I am just curious. The last thing to check is the READ RAW thing. I implemented some test-functions in INSIGHT.G1A. I will check with INSIGHT.G3A, if there are special problems with the Prizm. Then I'll be ready for the time being. There will be enough work left for you with the user interface.AmazoNKA wrote:I ... feel that I'm only slowing you down with my questions but I truly appreciate your answers and hope you don't mind me being so scattered and not up to your speed.
I'll be back!
- SimonLothar
- Senior Member
- 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?
I checked the "read file" function. It works as expected (ASCII, HEX and RAW).
Additionally I tried the communication on a Prizm. No problems encountered.
Additionally I tried the communication on a Prizm. No problems encountered.
I'll be back!
- AmazoNKA
- 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?
That's such a great news and progress.
After reading your chm documentation am I correct in assuming that insight's source code is part of your mini sdk? Sorry if i got it wrong but i never managed to find insight's specific source code so perhaps it is because i have never used mini sdk?
Thanks again
After reading your chm documentation am I correct in assuming that insight's source code is part of your mini sdk? Sorry if i got it wrong but i never managed to find insight's specific source code so perhaps it is because i have never used mini sdk?
Thanks again
- SimonLothar
- Senior Member
- 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?
That has been in early 2011, when I started exploring the Prizm and publishing my first results:AmazoNKA wrote:After reading your chm documentation am I correct in assuming that insight's source code is part of your mini sdk? Sorry if i got it wrong but i never managed to find insight's specific source code so perhaps it is because i have never used mini sdk?
https://www.omnimaga.org/casio-prizm/co ... #msg174367
https://www.omnimaga.org/casio-prizm/ca ... #msg174654
I already ceased publishing the miniSDK (and the INSIGHT-source) in these days. The miniSDK is intended to support fx-9860, fx-CG as well as fx-CP. Hence it is a bit complicated.
Nowadays I use INSIGHT to verify various ideas. It partly contains experimental code, which is not intended for general use.
The source is distributed over a lot of modules/libraries/headerfiles. Some of the modules/libraries/headerfiles are automatically generated by the miniSDK (f. i. syscalls).
Possibly would be a lot of work to get the complete source running on a different development-environment.
Concerning the sparkfun-project the following code is essential:
SparkFun.hpp: Show
SparkFun.cpp: Show
The essential part, which serves the serial communication, works both with fx-9860 and fx-CG.
I will comment the code and update this post.
I'll be back!
- SimonLothar
- Senior Member
- 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?
A little drawback: It seems that 115200 baud is not reliable. Sometimes the upper bit of a byte gets lost.
Due to the fact, that in the last 8 years I experienced the serial performance of the fx-calculators as being excellent at any speed, I blame the sparkfun openlog.
If I understood the Change Log right (f. i. version [3.2]), the serial module of the sparkfun openlog is not a piece of hardware, but part of the firmware, hence susceptible to programming errors. I am surprised.
My openlog has firmware version 3.3. Perhaps with version 4.0 things are better.
Luckily 57600 baud seems to be reliable.
---
"append file" seems to be appropriate to write any binary data except the escape-sequence (which is - contrary to the documentation - \x1A\x1A\x1A by default). That could be mended with padding. We should not stick to the hope, that the escape-sequence is not part of the data to write.
Up to firmware version 3.3 the escape-sequence is written to the file, too. According to the Change Log this is not an issue any more with version 4.0.
Due to the fact, that in the last 8 years I experienced the serial performance of the fx-calculators as being excellent at any speed, I blame the sparkfun openlog.
If I understood the Change Log right (f. i. version [3.2]), the serial module of the sparkfun openlog is not a piece of hardware, but part of the firmware, hence susceptible to programming errors. I am surprised.
My openlog has firmware version 3.3. Perhaps with version 4.0 things are better.
Luckily 57600 baud seems to be reliable.
---
"append file" seems to be appropriate to write any binary data except the escape-sequence (which is - contrary to the documentation - \x1A\x1A\x1A by default). That could be mended with padding. We should not stick to the hope, that the escape-sequence is not part of the data to write.
Up to firmware version 3.3 the escape-sequence is written to the file, too. According to the Change Log this is not an issue any more with version 4.0.
I'll be back!
- AmazoNKA
- 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?
Thanks for both replies. I haven't followed sparkfun versioning properly to be sure what I received... But checked that the pin holes spacing seems breadboard compatible so hopefully I will get it connected soon. I ordered mine directly from sparkfun so i may have the latest version... However I'm leaving for holidays in a few hours so won't have access to all the hardware for some time - hopefully i will be able to test if my firmfirmware is better with any of those things. All the best wishes in meantime
Who is online
Users browsing this forum: No registered users and 4 guests