Register

Ptune3: Inaccurate frequency measurements

Discuss issues related to Calculator Hacking/Modding.
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

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: 30
Joined: Mon Oct 27, 2014 1:46 pm
Location: Japan
Calculators: Casio Cfx Series, Casio fx-9860G, Casio fx-9860GII, Casio fx-9860GII SD Power Graphic 2, Casio fx-CG10, Casio fx-CG20, Casio fx-CG50

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: 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: 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: 30
Joined: Mon Oct 27, 2014 1:46 pm
Location: Japan
Calculators: Casio Cfx Series, Casio fx-9860G, Casio fx-9860GII, Casio fx-9860GII SD Power Graphic 2, Casio fx-CG10, Casio fx-CG20, Casio fx-CG50

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
Image

Member
User avatar
Posts: 30
Joined: Mon Oct 27, 2014 1:46 pm
Location: Japan
Calculators: Casio Cfx Series, Casio fx-9860G, Casio fx-9860GII, Casio fx-9860GII SD Power Graphic 2, Casio fx-CG10, Casio fx-CG20, Casio fx-CG50

Re: Ptune3: Inaccurate frequency measurements

Postby sentaro21 » Thu Feb 21, 2019 7:37 am

Thanks to SimonLothar, It was confirmed to be the down spread spectrum. :D
SH7305 registers (complete list)
"A4150044 dd dd SSCGCR (Spread spectrum control)"

Here is new update version corresponding to spread spectrum control (on/off).
http://pm.matrix.jp/Ptune3_021.zip
Image

Return to Calculator Hacking/Modding Discussions

Who is online

Users browsing this forum: No registered users and 30 guests