Jump to content



Photo
- - - - -

fx-CG50 - Programming


  • Please log in to reply
8 replies to this topic

#1 Todd

Todd

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Payson, AZ
  • Interests:Astronomy, electronics, computers, and of course, math.

  • Calculators:
    fx-CG50
    fg-CG500
    fx-115ES Plus
    fx-300ES Plus
    TI-nSpire CX CAS

Posted 09 September 2018 - 12:55 PM

Question about programming the fx-CG50 - Does programming take place only on the calculator directly, or can a program be written on a PC and transferred to the fx-CG50? If it is the latter, then what PC app might be used to create the program? Thank you!



#2 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 163 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    .

Posted 10 September 2018 - 11:21 AM

It seems you can write a program in the computer e.g. in notepad and transfer it to the calculator. 

Everything is described in the UG, page 8-7 - Converting Programs and Text Files with examples how to write characters in program and text file.



#3 GodOfCows

GodOfCows

    Casio Addict

  • Members
  • PipPipPip
  • 65 posts
  • Gender:Male

  • Calculators:
    fx-9860gii, fx-9750gii, TI-92, TI-89, TI-83 Plus

Posted 10 September 2018 - 03:02 PM

You can program on the calculator itself in basic. I think you can use a program like fa-124 or just a text editor to edit/create files. I think you can just drag and drop files to the calculator since it is using mass storage. I'm unsure how to program add-ins (c, c++, ASM). I think the community has created SDK for it but I'm unsure of where to look. 

 

This is for the prizm, which is all I could find, maybe they are so similar they are compatible.

http://prizm.cemetec...gramming_Portal



#4 Todd

Todd

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Payson, AZ
  • Interests:Astronomy, electronics, computers, and of course, math.

  • Calculators:
    fx-CG50
    fg-CG500
    fx-115ES Plus
    fx-300ES Plus
    TI-nSpire CX CAS

Posted 11 September 2018 - 01:38 PM

Thank you to both pan.gejt and GodOfCows for your very helpful responses. I don't know how I missed pg 8-7 in the manual, but I did.

 

Cheers!



#5 pan.gejt

pan.gejt

    Casio Freak

  • Members
  • PipPipPipPip
  • 163 posts
  • Gender:Male
  • Location:CZ

  • Calculators:
    .

Posted 11 September 2018 - 03:46 PM

Can you confirm it if you decide to test it? I am a little bit lazy to write any program as a text file and transfer it to calculator.



#6 Todd

Todd

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Payson, AZ
  • Interests:Astronomy, electronics, computers, and of course, math.

  • Calculators:
    fx-CG50
    fg-CG500
    fx-115ES Plus
    fx-300ES Plus
    TI-nSpire CX CAS

Posted 12 September 2018 - 03:34 PM

Can you confirm it if you decide to test it? I am a little bit lazy to write any program as a text file and transfer it to calculator.

I tested it and it works. I first created a program for Heron's formula on the calculator and made sure it worked. Then I created a text file with a different name for the same program, using the conversion text at the end of chapter 8 of the UG.  Plugged the calculator into a USB port and copied the program to the program folder on the calculator. The program ran just like the one I had created right on the calculator. HOWEVER - there are some things to know.

 

1) A text file moved from a PC to the program folder under @MainMem/Program is automatically converted from text file to a program when the USB connection is terminated. Note: USB termination must occur on the PC before unplugging the USB cable. Text files may be copied from the PC to other directories in the calculator without the automatic text-to-program conversion.

2) I used NotePad on Windows to create the program and that worked. I tried a different text editor and that did not work - not sure why. I kept getting "conversion failed" error message on the calculator with no information as to what failed. It might have been because it saved the file in some other text format than ASCII, or perhaps it was because the file did not have a .txt file extension.

3) Casio BASIC on the calculator uses a number of special symbols that are not in the ASCII character set, however, towards the end of chapter 8 of the UG, there is a conversion table that shows what to type in the text document in order to get the special character on the calculator. For example, to get the triangle image that means "display", in the text document you would type Disps.

 

The NotePad text file code for Heron's formula is shown below.

"Side a"?->A
"Side b"?->B
"Side c"?->C
(A+B+C)/2->S
Sqrt(S*(S-A)*(S-B)*(S-C))->R
"Area is"
RDisps

For those who may not be familiar with Heron's formula, it calculates the area of any triangle, not just a right-triangle, when given its three sides.

Disclaimer - there is no error checking for having a negative value under the radical. This can occur if the inputted side lengths do not actually make a triangle.

 

Anyway, Pan.Gejt, I hope you give it a try and let me know how it turns out.

 

Cheers!


Edited by Todd, 12 September 2018 - 03:40 PM.


#7 space928

space928

    Newbie

  • Members
  • Pip
  • 4 posts
  • Gender:Male
  • Location:France/Switzerland
  • Interests:Computing
    Science
    Programming (C, C#, HLSL, and rarely ASM)
    Theatre
    Maths

  • Calculators:
    fx83-gt PLUS
    And occasionally: fx92 Spéciale College

Posted 15 September 2018 - 12:43 PM

You can also program the CG-50 in Micropython (a variant of standard python) which you can write on your desktop in a text editor or in IDLE and then just upload the file anywhere on the calculator's memory. Just make sure you have the latest version of the OS to use python.



#8 sentaro21

sentaro21

    Casio Freak

  • Members
  • PipPipPipPip
  • 113 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 16 September 2018 - 04:44 AM

Python supported newly is good for high speed. :D
 
If feel that genuine Casio Basic is slow,
If you are interested, please try C.Basic CG. 
The all the commands do not support, but the basic command works at 10 times faster or more. :greengrin:


#9 Todd

Todd

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Payson, AZ
  • Interests:Astronomy, electronics, computers, and of course, math.

  • Calculators:
    fx-CG50
    fg-CG500
    fx-115ES Plus
    fx-300ES Plus
    TI-nSpire CX CAS

Posted 16 September 2018 - 10:28 AM

Sentaro21 and Space928,  thank  you both for your suggestions. I will try them both. I did notice that the CG50 has a Python environment, and I have done some programming in Python, but nothing serious.

 

To Sentaro21: I noticed that you have an HP Prime calculator. I had one of those about a year ago and really liked it because of the smaller form factor as compared to the TI nSpire CX CAS, and the HP had several more higher math application than the TI. However, during a calculus II refresher course, my HP kept giving me wrong answers. I got the feeling that HP had not worked out all the bugs yet. I sold the calculator and went back to using the TI.

 

Cheers!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users