any frequency? Message #5 Posted by Ellis Easley on 31 May 2003, 11:11 a.m., in response to message #2 by Ellis Easley
I completely overlooked the granularity of such a program. If the tightest possible loop (something like "out, xor, jump", with no way out) generates a frequency of F, adding one more instruction in the loop might generate (F*4)/3, if all instructions took the same time. On something like a Pentium, that shortest loop would generate a frequency in the megaHertz (possibly) so you could add a timing loop inside the loop to increase the period (and lower the frequency inversely) proportional to the count of the inside loop to generate any period that is a multiple of a few microseconds. Plus you could add a way out! But the HP41 runs so slowly that the granularity would be much larger - maybe the range of synthetic tones is the practical limit. I found the graphical chart of synthetic tones, it's not in the PPC ROM manual, although that has a table of all synthetic tones - this chart is in another PPC book and says it corrects some times in the PPC ROM manual table. It looks to me like the synthetic tones only include 16 frequencies (in Hertz): 105,113,121,131,143,158,175,197,225,263,315,394,525,629,788,1051. Each frequency is available in 8 durations, varying from 0.02 to 5 seconds depending on the frequency. The chart appears to show that each duration of a given nominal frequency produces a slightly different frequency.
|