Register

Ptune3: Inaccurate frequency measurements

Discuss issues related to Calculator Hacking/Modding.
Member
User avatar
Posts: 37
Joined: Fri Aug 21, 2015 11:54 am
Location: France
Calculators: Casio fx-9860G, Casio fx-9860 GII, Casio fx-CG 50

Ptune3: Inaccurate frequency measurements

Postby lephe » Sun Aug 05, 2018 4:17 pm

Ptune3 uses the same SH7305 CPG formulas as Ftune2. On the fx-9860G II, timers calibrated with Ftune2's frequencies are indistinguishable from the RTC.

However on fx-CG50, the frequency seems to be way off the reality. Consider the results I got from running the same program, a live counting race between a 16-Hz timer and the RTC's 16-Hz interrupt, on both fx-9860G II and fx-CG50:

  • On fx-9860G II, both the timer and the RTC count at the same speed. Counters increment simultaneously even after 3/4 minutes.
  • On fx-CG50, the timer shows an error of 1 second after 40 seconds of counting. It increments its own counter later than the RTC, which indicates that the frequency of Pϕ was overestimated.

The calculated frequency for Pϕ is 29.491200 MHz; some binary trial-and-error suggests a frequency around 29.04 MHz. A driver problem is possible, but looks unlikely to me because the whole thing works flawlessly on fx-9860G II.

So, here are the few questions I have for you:
- Can anyone confirm this issue?
- Could there be a Clock Pulse Generator setting with different meanings on fx-9860G II and fx-CG50?
- Is there anything else to explain the difference in frequency between the models?

Thanks. :)

Member
User avatar
Posts: 25
Joined: Mon Oct 27, 2014 1:46 pm
Location: Japan
Calculators: Casio Cfx Series, Casio fx-9860G, Casio fx-9860 GII, Casio fx-9860 GII SD Power Graphic 2, Casio fx-CG 10, Casio fx-CG 20, Casio fx-CG 50

Re: Ptune3: Inaccurate frequency measurements

Postby sentaro21 » Tue Aug 14, 2018 7:53 am

Hi lephe :D

I did not check the details, but confirmed that it was slightly late than before.
When I test it,I can confirm -1.6% down surely now. :o

Is this a bug of the CPU?
Or is it a frequency drop by down spread spectrum?
I do not really understand a cause. :?:

If any program goes down by -1.6%, I will do update of the -1.6% indication of Ptune3. ;)

Member
User avatar
Posts: 37
Joined: Fri Aug 21, 2015 11:54 am
Location: France
Calculators: Casio fx-9860G, Casio fx-9860 GII, Casio fx-CG 50

Re: Ptune3: Inaccurate frequency measurements

Postby lephe » Wed Aug 22, 2018 11:37 am

I think it would be possible to detect whether all the CPG parameters have their expected meaning, by measuring the clock frequency for each possible value of the parameters.

My runtime environment is not advanced enough to do it right now, but it will probably be in a few weeks. I'll share the results with you :D

I don't know if there can be an electrical cause. To be honest I only understand the software aspects of the problem.

Member
User avatar
Posts: 25
Joined: Mon Oct 27, 2014 1:46 pm
Location: Japan
Calculators: Casio Cfx Series, Casio fx-9860G, Casio fx-9860 GII, Casio fx-9860 GII SD Power Graphic 2, Casio fx-CG 10, Casio fx-CG 20, Casio fx-CG 50

Re: Ptune3: Inaccurate frequency measurements

Postby sentaro21 » Wed Aug 22, 2018 2:10 pm

Thanks :D

Because I did not have a measuring instrument, I checked it on a radio easily. ;)
I can confirm clear peak frequency in CG20 when I hear a noise on the radio which air band (118~137MHz) can receive.
I cannot confirm it in CG50.
I think that it is caused by down spread spectrum.

Here is frequency correction update. :)
http://pm.matrix.jp/Ptune3_020.zip

Return to Calculator Hacking/Modding Discussions

Who is online

Users browsing this forum: No registered users and 2 guests