Parts: Unboxing the Bus Pirate

bp-unbox-3

For months we’ve used our Bus Pirate universal serial interface tool to demonstrate electronics parts, so it’s only appropriate that the Bus Pirate get it’s own parts post. We recently had a Bus Pirate preorder, and today we received the pre-production Bus Pirate prototype from Seeed Studio. This prototype was mailed just a few days before preorder 1 started to ship, so those packages should start arriving any day.

Follow along as we unbox the prototype Bus Pirate, and connect it to a debugger to determine the PIC24FJ64GA002-I/SO revision that shipped with this board. Use this post to share your own Bus Pirate unboxing experience. Pictures and discussion after the break.

bp-unbox-1

Most Bus Pirates will ship in a padded envelope (JPG), but ours came in a box with some PCBs for future projects and an AVR programmer.

bp-unbox-2

Inside the box, the Bus Pirate is protected by a static dissipative bag. The Bus Pirate pin headers are stuck in foam to protect the packaging.

bp-unbox-5

We ran a battery of functionality tests that covered USB, the user terminal, protocol libraries, power supplies, and pullup resistors. Everything passed our tests.

Next, we used a Microchip ICD2 debugger/programmer to make a backup of the firmware prior to doing a test upgrade/downgrade with the bootloader.

Connecting to MPLAB ICD 2
…Connected
Setting Vdd source to target
Target Device PIC24FJ64GA002 found, revision = Rev 0x3042
…Reading ICD Product ID
Running ICD Self Test
…Passed
MPLAB ICD 2 ready for next operation

All of our previous Bus Pirate version were built using Rev 0x3003 (A3) of the PIC 24FJ64GA002. Version A3 has a few issues, known as errata (PDF), one of which is a flaky hardware I2C module. These chips aren’t ‘defective’, they just have a few quirks like any complicated integrated circuit. The Bus Pirate firmware works around these issues using software techniques. Most desktop computer processors go through a similar stepping process.

Our Bus Pirate appears to have a B4 revision PIC (0x3042) that corrects some, but not all, of the errata from A3. This is no guarantee that every Bus Pirate will have a B4 PIC, preorder 1 and 2 are both sourced from multiple international vendors. Additionally, there’s no immediate benefit from having a B4 chip, someone will have to write software that takes advantage of the hardware. The next firmware update will print the PIC revision in the user terminal, check the nightly compiles if you’re anxious.

There is a revision B5 mentioned in the PIC errata. Some of these might find their way into preorder 2 boards.

bp-unbox-0

Now that you’ve got your Bus Pirate, what do you do with it? We’ve got a bunch of part demonstrations to get you started.

Please leave a comment about your unboxing experience, and the devices you plan to interface.

Comments

  1. snorkle256 says:

    I just got mine in the mail and there must be some mistake. I was sure I ordered a Butt Pirate, not a Bus Pirate. :(

  2. LukeS says:

    I bought one and waiting for it to come in the mail. Is there a windows GUI under development where you could sent direct commands to bus pirate? Also it would be cool to be able to write macros and save them as a file the GUI could load up.

  3. Joe says:

    Lukes: It’s just a serial interface. A “macro” would simply be a text file that you paste into your terminal application.

  4. pt says:

    great work guys – very cool to see a HaD kit!

  5. Drone says:

    Just got my BP in Jakarta. Delivered 02:35 GMT Tuesday 21 July 2009.

    It jumped out of the box and is hiding under the refrigerator. I put some components on the floor to lure it out; but it’s not interested.

  6. vonskippy says:

    When I opened mine, I cut a big cut on my finger. I’m not sure if it’s just a paper cut, or if the bus pirate came with a itty bitty sword.

  7. Pilotgeek says:

    All I ever see on this site anymore is some advertisement for the “bus pirate”.

  8. Pilotgeek says:

    Or how someone simply used an Arduino for something.

  9. unhappy geek says:

    Oh that’s great….
    Missed both pre-orders and now I’m the most unhappy poster here ;(

    Is there any news when we can order again.

    Come on you risk to split up the community in “the-bus-pirates-owners-who-laugh-loud” and “the-others-who-have-to-fiddle-around-with-many-other-tools-and-cry-silently”

    … I warn you this can easily become a serious problem…

    remember US and Soviets about having A-bombs or having no A-bombs resp. having more A-bombs…

    or other bad wars about having oil resp. having no oil…

    you get it…

    you have to provide more bus-pirates soon or bad bad things will happen ;)

    * people will start selling, car, house, wife to get a bus-pirate-unit on black-market for horrible prices.
    * there will be distrust and great disharmony along the community
    * i guess suicide will increase rapidly
    * people will fight, steal, rob, murder…
    * etc. etc. etc.

    and it is all in your hand to prevent this crazy hack-a-war!!!!

    Hope to order soon :D

  10. Drone says:
  11. Drone says:

    I can’t use TeraTerm with the BP on my laptop. The FT232 driver shows the BP on COM7 with COM1-6 “in use”.

    Only COM-1 and 2 are physically being used as far as I can tell. Nothing special in the BIOS settings. Why are COM3-6 showing up “in use”?

  12. P. Fnord says:

    How come every time I visit this site there’s a new article about this project? I’m starting to get tired of reading about the bus pirate…

    No offense – I know how it is – you’re proud of your project and really want everyone to see it, but advertising it that aggressively gets disturbing over time…

  13. Ian Lesnet says:

    @p. fnord – Please bear with us just a little bit longer. Sales ended July 3, but we want to keep people updated about the status of the preorders. There’s going to be an update on preorder 2 later today, but news should slow down significantly after that.

  14. bob says:
  15. masch says:

    damn, i ordered one when preorder 2 was announced – but unfortunately didn’t write down the bank account info. i never got a confirmation mail and no one answers the contact-form, where i asked for the details.. sucks

    seems i won’t be holding that nice little thing in my hand in the next weeks :-(

  16. Yeah, any idea when those of us who missed the boat the first time around will be able to order? I really want one…

  17. kris says:

    drone: in teraterm, don’t you just adjust the “MaxComPort=xxx” line in teraterm.ini if you want higher than the default 4?

  18. Drone says:

    kris, tnks for the tip on teraterm COMX>4 didn’t know about it. BP working great here.

  19. My unboxing photos: http://www.flickr.com/photos/andrew_bolin/sets/72157621773801874/

    So far no luck talking to it.
    I see “com5″ appear on my computer, but nothing shows up in HyperTerminal. What settings should I be using? 115200,8,n,1 ?

  20. never mind, tera term talks to it :)

  21. Ian Lesnet says:

    @mephistopheles – those settings are correct, be sure to set hyperterminal to COM5. You might also need to change the line feed type to unix. Hyperterminal is a little cranky sometimes, we really like Terra Term.

  22. @ian – mine seems more than a little cranky, it won’t even show anything when I enable local echo. :\

    I think I’ll be sticking to tera term for all my serial needs from now on.

  23. peter says:

    Just got mine working.

    using vista 64. couldnt get it to respond under hyper term. so i thought i would check the bootloader. comes up with a message ‘unable to find comdlg32.ocx. AARRGGHH. ok, i thought i would fire up my pickit2. hook it up. then i get the message “Ensure proper capacitance on VDDCORE/VCAP pin” ok, double AARRGGHH.
    then i saw the posts about teraterm etc. well downloaded, copied the .ini file out edited and copied it back (vista wouldnt let me save wher it was) and then i could select com6. 115k and wow it works. Also then managed to reconfigure hyperterm to work as well. so my only worry now is whats up with the pickit2 message.
    Oh and are there forums for this somewhere?

  24. peter says:

    would i be right in saying that the pgc and pgd wires on the icsp header are swapped compared to the pickit2?

    ah well its late more testing tomorrow.

  25. Ian Lesnet says:

    @peter – We’ve never used the PICKIT2, we used an ICD2 to develop the project and it has the annoying phone jack connector. We usually use the most convenient arrangement of PGC/PGD, depending on the location of the ICSP header.

    You can install a copy of comdlg32.ocx by installing the Microchip bootloader application note source code.

    There’s release candidate (RC2) for the next firmware version available on the Google code page, if you’re interested. Since you have a ‘real’ programmer you can also update to the new bootloader that has cleaner code and a visual indicator of bootloader status.

  26. peter says:

    ian,
    thanks for the quick reply.
    once i make an adaptor to the pickit2 i will look at uploading the new firmware/bootloader.
    I had a little giggle to myself when i realised the webserver board has the icsp how i would expect them :)

    Ill let you know how i go with the new software etc.

  27. ronnie says:

    just got mine. I love this thing, it’s so damn handy. I tested it out with an i2c lm75a temp sensor. :)

  28. bro says:

    hmm – received my bus pirate today – I wasvery keen on trying it out – however it seems I’m out of luck :/ or doing something wrong.

    I followed the ds2431 tutorial – the bus-pirate can’t seem to find it (0xf0) or read the id (0x33).
    I tried setting the pull-up to on and off using and not using an external pullup (1,2.2, 4.7, 10)kohm
    (Not a chip fault – I can interface it with my attiny2313)

    Then I tried something else – accessing an 2Ca16b1 Serial eeprom from ST — no luck either.
    All packages get acknoledges – reading back returns (somehwat similar to 1-wire above) 0x00 …
    (I used the serial i2c eeprom tutorial as orientation)

    Using the (1) macro to search the i2c bus for adresses I (not)suprisingly receive an ack on every adress!
    1.7bit address search
    I2C>(1)
    Searching 7bit I2C addresss space.
    Found devices at:
    0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x.. 0xFF

    –> So either I’m too stupid or my (fresh out of the box) bus-pirate is broken.

    Looking forward to receiving any hints.

  29. Ian Lesnet says:

    @bro – sounds like there’s no pull-up voltage. Press ‘V’ in the terminal to see the voltage report. Please post it here or at the link in my name.

  30. bro says:

    Hi,
    thanks for your fast response

    HiZ>v
    VOLTAGE MONITOR: 5V: 0.0 | 3.3V: 0.0 | VPULLUP: 0.0 |
    HiZ>M
    1. HiZ
    2. 1-WIRE
    3. UART
    4. I2C
    5. SPI
    6. JTAG
    7. RAW2WIRE
    8. RAW3WIRE
    9. PC KEYBOARD
    10. MIDI
    (1) >4
    MODE SET
    I2C routines Copyright (C) 2000 Michael Pearce
    Released under GNU General Public License
    I2C READY
    I2C>v
    VOLTAGE MONITOR: 5V: 0.0 | 3.3V: 0.0 | VPULLUP: 0.0 |
    I2C>P
    1. Pullup off
    2. Pullup on
    (1) >2
    PULLUP RESISTORS ON
    I2C>v
    VOLTAGE MONITOR: 5V: 0.0 | 3.3V: 0.0 | VPULLUP: 0.0 |
    I2C>W
    POWER SUPPLIES ON
    I2C>v
    VOLTAGE MONITOR: 5V: 4.9 | 3.3V: 3.3 | VPULLUP: 0.0 |
    I2C>P
    1. Pullup off
    2. Pullup on
    (1) >2
    PULLUP RESISTORS ON
    I2C>v
    VOLTAGE MONITOR: 5V: 4.9 | 3.3V: 3.3 | VPULLUP: 0.0 |

  31. Ian Lesnet says:

    Connect the Vpullup (Vpu) pin to a power supply (3.3, 5, or whatever).

    The pull-up resistors can be supplied any arbitrary voltage 0-5volts. They’re supplied through a pin so you can use the power supply of the host circuit, a local supply, etc.

    I’m working up a self test firmware now.

  32. bro says:

    hmm – okay i2c seems to work with this setup (yippie – thanks a lot)
    (however this should perhaps have been mentioned in the i2c eeprom tutorial – or in the ‘initial setup readme :)

    However I still wonder a bit about this

    I2C>(1)
    Searching 7bit I2C addresss space.
    Found devices at:
    0xA0 0xA1 0xA4 0xA5 0xA8 0xA9 0xAC 0xAD

    The device has an i2c address of 0b1010xxxy
    The xxx pins are tied to ground -> 000
    And y is read/write -> this explains the ack in 0xa0 und 0xa1 – but what about the others?

    1-wire: I still don’t manage to get this one working – as (atleast how I expect) has no direct consequences wether vpu is bridged to vcc when I use an external pullup ?

    Thanks alot,

  33. bro says:

    sorry for my bad spelling – getting late :)

  34. bro says:

    okay – 1 wire works too ;) – but don’t ask my what was wrong beforehand.

    Thanks!

  35. Ian Lesnet says:
  36. Ian Lesnet says:

    The I2C eeprom syntax is different because it was for the very first version of the Bus Pirate that had different pull-up resistors. I’ll do an updated demo with v2go and post the complete syntax somewhere, thanks for pointing that out.

    Also refer to the section about how the pull-up resistors work in the v2go article.

  37. bro says:

    Hi ian,

    thank you very much for your support!
    Although I can read the id of my two 1-wire eeproms, writing seems to fail:

    1-WIRE>(240)
    1WIRE ROM COMMAND: SEARCH (0xF0)
    Found devices at:
    Macro 1WIRE address
    1.0x2D 0xB7 0xDC 0xEF 0x00 0x00 0x00 0xF9
    *DS2431 1K EEPROM
    Found 0x01 devices.
    The first 10 device IDs are available by MACRO, see (0).

    1-WIRE>(85)(1) 0xf0 0x00 0x00 0 1 2 3 4 5 6 7
    1WIRE BUS RESET OK
    1WIRE WRITE ROM COMMAND: MATCH (0x55) *follow with 64bit address
    1WIRE ADDRESS MACRO 1: 0x2D 0xB7 0xDC 0xEF 0x00 0x00 0x00 0xF9
    WRITE: 0xF0
    WRITE: 0x00
    WRITE: 0x00
    WRITE: 0x00
    WRITE: 0x01
    WRITE: 0x02
    WRITE: 0x03
    WRITE: 0x04
    WRITE: 0x05
    WRITE: 0x06
    WRITE: 0x07

    1-WIRE>(85)(1) 0xaa r:3 r:8 R:2 r:2
    1WIRE BUS RESET OK
    1WIRE WRITE ROM COMMAND: MATCH (0x55) *follow with 64bit address
    1WIRE ADDRESS MACRO 1: 0x2D 0xB7 0xDC 0xEF 0x00 0x00 0x00 0xF9
    WRITE: 0xAA
    BULK READ 0x03 BYTES:
    0xFF 0xFF 0xFF # WRONG – should be 0x00 0x00 0x07;
    BULK READ 0x08 BYTES:
    0xBF 0xE7 0x83 0xFF 0xFF 0xFF 0xFF 0xFF
    BULK READ 0x02 BYTES:
    0xFF 0xFF
    BULK READ 0x02 BYTES:
    0xFF 0xFF

    I tried it with a 1k and 2.2 and 4.7kohm external pullup.

    Any ideas?

  38. Ian Lesnet says:

    @bro – Let’s move this so we don’t fill the comments with long chunks of code.

  39. bro says:

    okay – sorry for spamming – I registered on your forum, maybe we can talk there.

    However @hackaday team – it seems that I’m missing an LED at vreg
    see http://tinyurl.com/bus-pirate-png

    Does this have any consequences to the circuit?

  40. Ian Lesnet says:

    @anyone with problems – I added a self-test to the newest firmware (updated to V2.0 to sync with the hardware).

    Press ‘~’ in the terminal and follow the instructions for the a self check. You’ll need to connect the +5V pin to the Vpu pin and the +3.3V pin to the ADC pin.

    The Bus Pirate will check its control pins, ADCs, voltage regulators, pull-up resistor control, and three different pin states.

  41. Stu says:

    Hey.
    I took delivery of my BP saturday morning – thanks postie for waking me up early!
    Still, got to play with a cool piece of kit. In fact after working out some of the caveats during installation, I made a quickstart vid for those using Windows XP/Vista, put it up on YT-
    http://www.youtube.com/h3liosphan
    Hope you like it, and please post on the comments if you discover any of your own caveats.

  42. clint says:

    Got mine in the mail yesterday (on 7/27/09). It looks very well built. Haven’t had a chance to use it yet though – too busy with other things.

  43. Ian Lesnet says:

    @stu – great video.

    @bro & other with 1-wire problems – Make sure you use a pull-up resistor of 2.2K or smaller value on the 1-Wire bus. I used a 1.8K external pull-up resistor to re-do the 1-wire demo with version 2go hardware and v2.0 firmware.

    For parasitically powered devices, like the DS2341, you *must* use a small value pull-up or the write will fail. I couldn’t get it to work with the Bus Pirate’s on-board 10K pull-up resistors, there’s just not enough current to complete the write.

    The original demo wasn’t a problem because v0a and v1a hardware had 2.2K on-board pull-up resistors. The v2go 10K resistors could be replaced with smaller values, but they’re only intended to provide a very weak pull-up out of concern for smoking the CD4066 used for software control.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,571 other followers