“DB” = Abbreviated Microcontroller Debugging

We’ve all been there. When debugging a microcontroller project, we just want to put in a print statement to figure out what’s going on with the microcontroller in real time. However, advanced embedded programmers know that printf statements are verboten: they’re just too SLOW. While not fixing this plight entirely, [Atakan Sarioglu] has come up with a clever way to create readable debug messages with minimal runtime overhead.

[Atakan Sarioglu]’s innovation, called BigBug (Github), is a dynamically-generated codebook. The codebook translates abbreviated messages sent over serial (UART here) to longer-form human-readable messages. To generate the codebook, BigBug automatically parses your comments to create a lookup between an abbreviation and the long-form message. When you are running your program on the microcontroller, BigBug will translate the short codes to long messages in real-time as you send log/debug data over serial. Continue reading ““DB” = Abbreviated Microcontroller Debugging”

I2C Bootloader for ATtiny85 Lets Other Micros Push Firmware Updates

There are a few different ways of getting firmware onto one of AVR’s ATtiny85 microcontrollers, including bootloaders that allow for firmware to be updated without the need to plug the chip into a programmer. However, [casanovg] wasn’t satisfied with those so he sent us a tip letting us know he wrote an I2C bootloader for the ATtiny85 called Timonel. It takes into account a few particulars of the part, such as the fact that it lacks a protected memory area where a bootloader would normally reside, and it doesn’t have a native I2C interface, only the USI (Universal Serial Interface). He’s just released the first functional version for the ATtiny85, but there’s no reason it couldn’t be made to work with the ATtiny45 and ATtiny25 as well.

Timonel is designed for systems where there is a more powerful microcontroller or microprocessor running the show (such as an ESP8266, Arduino, or even a board like a Raspberry Pi.) In designs where the ATtinys are on an I2C bus performing peripheral functions such as running sensors, Timonel allows the firmware for these peripheral MCUs to be updated directly from the I2C bus master. Embedded below is a video demo of [casanovg] sending simple serial commands, showing a successful firmware update of an AVR ATtiny85 over I2C.

Continue reading “I2C Bootloader for ATtiny85 Lets Other Micros Push Firmware Updates”

Wrangling RC Servos Becoming a Hassle? Try Serial Bus Servos!

When we need actuators for a project, a servo from the remote-control hobby world is a popular solution. Though as the number of servos go up, keeping their wires neat and managing their control signals become a challenge. Once we start running more servos than we have fingers and toes, it’s worth considering the serial bus variety. Today we’ll go over what they are and examine three products on the market.

Continue reading “Wrangling RC Servos Becoming a Hassle? Try Serial Bus Servos!”

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.

Continue reading “Parts: Unboxing the Bus Pirate”

Parts: 4×20 VFD character display (NA204SD02)

futuba-serial

Futaba makes vacuum florescent character displays that can be used as a drop-in replacement for common character LCDs. VFDs have a wider viewing angle, and generally look cooler.

Futaba’s character displays can be interfaced using the standard 8-bit or 4-bit parallel LCD interface, or a simple two-wire protocol. The protocol type is set by resistors on the back of the display, so it’s not particularly easy to change without a hot-air rework station. Today we’ll demonstrate a serially-interfaced VFD using the Bus Pirate.

Continue reading “Parts: 4×20 VFD character display (NA204SD02)”

Parts: ShiftBrite RGB LED module (A6281)

shiftbriteii

Macetech’s ShiftBrite is a high-power RGB LED coupled with an Allegro A6281 backpack. The A6281 uses three 10bit pulse-width modulators to mix millions of colors using the red, green, and blue elements in the RGB LED. Multiple modules can be chained together for bigger projects, like the ShiftBrite table.

Below the break we demonstrate a ShiftBrite module using the Bus Pirate. For a limited time you can get your own Bus Pirate, fully assembled and shipped worldwide, for only $30.

Continue reading “Parts: ShiftBrite RGB LED module (A6281)”

Parts: LTC2631A I2C digital to analog converter

ltc2640

Linear Technology’s LTC2631A-LZ8 is an 8bit digital to analog converter (DAC) with an I2C interface. This DAC can output 255 different voltages, spaced evenly between 0 and 2.5volts. We previously demonstrated the LTC2640 with a three-wire SPI interface, but this version is controlled with only two signal wires.

Continue reading “Parts: LTC2631A I2C digital to analog converter”