User Tools

Site Tools



Keyscanner / Display Tester


A simple SRAM resident keyscan/display test.


Boot calc into test mode (to allow stock firmware to configure and init the chip), connect a debugger, halt the chip, download the image, and let 'er rip. It'll probably corrupt anything you had in ram before.

Readme file

This is a bare bones example program for the HP20B. It runs from ram, in Thumb mode, and assumes that the stock firmware has completely initialized the hardware.

Build the code. You'll want to modify the path to gcc in the makefile.

Once compiled and linked, you'll have a .hex and .elf file. Use whichever your debugger perfers. Entry point is 0x2ff000. Startup is in ARM mode and switches to Thumb when it hits main, so be sure the core is in ARM mode to start.

I'm using OCD Commander under win2k, so I like to start by placing the calc in self test mode, turn on TSys and verify that the alpha display is scrolling. I start OCD Commander, configure the connection, and then stop the target. I check that the scroll has stopped. I like to restart the target and see the scroll start again to verify my connection. Configure as little endian, “reset”, “down” to download the image file, and then “go” to run it.

I've also tried OpenODC. Once connected, I do a “soft_reset_halt”, then a “load_image scancode_demo.hex”, followed by a “resume 0x2ff000”.

Yes, the code is ugly. Fix it at your own risk. Consider it nothing more than a toy to demonstrate that we know a little about the hardware.

Happy HP Hacking!

20b/software-keyscanner.txt · Last modified: 2008/07/28 19:18 by newell