What is Spark Loader ?
Spark Loader is a boot loader for AVR microcontrollers, it is used for programming flash and EEPROM using a serial link between your computer and the microcontroller through any free COM port. Spark Loader consists of two parts:
1. On - chip boot loader:
A hex file that resides at the boot section of the flash memory.
2. Windows application :
It has the responsibility of transmitting flash and EEPROM data into the microcontroller.
Supported devices
Tested:
ATmega32(L)
ATmega8(L)
Not tested:
These devices are supported by the code, but haven't been tested yet. If you used Spark Loader with any of them , either worked properly, please inform me.
| ATmega16(L) |
ATmega48(L) |
ATmega88(L) |
ATmega64(L) |
ATmega162(L) |
| ATmega128(L) |
ATmega168(L) |
ATmega169(L) |
ATmega8515(L) |
ATmega8535(L) |
Requirements
On-chip boot loader:
Academic Free License (AFL) ver. 3
- Usage
- Download SparkLoaderBoot.zip
- Open SparkLoader.prj using codeVisionAVR (A free evaluation version is available)
- Select "Configure" from "Project" menu, and under "C Compiler" tab, select the "Chip" and "Clock" frequency you want.
- Make sure that the "Program type" is "Boot Loader - 512w".
- Under "After Build" tab, check "BOOTRST" and "BOOTSZ0" fuse bits, and uncheck "BOOTSZ1" fuse bit, "BOOTRST" is checked to make the PC initially points at the first address of the boot loader section. (e.g. 3E00 for ATmega32 and a 512w boot loader).
- Uncomment "#define UART1" (at line 26) if you want to use UART1 (Not available for all chips).
- Change "#define BAUD 9600" (at line 94) to the required baud rate.
- Program the chip using your ISP .
- Usage:
- Download SparkLoaderInstall.zip
Choose download server:
- launch sparkLoaderInstall.exe and follow steps.
- Open the program, the following window opens.
- Toolbar buttons:
- Open (Alt + O) : Opens a browse dialog for .hex and .eep files
- Help (Alt + H) : Opens the documentation.
- About (Alt + A) : Shows "About" window.
- Hide (Alt + D) : Send the program to tray.
- Drop Area (Alt + R) : Shows/hides the drop area, you can drag files directly into this area to open them, one file can be dropped at a time.
- Exit (Alt + X) : Exit the program.
Some information is displayed at the left side of the main window, this information are displayed when the microcontroller is reset.
- Flash File:
Displays the currently open flash file (.hex).
- "Program" check box: Specifies whether to program flash or not, when the microcontroller is detected.
- "Auto load flash file" : Enables you to automatically open the last loaded flash file, at program startup.
- EEPROM File:
Displays the currently open eeprom file (.eep).
- "Program" check box: Specifies whether to program eeprom or not, when the microcontroller is detected.
- "Auto load eeprom file" : Enables you to automatically open the last loaded eeprom file, at program startup.
Displays all available COM ports, recently open ports by another software are not displayed.
Select the baud rate as adjusted in the on-chip boot loader code.
When you are ready to program your chip, press this button to open the selected serial port. Press it again to disconnect.
- Reset: If power fails during programming, click this button and reset the chip.
Displays the program size in bytes
Displays how percentage of flash memory is occupied by this program.
Displays the eeprom data size.
Displays how percentage of EEPROM is occupied by this eeprom data.
- Tray Icon:
Tray icon color changes according to the currently performed process/state as follows:
|
|
Not connected, No COM port is open.
|
|
|
Connected, The selected COM port is open.
|
|
|
A file (.hex or .eep) is being loaded into the program .
|
|
|
A file (.hex or .eep) is being programmed into chip's memory (flash or EEPROM). Chip must be powered while a file is being programmed.
|
- Tray icon pop-up menu:
Invokes a menu that contains quick commands to be used when the main window is hidden.
- Hot keys:
Some hot keys are available globally, they can be used while the main window is hidden, so, you can send the program to the tray, and use these commands to control the program. The color of the tray icon indicates to the currently performed process. Just choose Baud rate and COM port, then you can do anything using hot keys.
Alt + Win + C
|
Connect/Disconnect
|
Alt + Win + O
|
Open |
Alt + Win + D
|
Show/Hide Drop Area
|
Alt + Win + T
|
Reset |
Small test application
This small application stores 200 bytes in eeprom and send them using USART.
Download
Serial Circuit
A link must be established between your PC and the microcontroller. A Max232 circuit is illustrated in P.7 of Max232 datasheet.
Video Tutorial
This is a detailed video tutorial, Spark Loader's help contains a quick video guide.
Feedback
Your feedback is appreciated, so, don't hesitate to send me any question, suggestion, bug, or any thing. Your feedback is very important for making this software better.
Please tell me about your experiment with any chip using Spark Loader, either it worked properly or not.
References
|
|