Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Battery voltage for both 49g+ and 50g

130 views
Skip to first unread message
Message has been deleted

Edwin

unread,
Nov 8, 2006, 5:36:11 PM11/8/06
to
Good information Chuck. I am not owner of a Hp50, for that reason I
dont know if the conversion becomes from 0 to 4.5V or from 0 to 6,0 V
in the Hp50.
I complement the code with my source code


::
SaveSysFlags
BINT111
BINT2

CODE
SAVE
INTOFF
SKUB {
*start
!ARM
STMDB sp! { R4 R5 R6 R7 R8 LP }
MOV R2 $7C00000
ADD R2,R2 $0C
LDR R2,[R2]
STR R2,[R1 #2316]
LDMIA sp! { R4 R5 R6 R7 R8 PC }
!ASM
*end
}
C=RSTK D0=C
D1=80100
LC(5) end-start MOVEDN
LC 80100 ARMSAT
INTON
LC 003FF
A&C.A
GOSBVL PUSH#ALOOP
ENDCODE
* Edwin Cordoba's Excellent code
UNCOERCE
PTR 2F3C7
* Thanks to JYA for this ptr
* T = 50g F = 49g+
ITE
% .005859375
* % 6. % 1024. %/
% .00439453125
* % 4.5 % 1024. %/
%*
BINT2
DOFIX
DO>STR
CHR_V
>T$
$>grob
XYGROBDISP
SetDA1Temp
RestoreSysFlags
;
@

Edwin Córdoba.

On 8 nov, 15:44, "CRushton" <c.rush...@earthlink.net> wrote:
> The following program is an attempt to display the voltage for either the
> 49g+ or 50g.
>
> It uses Edwin Cordoba's code from BatStatus 1.3http://www.hpcalc.org/details.php?id=6400
> and detects which model based on a pointer posted by JYA.
>
> With new alkaline batteries, it displays 4.49V or 5.99V initially.
>
> With recently charged NiMH such as I use, it starts at ~4.2 or ~5.5.
>
> In addition it displays 0.00V if the 50g is powered by the USB cable.
>
> BTW, it works best with header = 2.
>
> ::
> SaveSysFlags
> BINT111
> BINT2
> CODE 00079
> 8FB9760808F70300F14D29EF1520A3EC002282E0002295EC092185E0F18DB8E071341F00108340300080B60340010880BFF808034FF3000EF68FC7530
> * Edwin Cordoba's Excellent code
> UNCOERCE
> PTR 2F3C7
> * Thanks to JYA for this ptr
> * T = 50g F = 49g+
> ITE
> % .005859375
> * % 6. % 1024. %/
> % .00439453125
> * % 4.5 % 1024. %/
> %*
> BINT2
> DOFIX
> DO>STR
> CHR_V
> >T$
> $>grob
> XYGROBDISP
> SetDA1Temp
> RestoreSysFlags
> ;
> @
>
> 131.5 bytes # 275Ch
>
> A shorter version can return just a real number to the stack. Enjoy.
>
> Chuck Rushton

Veli-Pekka Nousiainen

unread,
Nov 9, 2006, 5:26:54 AM11/9/06
to
Edwin wrote:
> Good information Chuck. I am not owner of a Hp50, for that reason I
> dont know if the conversion becomes from 0 to 4.5V or from 0 to 6,0 V
> in the Hp50.
> I complement the code with my source code
X
You should both send these to the www.hpcalc.org


Message has been deleted

Veli-Pekka Nousiainen

unread,
Nov 9, 2006, 5:50:12 PM11/9/06
to

"CRushton" <c.ru...@earthlink.net> wrote in message
news:MoF4h.4255$0r....@newsread1.news.pas.earthlink.net...

> VPN wrote:
>> You should both send these to the www.hpcalc.org
>>
>
> I would suggest that Edwin perhaps include this as an update to BatStatus.
>
> My only contribution was that of a scurvy marauder in taking his very cool
> code and repackaging it without the graphics. Of course, I also suggest it
> be named 'BAT50' but that's not entirely necessary :-)
>
> Btw, the routine which returns the voltage to the stack is:

www.hpcalc.org
***************

> < Edwin's code ob >
> UNCOERCE
> PTR 2F3C7
> ITE
> % .005859375
> % .00439453125
> %*
>
> (101.5 bytes # E281h)
>
> Chuck
>


mats

unread,
Nov 19, 2006, 8:21:36 AM11/19/06
to
Edwin wrote:
> I am not owner of a Hp50, for that reason I
> dont know if the conversion becomes from 0 to 4.5V or from 0 to 6,0 V
> in the Hp50.

made some measurements on a 50g (running the POWER factory-test):
hex V Message
----------------------------------
#3D1h 5.99 BATTERY NORMAL
#3D0h 5.97 ...
#3B8h 5.83 ...
#3B4h 5.82 ...
#37Dh 5.48
#376h 5.44
#345h 5.15
#333h 5.03
#310h 4.82 ...
#30Fh 4.82 BATTERY NORMAL
#30Eh 4.81 BATTERY WARNING
#302h 4.74 ...
#2FEh 4.72
#2F5h 4.68
#2C4h 4.36
#299h 4.10
#288h 4.00
#262h 3.69 (sporadic TTRM...)

lin-reg: y = .00614247*x ( -> ą.02V;-) compared to 1024/6 = .005859375
BTW: #3FEh is the max. value that is displayed even on 6.75V...

0 new messages