# HP Calculator Wiki

### Site Tools

20b:using_jtag

To use a JTAG interface, you will need 3 items: - a modified calculator - a JTAG interface - a program that can use the JTAG interface.

The calculator needs to be opened, and a JTAG header needs to be soldered. The JTAG header is a standard 16 pin Berg SMT header with 2.54mm spacing. I have a picture, but I do not know how to upload it, so if someone that know how that whole wiki knows, please drop me an email and I will send you the picture.

The soldering job is easy, even for a SW engineer. You can use a simple $20 soldering iron from Radio shack if you do not have one (I use a gas powered one personally).. I advise that you make a hole at the bottom of the calculator in order to allow to close the calculator back up while still having access to the JTAG (here again, I have a picture)… the hole should cover the height of the recessed space at the bottom of the calculator back and be around 4.5cm wide. Then, install the JTAG drivers, connect the JTAG interface to the PC and the board and you are ready to rock and roll. I use the Atmel SAM-ICE JTAG (around$150 or so) available at Digikey or Mouser….

For the PC side, I use the IAR tools, and I advise that you use them also as the demo projects given by HP are using them also.

Compile the project, 'debug' and here you are!

They are however restrictions. - The debugger has only 2 breakpoints that you can use (because the ARM has only 2 hardware assisted breakpoints). - Programming works much easier if you erase the flash first manually. - The debugger does not work if and when the CPU goes in sleep or OFF mode. (This is why I always debug with the calculator in 'TestSystem' mode.)

(Here's what my JTAG slot looks like. It's about 1.1“ by 0.35”. Now that I've put it all back together, the JTAG IDC connector is just a little close, so I should have extended the slot down closer to the bottom rubber foot. I tried to avoid digging too deep into the area where the back door latches engage. The plastic is soft; I used a Dremel with a carbide burr and had no trouble at all. –newell)

(For the 16 pin JTAG connector, I used an FCI 95278-101A16LF from Mouser, part number 649-95278-101A16LF, \$0.75/each. Before the connector arrived, I was using 24“ lengths of wirewrap wire soldered to the JTAG pads, and that worked fine, but it was a bit messy. –newell)