Post Reply 
Sound/Beeper Software / Hardware acces on HP48
10-05-2016, 07:17 AM
Post: #3
RE: Sound/Beeper Software / Hardware acces on HP48
(10-02-2016 06:46 PM)Claudio L. Wrote:  
(10-02-2016 04:46 PM)TomC Wrote:  Does anyone have experience directly accessing the 'Beeper' output on the Saturn processor in the HP48.

I realize that this is a single pin and not a conventional DAC (Digital to Analog Convertor) as one might like/expect.

There have been some interesting examples in the (distant!?) past....in particular a couple that come to mind were named something like 'TV' and 'Television' as found in hpcalc.org and the fine Horn disks. The aforementioned apps obviously directly accessed the beeper - producing a convincing static, relatively wide audio bandwidth.

I've studied all of the available hardware/assembly documents on the HP48, and I find no reference to beeper/sound functionality.

Any helpful recommendations are greatly appreciated,
TomC

Try here:

http://www.hpcalc.org/details/1753

Section 4.8 is what you are looking for.

It's not so easy as it looks like.

The delay for the half time period of the frequency must be generated by CPU waiting. Therefore you're creating a loop and with the knowledge of the CPU cycles for each opcode you know the overall CPU cycles and so the delay.

But, on all Saturn calculators with external static memory, in the case of the HP48 these are ROM and also RAM data access, most of the CPU cycles for each opcode are differ when they are executed on an even or odd address. So in consequence, your code is lying in RAM, you must be sure that your delay code always begin on an even or odd address, depending what cycles you use for calculation.

The beep code of the HP48 is lying in ROM, so the address of the the delay code never move. With an assembler trick in connection with the BSS assembler command HP force the delay code lying on an even address.

Next and final point, the CPU speed is not constant and depend on temperature, humidity and other factors. To get a better accuracy the CPU speed is measured from time to time. Writing an own beeping routine should include this speed correction also.

Conclusion, to get best results use the =makebeep entry for sound output on the HP48.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Sound/Beeper Software / Hardware acces on HP48 - Christoph Giesselink - 10-05-2016 07:17 AM



User(s) browsing this thread: 1 Guest(s)