In-system programming with the Ben: an overview

Werner Almesberger 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)
		http://www.nongnu.org/avrdude/
		http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/avrdude
Example:	atusb (IEEE 802.15.4 USB dongle)
		http://downloads.qi-hardware.com/people/werner/wpan/web/800px-Atben_atusb_prod_05.jpg
		http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb
Adapter:	atusb-pgm
		http://downloads.qi-hardware.com/people/werner/wpan/tmp/atusb-pgm-20110203.jpg
		http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atusb-pgm
		
Architecture:	SiLabs C8051F32x/C8051F34x (8051)
Programmer:	f32x
		http://projects.qi-hardware.com/index.php/p/f32xbase/source/tree/master/f32x
Example:	labsw (USB-controlled relays)
		http://downloads.qi-hardware.com/people/werner/labsw/web/labsw-0-inside.jpg
		http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/labsw
Adapter:	c2ben (*)
		http://downloads.qi-hardware.com/people/werner/f32x/c2ben-run1.jpg
		http://projects.qi-hardware.com/index.php/p/f32xbase/source/tree/master/c2ben

Architecture:	Microchip PIC18F2xJxx/PIC18F4xJxx (PIC18)
Programmer:	picpen
		http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/bacon/prog
Example:	unpublished prototype (LED effects)
		http://downloads.qi-hardware.com/people/werner/tmp/lt-pic-proto.jpg
Adapter:	cable directly to board

Architecture:	NXP LPC111x (ARM Cortex M0)
Programmer:	lpc111x-isp
		http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/tree/master/lpc111x-isp
Example:	tornado (LED effects **)
		http://projects.qi-hardware.com/index.php/p/antorcha/source/tree/master/tornado
		http://downloads.qi-hardware.com/people/werner/tmp/tornado2-cpu-blink.jpg
Adapter:	atusb-pgm

(*) 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.

- Werner




More information about the discussion mailing list


interactive