Resources for embedded micro-controller firmware development
Your feedback, comments and
enquiries are welcome... send email to:
lot of embedded RTOS's around and they all have their
pros and cons. The "cons" are mostly related to
licence requirements (i.e. expense) and/or unnecessary
complexity (i.e. unwanted overheads on MCU speed and
example firmware application based on BERT is customised
for the Motorola/Freescale 'HC12 processor family (68HC12,
MC9S12, etc). BERT is freeware and is distributed as a
suite of C source code modules.
"ALERT" is a tiny micro-controller operating system, designed to reduce processor and memory overheads to a minimum. It is ideally suited to 8051 core processors, but may be ported to other 8-bit microcontoller families, e.g. PIC, AVR, 6805. The code has been designed to get a small embedded application up and running with minimum effort.
Example firmware based on ALERT is presented here for the Atmel AT89C5131 USB micro-controller (8051 core). The code incorporates a "host command interface" (HCI) with resident "debug monitor" and a suite of API functions to support various MCU resources, including on-chip UART, SPI, EEPROM and USB device controller. The HCI is accessible via the UART or USB port.
The USB device firmware "stack" uses the Communications Device Class (CDC), implementing a "virtual UART" API intended for USB-to-Serial converter applications. Windows incorporates a USB CDC driver, so that the host PC application software can communicate with the device via a "Virtual COM port". HyperTerminal may be used for testing.
complete practical example application based on ALERT,
see the author's development project:
ALERT firmware also runs on Atmel's AT89STK-05 Evaluation Board and Futurlec's "USB Development Board" (www.futurlec.com).
This "SAM7 Debug Monitor" is a complete firmware application comprising target-resident debugging facilities and peripheral I/O API function library. It runs on Atmel's AT91SAM7S-EK evaluation board and compatible hardware platforms. The firmware provides a basic framework upon which to develop user applications. The firmware is built using the free GCC-ARM tools.
Release v2.2 with USB CDC function library
The USB CDC "Virtual UART" library (developed by MJB) is well structured, richly annotated, and much simpler than Atmel's example "USB framework" code. A Windows host driver file is included. Students of electronics technology and I.T. will find this firmware helpful to implement a USB CDC project.
For details, see Guide to MJB's SAM7 Debug Monitor (with GNU/GCC Build Notes)
ATmega16 -- for AVR Studio + WinAVR (GCC-AVR tools)
This example C code makes a good starting point for the development of application firmware for the ATmega16 and similar AVR MCUs. It includes a debug command set which utilises the serial port (UART). A target-resident debug facility is particularly useful if you don't have access to a JTAG ICE debugging tool. This firmware was developed using WinAVR under AVR Studio 4.
ATmega128 -- for IAR Compiler
This AVR Debug Monitor is a complete stand-alone program with a full-featured command-line user interface (CLI), similar to that provided in the 'BERT' operating system. The monitor makes a good starting point for the development of application firmware for the ATmega128 and similar AVR processors. A target-resident debug facility is particularly useful if you don't have access to a JTAG ICE debugging tool. This firmware was developed using the IAR toolchain.
ATmega16 - AVR Training Kit
This is a documentation
package which describes the assembly and usage of a micro-controller
"training kit" intended for students learning
AVR programming. The doc pack includes example AVR
assembly-language programs (source code).
Note: The AVR Training Kit (hardware) is not available from this site. The Kit is assembled from parts obtained from various electronics suppliers. A parts list with suggested suppliers (for delivery in Australia) is included in the doc package.
For many applications, the Test &
Measurement Class (USBTMC) has distinct advantages over
other USB device classes.
Perhaps the most compelling reason to use USBTMC is that you don't need to develop and maintain host-side (PC) driver software. Your PC application software communicates with USBTMC devices via a standard API function library. The API library provides I/O functions designed to facilitate transfer data to and from VISA-compliant USBTMC devices. The API standard is known as "VISA" (Virtual Instrument Software Architecture).
The VISA API is supported and maintained by both National Instruments and Agilent Technologies. VISA API library packages are free downloads -- refer to company websites.
The VISA API executable (DLL) incorporates USBTMC and USB488 host driver software. The driver detects and adapts itself automatically to each unique TMC/488 device connected. Both the NI and Agilent VISA packages come with an interactive test utility which may be used to verify that a TMC/488 device is communicating correctly with the host controller.
The VISA API library is provided in the form of a linkable object code file (DLL). These are available for Windows, Mac OS and Linux. For a Windows host, application software can be developed in Visual Basic or Visual C/C++. National Instruments' LabVIEW software also supports USBTMC devices. Third-party devices (i.e. not manufactured by NI or Agilent) using a VISA-compliant USBTMC-488 interface are easier to get talking with LabVIEW than devices using other comm's interfaces.
your Test & Measurement instrument with a VISA-compliant
USBTMC-488 interface, preferably using the IEEE488.2 command/response message syntax, to
get the following benefits:
USBTMC/USB488 Device Firmware Stack and Reference Design
Now available to commercial product developers...
A USBTMC Reference Design meeting
the following objectives:
Initial target platform is Atmel AT91SAM7-xxx (ARM7) with on-chip USB peripheral. The example "application layer" and USBTMC "class layers" (source modules) have been designed to be independent of hardware platform, so the code can be more easily ported to other platforms. The source code and supporting annotation is of professional quality.
must be purchased to use the USBTMC firmware stack in a
commercial product development.
* Disclaimer *
Source code and other "intellectual property" offered as free downloads on this website are original works of M. J. Bauer, except where acknowledged to the contrary. Otherwise, any resemblance to prior art originated or developed by others is purely coincidental, or due to derivation from similar works or well-established art in the public domain. The author does not accept liability for any adverse consequence of the use of "intellectual property" obtained from this site.
Last updated: October 2012