Post Reply 
Sound/Beeper Software / Hardware acces on HP48
10-05-2016, 05:36 PM
Post: #5
RE: Sound/Beeper Software / Hardware acces on HP48
(10-05-2016 01:41 PM)TomC Wrote:  Christoph:

Thank you for your helpful/informative reply.

If you have any code segments to share, that would be highly appreciated.

TomC

I'm mainly coming from the other direction. The main question for me was, how to convert the digital output on the OUT pin to a sound output for Emu48?

Here's an assembler code example for a 400Hz tone with 5s duration. The beep flag must be enabled, the clock should be off.

Code:

TITLE Tone 400Hz 5s

ASSEMBLE
  NIBASC /HPHP48-E/

RPL
CODE
        GOSBVL  =SAVPTR         save register

        P=      0
        LC(5)   400             D[A] frequency (hz) = 400Hz
        D=C     A
        LC(5)   5000            C[A] beep duration (ms) = 5s
        GOSBVL  =makebeep

        GOVLNG  =GETPTRLOOP
ENDCODE
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 05:36 PM



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