s51dude - ISP for 8051 MCUs using usbtiny
About
s51dude is an In-System programming tool specifically designed to be used with the usbtinyisp board and the Atmel's 8051 family of micrcontrollers.
This program is intended to cover the need of the 8051 developer who wants to program the devices with computers without parallel or serial port. The only alternative left is to use the USB port. That is when you will need s51dude.
It's written in C, and depends on libusb and gettext.
History
This program was developed to be used in a course about microcontrollers given at the Engeneering faculty of the Universidad de Buenos Aires (FIUBA).
This program was written and is mantained by three assistant teachers of Laboratorio de microcomputadoras of this university:
- Lucas Chiesa
- Gabriel Gavinowich
- Joaquín de Andrés
This program is not intended to replace avrdude nor uisp. These two programs support many types of cables and target devices. avrdude supports many cables, including the usbtinyisp but it can not use 8051 targets. uisp can program some 8051 but does not support the usbtinyisp.
s51dude uses the USB programmer only and can also program the modern 8051s from Atmel which are not supported by uisp.
Under this necessity we could have patched either of the above mentioned programs. However it was decided to write a new program for the following reasons:
- Adding support for 8051 in avrdude would require a very intrusive patch beacuse of the many differences within the 8051 family.
- Uisp is not actively mantained and it does not support nor the wanted targets nor the USB programmer.
Documentation
This program has a very simple interface which is explained in the man page. Before being able to use this software, you need to have a working usbtinyisp board.
To obtain the original schematics you should go to the usbtinyisp homepage
We have made our own schematics and PCB using Kicad. To build this board you will need some materials. The Kicad files can be found here.
The firmware needed to program the 8051s is a modified version of the original code. The new code still supports AVR and is fully compatible with avrdude.
The modified firmware can be found here. You can download the compiled .hex file
To upload the .hex file you need to have a working programmer like the stk200 and avrdude installed in your computer. The command to upload the hex file to the usbtinyisp MUC using stk200 is:
$ avrdude -c stk200 -p t2313 -U flash:w:main.hex:i $ avrdude -c stk200 -p t2313 -U hfuse:w:0xdf:m -U lfuse:w:0xef:m
If you need to build the stk200, you can find an example schematic in: example stk200 schematic
License
This program uses code from various sources, each license is detailed below.
- ihex.h, ihex.c: Copyright (C) 2006 Vanya A. Sergeev as Public Domain
- usbtiny.c, usbtiny.h: Copyright (C) 2007 Dick Streefland, adapted by Limor Fried as GNU General Public License, version 2 of the License, or (at your option) any later version.
- s51dude.c, s51dude.h, parse_params.c, parts.c, parts.h: Copyright (C) 2008 Lucas Chiesa GNU General Public License, version 2 of the License, or (at your option) any later version.
The original usbtinyisp hardware design layout files are distributed under the CC 2.5 Attrib./Share-alike license.
Our version of the hardware: Copyright (C) 2008 Joaquín de Andrés is distributed under the CC 2.5 Attrib./Share-alike license.
The firmware for the USBtinyISP: Copyright (C) 2006 Dick Streefland as GNU General Public License, version 2 of the License, or your option) any later version.
Download
The current version is 0.2.0 (released on Oct 12 2008):
The Windows version is old and untidy, but it should work until we learn how to build things for that platform.
The Gentoo Ebuild can be found in the Sunrise Overlay.
This program is included in Debian Testing (squeeze) and in Ubuntu Jaunty. It can be installed using apt-get in both distros.
If you have any questions, suggestions or comments, please use the users mailing list.
Patches are welcome. The source code is managed using darcs. You can get it by running:
Code for s51dude:
$ darcs get http://s51dude.gforge.lug.fi.uba.ar/repos/s51dude/
Firmware code:
$ darcs get http://s51dude.gforge.lug.fi.uba.ar/repos/usbtinyisp/
Usbtinyisp board Kicad files:
$ darcs get http://s51dude.gforge.lug.fi.uba.ar/repos/usbtinyisp_schematics/
Lucas Chiesa (lucas.chiesa@gmail.com) - Last updated May 8 2009