Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchscreen, battery and so on.. #4

Open
DearVa opened this issue Jun 27, 2023 · 2 comments
Open

Touchscreen, battery and so on.. #4

DearVa opened this issue Jun 27, 2023 · 2 comments

Comments

@DearVa
Copy link

DearVa commented Jun 27, 2023

Apologize for my disturbance. I just got my HP Prime and ready to coding (Hope to have one since high scrool and I'm in college now)! After surfing lots of web museums I'm so excited that you have made this repo I can learn from. However, after reading your code, there is no interface abou touchscreen and battery and so on. How can I get resources about these things? Thanks.
ps: s3c2416 related resources seems not enough.

Sent from PPHub

@boricj
Copy link
Owner

boricj commented Jun 28, 2023

There is a fork of QEMU out there that supports the HP Prime G1. The most advanced version I know of is this fork, which supports the touch screen: https://github.com/opcod3/qemuPrime. From what I recall, that person reverse-engineered the touch screen's Linux driver source code to emulate the device inside QEMU because we could not find a datasheet for this chip.

As for the battery level I do not know. It's probably either measured with an ADC over a high impedance voltage divider (like the NumWorks calculator: https://www.numworks.com/resources/engineering/hardware/electrical/schematics/) or there's a battery management chip that the calculator communicates with. One of the original developers confirmed it's a voltage divider for the G2 model, but he did not remember how it was done for the G1 model: https://hpmuseum.org/forum/thread-14125-post-124857.html#pid124857

Note that nearly all my work on the HP Prime was done on the G1 model, which was discontinued a couple of years ago. Somebody else played around with the current G2 model, if that's what you have: https://www.zephray.me/post/hp_prime_g2_linux/

I haven't played around with HP Prime calculators in a long time, but feel free to ask questions. There aren't a lot of resources on these out there and there's always the odd chance I remember something useful if I'm asked something specific.

@DearVa
Copy link
Author

DearVa commented Jun 28, 2023

There is a fork of QEMU out there that supports the HP Prime G1. The most advanced version I know of is this fork, which supports the touch screen: https://github.com/opcod3/qemuPrime. From what I recall, that person reverse-engineered the touch screen's Linux driver source code to emulate the device inside QEMU because we could not find a datasheet for this chip.

As for the battery level I do not know. It's probably either measured with an ADC over a high impedance voltage divider (like the NumWorks calculator: https://www.numworks.com/resources/engineering/hardware/electrical/schematics/) or there's a battery management chip that the calculator communicates with. One of the original developers confirmed it's a voltage divider for the G2 model, but he did not remember how it was done for the G1 model: https://hpmuseum.org/forum/thread-14125-post-124857.html#pid124857

Note that nearly all my work on the HP Prime was done on the G1 model, which was discontinued a couple of years ago. Somebody else played around with the current G2 model, if that's what you have: https://www.zephray.me/post/hp_prime_g2_linux/

I haven't played around with HP Prime calculators in a long time, but feel free to ask questions. There aren't a lot of resources on these out there and there's always the odd chance I remember something useful if I'm asked something specific.

Thank you so much for replying to me in such detail. I'm using G1 (v2) now and planing to run FreeRTOS on it. Before that I've tried your Epsilon repo but it cannot run properly (screen blinks and reboot loop), which I'm trying to fix. Because I'm a CSharper, so I'm also planning to run my c# code on hp prime.
Anyway, your reply helps a lot! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants