From: joehorn@usa.net
Newsgroups: comp.sys.hp48
Subject: Re: HP48 as a thermometer?
Date: Wed, 15 Jul 1998 00:14:51 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 65
Message-ID: <6ogs9r$e7c$1@nnrp1.dejanews.com>
References: <35AB333E.9ED5670@ulb.ac.be> <1998071412123400.IAA03489@ladder01.news.aol.com>
NNTP-Posting-Host: 206.17.159.29
X-Article-Creation-Date: Wed Jul 15 00:14:51 1998 GMT
X-Http-User-Agent: Mozilla/4.01 [en] (Win95; I)
Xref: republic.btigate.com comp.sys.hp48:13303

ANatsume wrote:

> I don't know, I'm going to start calculating it... (One can find out the
> processor speed by going into test mode On-D, and hitting A to display the
> speed)

Or use the program below.  Or call it from your own program, like in
a loop, looking for the "average" clock speed.

> I would say 5-8 tests for each reading would be fine.

Perhaps not; remember, the HP48 clock speed is purposely "jittered" to
reduce RF noise.  In other words, the clock speed is constantly
changing chaotically, and cannot be expected to stabilize under any
circumstances (except when the batteries are out :)

> At room temperature, the speed is usually 3.750 or 3.751 MHz..

Depends on your HP48.  Some are almost 4MHz.  Mine is a very slow
machine, usually around 3.74MHz.

Here's the program, in Jazz format and in Wickes' ASC format.
It obsoletes the SPEED program that I posted some time ago, which
fudged the York clock patch; this version is the actual code used
by the self-test, so the results are identical.

%%HP:T(1);
@ SPDG, returns the clock-speed (G/GX ONLY)
@ by Joe Horn
"::
 CK0
 CODE
	GOSBVL	=SAVPTR
	GOSBVL	=DisableIntr
	GOSBVL	#1D44
	A=0	W
	GOSBVL	=clkspd
	C=B	A
	CSRB.F	A
	C=C+A	A
	A=0	W
	A=C	A
	GOSBVL	=DispOn
	GOSBVL	=AllowIntr
	ASL	W
	GOSBVL	#54371
	GOSBVL	=PUSH%LOOP
ENDCODE
;"

BYTES: #987Ch 50.5

%%HP:T(1);
@ SPDG, returns the clock-speed (G/GX ONLY)
@ by Joe Horn
"D9D20E1A81CCD20150008FB97608F511108F44D10AF08F2E810D9819F2C2AF0D
A8FF8B108F5E010BF08F173458FD32A2B2130C789"

INPUT: none
OUTPUT: clock speed (as a real number)

-Joe-

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum