EMBEDDED SYSTEMS: SOFTWARE, HARDWARE & TOOLS

CONTENTS

INTRODUCTION

This is my personal web site where I share my spare-time projects and works about Embedded systems, Microcontrollers and other subjects. You can download and use them at will. I would be pleased to have your feedback about them. Comments, reviews, proposals, etc ... are always welcome. Feel free to drop me an e-mail and check out my professional profile.

If you appreciate my work and would like to support it, please consider making a donation. Donations will help to keep this website up and running making it available to all enthusiasts of Embedded systems.

ATMEL® AVR MICROCONTROLLERS

AVR-mUPI

AVR-mUPI is a software layer developed in C language that provides a unified interface for application programming on ATMEL® megaAVR microcontrollers. AVR-mUPI hides the specific details and variability of megaAVR devices to user applications. It helps to improve application development, maintenance and portability. It is organized as a set of header files and a static library implementing the application programming interface for each supported device.

Follow the links below to get a complete description of AVR-mUPI:

The latest release of AVR-mUPI (v1.2) can be downloaded here. This tarball contains the source and header files, the precompiled libraries, the documentation and the source and binaries of all the examples.

Previous releases: v1.0, v1.1

AVR-MHP

Coming soon ...

usbasp-x

usbasp-x is an evolution of the firmware of USBasp, a USB in-circuit programmer for ATMEL® AVR microcontrollers designed by Thomas Fischl. It is based on version 2011-05-28 of the USBasp firmware and extends its capabilities in order to program up to 32 devices connected in different banks.

The original desing of USBasp allows to program one device on a single bank, which is largely enough in most cases. However, it is sometimes necessary to program two or more devices together on several banks. This is the case when developing a system with several microcontrollers interconnected using some sort of interface or communication protocol and it is necessary to update the firmware on all of them.

usbasp-x works together with avrdude-x, which is an extension of AVRDUDE compatible with usbasp-x.

Firmware

usbasp-x introduces the following modifications on the USBasp firmware:

This is the list of modified modules: main.c, usbasp.h, usbconfig.h and Makefile.

To transform the firmware of USBasp version 2011-05-28 into usbasp-x, download the modified modules, replace the original ones with the new versions and follow the USBasp instructions to recompile the firmware. After that, usbasp-x is ready to be flashed onto your custom USBasp programmer (see below).

Hardware

The original hardware design of the USBasp programmer shall be modified in order to have several programming banks.

The usbasp-x firmware outputs the value of the selected bank on pins 3 to 7 of port D (bit 7 being the MSB). These pins shall be used to multiplex the SPI bus of the programmer (MISO, MOSI, SS and SCK pins) between the available banks, as depicted in the following block diagram:

SPI bus multiplexing.
SPI bus multiplexing.

avrdude-x

avrdude-x is an evolution of AVRDUDE, an open source program for downloading and uploading the on-chip memories (Flash, EEPROM, fuses and lock bits) of ATMEL®'s AVR microcontrollers. AVRDUDE interfaces with several programmers, including Thomas Fischl's USBasp.

AVRDUDE allows to send an extended parameter to the desired programmer. This is achieved using the option -x in the AVRDUDE invocation. However, not all the programmers make use of this option. This is the case of the USBasp programmer, whose driver module in AVRDUDE (usbasp.c) lacks the support for this functionnality.

avrdude-x is based on version 6.1 of AVRDUDE and extends its capabilities by taking into account the argument passed using option -x, transforming it to an integer value and sending it to the USBasp programmer during setup (see USBASP_FUNC_CONNECT and USBASP_FUNC_TPI_CONNECT).

To transform AVRDUDE version 6.1 into avrdude-x, download the new version of the usbasp.c module, replace the original one with the new version and follow the AVRDUDE instructions to recompile the application. After that, avrdude-x will be able to interface with your usbasp-x based progammer and indicate the desired bank to work with.

The following example shows how to download the file firmware.hex on an ATmega328P installed on bank #3:

$ avrdude -c usbasp -p atmega328p -x 3 -U flash:w:firmware.hex

GENERAL PROJECTS

Tms-EST

Coming soon ...

serial_txrx

serial_txrx is a Linux command-line tool that implements a simple request/answer exchange between a host and a remote device using serial communications. It can be used for general serial communications or as a test tool for embedded software verification.

The User Manual of the tool explains how to install, build and use this tool.

serial_txrx release 1.0 can be downloaded here. This tarball contains the source and header files, the makefile and installation script, the executable file and the User Manual.