You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

reading the battery voltage on TI nspire CX

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/Calculator Talk publicado por u/nspiredev500 February 23, 2020, 02:34:43 PM
I want to show the battery charge to the user while my program is running, so I have to read it myself.
To test it I made a small program that reads the voltages and shows them, but it only works in firebird, not on my CX CAS HW-AA.
In firebird it shows:
VBATT: 6.0
VSYS: 6.0
B12: 3.0

on my calculator:
VBATT: 0.0
VSYS: 4.0
B12: 0.0

Is my program or my calculator broken?
Or is only VSYS used in real calculators?

At 50% my calculator now shows 3V for VSYS, so it really seems only VSYS is used.

Thanks in advance if anyone knows more, I haven't found anything about this.

Here is the hackspire entry for the ADC:
https://hackspire.org/index.php?title=Memory-mapped_I/O_ports_on_CX#C4000000_-_Analog-to-Digital_Converter_.28ADC.29

my program (download link from my omnimaga post, codewalrus doesn't seem to like zip files)
Inicia sesión o crea una cuenta para dejar un comentario
u/nspiredev500 April 01, 2020, 05:11:39 PM
It turns out it was just bad programming, the division was an integer division and the result was converted to a floating point number.
VBATT is still 0, but when hovering over the battery icon in firebird is says something about AAA-batteries.
Maybe you can put extra batteries in the calculator and that would detect that.
Start a Discussion

b/Calculator Talk

Saw a cool TI, HP or Casio program out there? Need help programming or installing a software? This place is for you.

283
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal