The C2 Programmer is designed for programming Silicon Labs microcontrollers over the C2 interface by the use of an AVR microcontroller with the necessary firmware and an USB to serial adapter. The software is written in JavaScript and is based on ScriptCommunicator by Stefan Zieker.
What does it do
- Save flash memory to .bin (binary), .txt (hex format) or .hex (Intel hex) file.
- Write an Intel hex file to flash memory.
- Erase device option.
Contents
- Motivation
- Theory of operation
- How to program a microcontroller over C2 interface
- The C2 Interface
- Increasing serial transfer rate
- Download
Motivation
Why use a custom programmer when you can buy one? The reason I have started developing this software is not necessarily cost related. I could have just bought a programmer and be done with it instead of coding hours and hours, but I thought it will be a good addition for the community since being custom made it can be... customized. There are other reasons such as, maybe the commercial one is not available in your area or not in stock, or you might want to program only one or two microcontrollers and consider is not worth investing in a programmer.
Actually this is how the project started. I have an RDM-6300 RFID card reader that I thought is a writer too. Then I saw it's using the C8051F330 microcontroller from Silabs and decided to give it a try and make it also write RFID cards or at least add support for other chips. By not buying a programmer I made one that I could use in my project and also make it available for others.
Note that debugging is not supported so if you need this feature, consider buying a commercial programmer.
Theory of operation
Application on the computer instructs the firmware on an AVR microcontroller on what commands to send to the C2 interface of the programmed device. The communication between computer and programming device (the AVR) is done using an USB to serial converter.
The application is build on top of ScriptCommunicator which is a scriptable cross-platform data terminal that supports serial port (RS232, USB to serial), UDP, TCP client/server, SPI, I2C, and CAN. Script Communicator it's an awesome application that unfortunately is not that well known. The best part is that the interface can be made to look how you want by using the Qt Designer included with the app.