Programming the AVR-Microcontroller¶
To program a microcontroller chip that is mounted in the CRM module you need a 6-way ribbon cable. To program microcontroller chips when they are not yet mounted, you must solder a socket to the AVR-Dragon and use jumper cables. Refer to the AVR-Dragon instruction manual.
apt-get install avrdude
If you are not using an AVR-Dragon: Edit the
MY_AVRDUDE = line in the
firmware/Makefile to suit your ISP programmer.
Program the Microcontroller¶
To program or reprogram a microcontroller chip, when it is already mounted in the CRM Module:
Open the case.
Connect the AVR-Dragon programmer with the CRM Module using a 6-way ribbon cable. Make sure to connect pin 1 on the Dragon to pin 1 on the CRM!
Connect the AVR-Dragon with the PC using an USB cable.
Connect the power source to the CRM.
Change into the
If this is the first time you prgram this microcontroller initialize it:
Program the microcontroller:
Disconnect the 6-way cable from the CRM, remove the power cord and close the case.
Initialize a New Microcontroller¶
To initialize a factory-new microcontroller run the following command:
This command only needs to be run once on every microcontroller chip (but it doesn’t hurt doing it more often). It tells the microcontroller to use the external crystal oscillator instead of the internal one.