SPARK V ATMEGA16 Hardware Manual
4.6 Loading your code on robot using AVR Boot loader from NEX Robotics
All AVR microcontrollers can be programmed using In System Programming (ISP), external
programmer or using boot loader. Advantage with the boot loader is that you don't need any
external hardware to load the .hex file on the microcontroller.
4.6.1 Boot loader operating principle
If Bootloader firmware is loaded on the microcontroller then it can be programmed directly via
serial port or USB (using USB to Serial converter) using PC. In the boot loading method a small
piece of code is loaded on the microcontroller in the configurable boot memory section. When
signaled using external switch while resetting the microcontroller it gets active and waits for
communication from the PC. Bootloader software from NEX Robotics which is installed on the
PC communicates with the microcontroller. Boot loader software loads the .hex file on the
microcontroller. After the boot loading process is complete, newly loaded code can be executed
by pressing reset. Once the code is loaded on the microcontroller UART is free and can be used
for other applications. Bootloader get invoked only if boot switch is kept pressed while
microcontroller is reset using reset switch.
Note:
Bootloader code is loaded on the ATMEGA16 of the Spark V robot using ISP programmer. It is
recommended that you only use Bootloader for the robot. If you use ISP programmer with the
robot then boot section code might get erased and robot will no longer support boot loading.
4.6.2 Jumper settings for the boot loading
ATMEGA16 has one serial port. In Spark V it can be switched between USB and XBee wireless
module by using jumper J5. For serial interfacing FT232 USB to Serial converter is used.
Bootloading is done via USB Port. Figure 4.30 shows the correct jumper settings of J5 to connect
USB port to the ATMEGA16 via FT232 USB to serial converter. Figure 4.30 shows the correct
jumper settings for the boot loading.
Figure 4.30: Jumper setting for connecting USB port
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
60
Need help?
Do you have a question about the SPARK V ATMEGA16 and is the answer not in the manual?