Post Reply 
Alternative flashing WP34S using Bus Pirate
12-02-2014, 02:01 PM
Post: #1
Alternative flashing WP34S using Bus Pirate
I wrote this some time ago but had problems activating my forum account. I've since seen the Arduino method which is very similar to mine. That method also prompted me to take a photo that may be useful.

Here is my original text...

I successfully flashed my WP 34s through a Bus Pirate without manufacturing a cable. I used the MySamba software and it worked fine on Windows XP and 7 Pro.

Please note, I'm not claiming anything new here, just describing what I did with what I had to hand.

First off, we erase the HP 30b via the sequence described in the manual that uses the reset button and jumps ERASE to Vcc on the 6 pad serial interface:

Code:
      Tx(in) Rx(out) Vcc
        .      .      #----.
                           |
      ERASE   GND   RESET  |
        #      .      .    |
        |                  |
        '------------------'
Follow Appendix A steps B1 to B7.

We now have an apparently dead calculator Smile

On my PC I run PuTTY and start a serial session connecting to the Bus Pirate. At the HiZ> prompt type m3 to set up the UART. You could use Hyperterminal or any other terminal emulator I guess, but I use PuTTY a lot - it's the best and it's open source.

The UART settings are: 115200, 8N1, Idle 1, Normal output drivers. Here's a session transcript.

Code:
      HiZ>m3
      Set serial port speed: (bps)
       1. 300
       2. 1200
       3. 2400
       4. 4800
       5. 9600
       6. 19200
       7. 38400
       8. 57600
       9. 115200
      10. BRG raw value
      
      (1)>9
      Data bits and parity:
       1. 8, NONE *default
       2. 8, EVEN
       3. 8, ODD
       4. 9, NONE
      (1)>
      Stop bits:
       1. 1 *default
       2. 2
      (1)>
      Receive polarity:
       1. Idle 1 *default
       2. Idle 0
      (1)>
      Select output type:
       1. Open drain (H=Hi-Z, L=GND)
       2. Normal (H=3.3V, L=GND)
      
      (1)>2
      Ready
      UART>
The HiZ> promt has been replaced by the UART> prompt. We now want to set the UART mode to transparent, no flow control by running the (1) macro:

Code:
      UART>(1)
      UART bridge
      Reset to exit
      Are you sure? y

Exit the PuTTY session as it's locking out other programs on the PC from accessing the serial COM port that we just set up. So quit PuTTY so MySamBa can use it. The Bus Pirate LEDs will remain lit.

Wire from the Bus Pirate to the calculator.

The Bus Pirate has a 10 pin header of which we need just three of those lines:

Code:
      1 - GND
      8 - Tx(out)       // labelled MOSI
     10 - Rx(in)        // labelled MISO
I put a 1Kohm resistor on the Tx line since the Bus Pirate drives out 3.3V rather than the 3V that the calculator expects. It's just a little kinder to the receiving side. I have read elsewhere that people put 1K on the Rx line too, but since that line is not overdriving its receiver another resistor seems pointless to me.

Start MySamBa and select the binary file to flash and the COM port that PuTTY was talking to.

Press the calculator reset button and then the ON/OFF button.

With one hand, hold three flying leads connecting the Bus Pirate to the 3 serial interface pads:

Code:
      Tx(in) Rx(out) Vcc
        #      #      .

      ERASE   GND   RESET
        .      #      .
If that's not clear,

Code:
      pin  8 on the Bus Pirate connects (via 1Kohm) to top left pad Tx(in)
      pin 10 on the Bus Pirate connects to top centre pad Rx(out)
      pin  1 on the Bus Pirate connects to bottom centre pad GND

I use standard male ended bread board jumper leads.

Hold the connections steady and with your free hand click "Send File" in MySamBa. You should see the file transfer progress meter tick along - calc.bin transfers in just 19s for me.

Let go the leads, press reset again, press ON/OFF and there should be signs of life. Annunciator h-3-3-Enter will report the firmware version.

You're done!

PuTTY: http://www.chiark.greenend.org.uk/~sgtat...nload.html
Bus Pirate: http://dangerousprototypes.com

Why use a Bus Pirate?
Because I had one already. I've used it for programming ATtiny chips over SPI, talking to accelerometers and gyros over I2C and for logging on to my Davis weather station console and Raspberry Pi with the 3.3V RS232 UART. They are widely available from Adafruit, Sparkfun, Seeedstudio etc. Expect to pay USD30/EU25/GBP20.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)