In-system programming with the Ben: an overview
werner at almesberger.net
Wed Jan 2 14:38:47 EST 2013
When starting a microcontroller project, sooner or later there's
the question of how to get the code into the chip. The protocols
are usually vendor-specific and very often there's no "nice" way
to bridge the gap between PC and the microcontroller board.
With Ben and UBB, we have an excellent tool for this: the Ben
offers the friendly environment of a Linux system and with UBB it's
easy to build adapters that plug into the microcontroller circuit.
Since we already have quite a number of Ben-based in-circuit
programmers, I thought of making a little overview of them. Most
are quite simple, and in fact it's so easy to write a basic
programmer on the Ben that I rarely even try to find and port one
that may exist somewhere else.
These are the Ben-based programmers I know of at the moment:
- Atmel ATmega/ATtiny (tinyAVR/megaAVR)
- SiLabs C8051F32x/C8051F34x (8051)
- Microchip PIC18F2xJxx/PIC18F4xJxx (PIC18)
- NXP LPC111x (ARM Cortex M0)
Has anyone else made one ?
Below is a list with more details. Each entry in the list has the
name(s) the family of chips is usually known by, the name of the
Ben-based programmer and where the source lives, an example project
that uses this chip, links to a picture of the board and to the
source, and finally a picture of the programming adapter and a link
to its design files (if it isn't simply UBB plus a cable).
Architecture: Atmel ATmega/ATtiny (tinyAVR/megaAVR)
Programmer: avrdude (with Ben-specific patches)
Example: atusb (IEEE 802.15.4 USB dongle)
Architecture: SiLabs C8051F32x/C8051F34x (8051)
Example: labsw (USB-controlled relays)
Adapter: c2ben (*)
Architecture: Microchip PIC18F2xJxx/PIC18F4xJxx (PIC18)
Example: unpublished prototype (LED effects)
Adapter: cable directly to board
Architecture: NXP LPC111x (ARM Cortex M0)
Example: tornado (LED effects **)
(*) The c2ben is a bit unusual because it has a custom 8:10 card
board instead of using UBB. The reason is that it predates the
industrially-produced UBBs, which means that I had to make a new
board anyway, and I used a design that's a little "optimized".
Today, I would of course just take UBB.
(**) "tornado" is currently transitioning from an ATmega to the
more powerful LPC111x, so code and circuit don't match at the
moment and the circuit hasn't been fully tested yet.
More information about the discussion