Re: hp50g single "CLICK" from the beeper



On Sep 26, 5:15 am, davoremard <davorem...@xxxxxxxxx> wrote:
HI

How to obtain single CLICK (former hp48 toggle of the OUT bit 11 would
click the piezoelectric beeper). I need this to support correct sound
from
phoenix (and maybe hapaman).

On hp50g there is command BEEP2 from saturn+ emulation but at its
minimum it still does too much - 4 clicks (done in 2 up and down
pulses).
e.g. execute this MASD code while put hp50g at your ear and you'll
hear
4 clicks

CODE
SAVE
LC(5) 1  D=C.A  % 1 Hz beep frequency
LC(5) 1 % 1 ms duration
BEEP2
LOADRPL
ENDCODE

Execution of BEEP2 command should last only 1 millisecond and produce
a
1 single click but it will last 2 seconds and produce 4 clicks because
it doesn't
want to make less than 2 full pulses therefore it even exceeds
millisecond duration
of the execution set by register C. (some may even find that's a bug)

Something like BEEP1 would be more suitable but it doesn't exist on
saturn+
emulation. Can someone present an ARM code to for a single CLICK?

Best regards, Davor

Interestingly enough, it has the exact same effect as the USERRPL "1 1
BEEP", except that the USERRPL version obeys the BEEP flag.
The interesting thing is that for the USERRPL version, duration is in
seconds.
What this shows is the emulation works by using a sample of a sine
wave, with a minimum of 2 cycles. The way the duration is used is to
calculate the number of times that output needs to be repeated,
rounded up. So the minimum possible duartion at 1 HZ is 2 sine waves
so 2 seconds, including two maxes and two mins, accounting for the
four clicks.
You get the same result if you request 1 ms or 1 second. Oddly enough,
requesting two seconds with the userrpl command results in 6 clicks
over 3 seconds. Must be a rounding issue.

So you definitely will not get anywhere with the emulated beep
commands.

Unfortunately, I have never touched the ARM programming, so I have no
idea how to directly control it, perhaps somebody else does though.
.



Relevant Pages

  • Re: Theoretical Bullshits and Disassemblers
    ... I'd love for the halting problem to be solved. ... issuing a "PRINT a" command and gathering the result. ... The aforementioned "USR" command launches the machine code at an address ... machine code routine may well go into an infinite loop, and that emulation ...
    (alt.lang.asm)
  • Re: Matrix operations in SysRPL
    ... UserRPL has only a _per-command_ overhead for some protection ... any faster when called from a user command ... SysRPL function is very satisfactory, ... in an extremely slow manner, ...
    (comp.sys.hp48)
  • Re: Matrix operations in SysRPL
    ... UserRPL has only a _per-command_ overhead for some protection ... any faster when called from a user command ... SysRPL function is very satisfactory, ... in an extremely slow manner, ...
    (comp.sys.hp48)
  • Re: What ex commands do you use most in vi[m]?
    ... > I'm thinking about implementing ex command emulation in my product (a ... > viemulator for Visual Studio which currently emulates ... Unless you have burning desire to contact me, ...
    (comp.editors)
  • Re: SEDT / JED EDT compatibility?
    ... Command: Turn on EDT Emulation. ... Command: Set scroll margins. ... Command: Turn on TPU/edt emulation. ...
    (comp.os.vms)