#twatch network firmware upgrades

bootload

See the latest version on the documentation wiki.

The #twatch can be updated from a PC on the local network thanks to Microchip’s network bootloader. Bug fix updates, new features, and alternate functions can be programmed into the #twatch using the bootloader. The 18F ethernet PICs can only be programmed an average of 100 times, so upgrades are somewhat limited.

This guide is taken from the main #twatch article. Read about the update procedure after the break.

Continue reading “#twatch network firmware upgrades”

Compile the #twatch firmware

mplab

See the latest version on the documentation wiki.

You don’t need a Microchip programmer to develop firmware for the #twatch. You can use Microchip’s free development tools and upload code through the network bootloader. It’s a mini PIC 18F67J60 development board, but remember that the chip is only rated for 100 program cycles.

Compile instructions follow the break.

Continue reading “Compile the #twatch firmware”

View the #twatch IP announcement

MCHPdetect

The #twatch acquires an IP address automatically using the DHCP server on your network. It displays the IP address on the LCD screen, but it also sends an announcement packet to every computer on the network. The packet is directed to port 30303 at the broadcast address. Microchip provides a small Windows utility called MCHPDetect that displays these packets, source code is available in the TCP/IP stack download.

Bus Pirate I2C, SPI sniffer updates

sniffer

See the latest version in the documentation wiki.

With aphoticjezter’s confirmation that the undocumented I2C sniffer actually works, we tweaked the code to help get around the UART speed limitations. These updates are in the latest nightly build.

The I2C and SPI sniffers now use a 4096byte output ring buffer. Sniffer output goes into the ring buffer and gets pushed to the PC when the UART is free. This should eliminate problems with dropped bytes, regardless of UART speed or display mode. A long enough stream of data will eventually overtake the buffer, after which new bytes will be dropped until space is available.

Sniffer demos and documentation after the break.

Continue readingBus Pirate I2C, SPI sniffer updates”

#twatch backlight control from Python

twatch-sideiii

It looks like the #twatch is starting to arrive worldwide. WA5ZNU received a #twatch and wrote a Python script to control the backlight. You can use this thread to discuss your #twatch unboxing experience.

There’s still a few #twatches at Seeed Studio for immediate delivery, $45 including LCD and worldwide shipping.

Continue reading “#twatch backlight control from Python”

Bus Pirate I2C sniffer working?

i2csniff

It appears the I2C bus sniffer, macro (2) in the I2C library, may have been working all along. aphoticjezter writes in the forum:

I hacked the binary file to change the bitrate for one of the speeds to 230400, and I also used RAW mode as suggested.  So far I seem to be reliably sniffing the traffic…

The key is getting data from the Bus Pirate to the PC fast enough that we don’t miss any I2C signal changes. One way to increase the speed is to change the Bus Pirate display mode to RAW, and then have your terminal show the HEX equivalent of the raw byte values. In raw mode the Bus Pirate doesn’t have to shove 5 or 6 ASCII bytes up the wire for every byte snooped.

Bounty on Bus Pirate high-priority features

man2

Here’s a list of high-priority Bus Pirate features based on your feedback. We’re putting a bounty on these items to encourage new developers to get involved. The developer of each feature can have their choice of a Bus Pirate probe cable kit or our next monthly project.

  1. JTAG programming with OpenOCD. It should be possible to adapt an existing parallel port or FTDI232 JTAG wiggler, preferably OpenOCD, to flip bits in a byte and send it to the bitbang binary mode. We could also develop a separate binary JTAG library if requested.
  2. UART baud rate detect. A new macro for the UART library that detects baud rate using something like this.
  3. Binary mode access to the I2C sniffer for better speed. This should incorporate a simple escape sequence for control characters like start, stop, ACK, and NACK. Solution submitted, that was fast!
  4. Stepper motor driver and servo driver. The stepper motor driver will be easy, and we have a driver board in development. The servo driver will be harder simple because we don’t have any servos to test. Not sure where to put these, perhaps in an ‘extras’ library.

Continue reading “Bounty on Bus Pirate high-priority features”

LEDs too bright

LED-too-brite

Nuxx.net writes:

Today I finally got to poking around with the Hack A Day Bus Pirate v2.go … the LEDs on it are far, far, far brighter than they need to be. At my normally-lit desk in a normally-lit office, they are glaring. I’m going to consider replacing them next time I place an order from Mouser or Digi-Key.

Anyone else have this problem? We’d suggest a larger resistor, 2K+ on R3 and R30, and 600+ on R31 and R32.

Bus Pirate logic analyzer mode

sump-dataii

See the latest version on the documentation wiki.

This is an updated guide to the Bus Pirate logic analyzer mode, it expands on the initial documentation posted earlier.

Bus Pirate firmware v3.0 introduced a logic analyzer mode that works with the SUMP open source logic analyzer client. The logic analyzer can record 4096 samples at up to 1MHz, each channel has a selectable sample trigger.

***BIG WARNING*** The Bus Pirate will never be a substitute for a ‘proper’ logic analyzer, the hardware isn’t designed for it. The Bus Pirate can’t store a lot of samples, it can’t feed live samples very fast, and speeds are in the kHz range, not MHz.

Despite the limitations of the Bus Pirate hardware, the logic analyzer worked well enough to examine decoded IR remote signals. It’s also well suited to debug environments where you can control the bus speed (and the Bus Pirate may already be connected for other reasons). It should also be able to look at most I2C traffic (400kHz clock).

Documentation below. There’s still time to get a Bus Pirate v3, $30 including worldwide shipping.

Continue reading “Bus Pirate logic analyzer mode”

Bus Pirate firmware v3 preview

frmv3

Tests of the Bus Pirate logic analyzer went so well that we’re rolling it into firmware v3 preview for all hardware. In addition to the features described in the last post, the updated logic analyzer supports configurable sample size (up to 4096), speed (10Hz-~1MHz), and triggers.

There’s a few other goodies tucked into the preview release. The transparent UART bridge now clears buffer overruns automatically and turns off the MODE LED to signal the error, read more in the updated UART mode guide. Code controlling  frequency measurement and pulse-width modulation on the AUX pin received a minor overhaul.

v3.0 also includes the new raw 2- and 3-wire binary access mode. This mode can be used to dump and program a SLE4442 smartcard from a script. You can also now access the ADC and PWM from Perl, Python, etc. scripts in binary mode.

Updated Bus Pirate manual

man2

The Bus Pirate manual has new pages for each bus mode:

1-Wire, UART, I2C, SPI, JTAG, raw 2-wire, raw 3-wire, PC keyboard, HD44780 LCDs, MIDI

It should be easier to maintain each page and add new documentation as needed. We’re also going to leave comments enabled so you can help correct errors and omissions.

We’re still looking for a volunteer to maintain the Bus Pirate manual. This could be a good opportunity to get involved in a growing open source project, even if you’re not into coding.

Bus Pirate logic analyzer firmware

sump-dataii

We wanted to check the remote control output while we debugged the color changing pumpkin. Usually we’d use a Saleae Logic, but instead we made an experimental logic analyzer firmware for the Bus Pirate.

***BIG WARNING*** The Bus Pirate will never be a substitute for a ‘proper’ logic analyzer, the hardware isn’t designed for it. The Bus Pirate can’t store a lot of samples, it can’t feed live samples very fast, and speeds will be in the kHz, not MHz. This test firmware records 4096 samples at a fixed 10kHz sampling rate.

Despite the limitations of the Bus Pirate hardware, our logic analyzer worked well enough to examine decoded IR remote signals. It’s also well suited to debug environments where you can control the bus speed (and the Bus Pirate may already be connected for other reasons).

We’re releasing the logic analyzer as a separate firmware for v2go and v3 only, but once it’s improved we plan to integrate it into the trunk. Documentation below.

There’s still time to get a Bus Pirate v3, $30 including worldwide shipping.

Continue reading “Bus Pirate logic analyzer firmware”

PCB etching tutorial

PCB-etch

Instructables user ArduinoFun shows how to etch PCBs at home using a positive photo-resist. This method involves printing the PCB design on an inkjet transparency, exposing it under a UV light, developing in a basic solution, then etching in an acid.

Do you etch your own PCBs? What methods have you tried?

This is exactly how we etch prototype PCBs. Some of our tips and tricks are listed after the break.

Continue reading “PCB etching tutorial”

Free PCB Sunday: #twatch v2 & v1a

twatch-pcbs

We go through a lot of prototype PCBs, and end up with lots of extras that we’ll never use. Every Sunday we give away a few professionally-made PCBs from one of our past or future projects, or a related prototype.

This week we’re giving away PCBs for our ethernet LCD backpack, the #twatch, PCBs by Seeed Studio. We’re giving away 1 PCB for the PIC 18F67J65-based #twatch v2. We’re also giving away 1 PCB for the 24FJ64GA002-based v1a #twatch development board. Be sure to specify v1a or v2.

Assembled red #twatches are available immediately for $45, including LCD and worldwide shipping, at Seeed Studio. Seeed also has #twatch v2 PCBs for $6, and the compatible ethernet jack for $1.90.

Continue reading “Free PCB Sunday: #twatch v2 & v1a”

Bus Pirate firmware v3 feature requests

bpfv3

Bus Pirate firmware v3 will be released in the near future. Are there any minor tweaks or moderate feature additions that you’d like to see in V3? It’s probably too late for major additions like a new protocol, but we’d like to know if there’s any popular updates we can schedule for the big v3 release. The issue tracker might give you some ideas.

Beyond v3, are there any major new features you’d like? I2C and improved SPI snoopers are a popular request, they’ll probably be added to the new binary mode for better speed and performance. CAN and OBD-II protocols are also frequently requested.