Uploading the KontroLIR Firmware

From AnalysIR WiKi
Revision as of 11:23, 13 January 2021 by AnalysIR (talk | contribs) (→‎Known Issues)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

> KontroLIR Home

First, you should familiarize yourself with using the Arduino IDE to compile(verify) and upload sketches. Then simply follow the instructions below to upload the firmware to KontroLIR.

Known Issues

We have observed that there can be issue with the bootloader failing to activate when the MCU is in PWR_DOWN sleep mode (this is normal with the KontroLIR firmware loaded). So if you cannot get the bootloader to update the firmware from the Arduino IDE, there are 2 options, as follows:

  1. Press the KontroLIR buttons 1,3,7,9 in that order. The red LED will then start blinking for up to 30 seconds - indicating that it has not yet entered sleep mode. You can now proceed to upload the firmware using the Arduino IDE as normal. This sequence only behaves this way when powered from USB(5V). When operating from batteries this button sequence is ignored.
  2. When applying power for the first time, KontroLIR will blink the LED for up to 30 seconds to allow time for the bootloader to activate properly. Once you have supplied power to KontroLIR, you can immediately upload firmware using the Arduino IDE. This blinking after power on operates both when powered from USB & batteries.
  3. This note only applies when KontroLIR firmware is loaded or when the MCU is in sleep mode. It does not apply if the supplied TestSuite firmware is loaded.

Steps to upload KontroLIR Firmware

  1. You will be provided a link to download the firmware source code, after purchasing your own KontroLIR remote control device, from our shop or an approved partner.
  2. Make sure you have installed and tested support for the ATmega328PB, into your Arduino IDE. (use the ATmega328PB core from watterott)
  3. Remove any batteries from KontroLIR and connect the Serial USB adapter to KontrolIR. (This USB adapter, requires a DTR or RTS pin to work - refer to pin out for firmware upload using the bootloader.)
  4. Make sure to follow the Getting Started instructions to verify correct operation of the ATmega328PB with your Arduino IDE, before proceeding to use KontroLIR firmware. The test suite also checks the hardware and is also explained in the Getting Started instructions.
  5. Insert the USB cable into the PC running the Arduino IDE.
  6. Select the correct COM port number of the serial USB adapter, in the Arduino IDE Tools->Port menu.
  7. Select clock speed of 4MHz for the KontroLIR firmware.
  8. Compile(verify) the firmware using the Arduino IDE.
  9. Upload the firmware to the KontrolIR device. (See note above about blinking LED. It is better to upload when the red LED is Blinking)
  10. Close the Arduino IDE.

Congratulations! - you are now ready to use the reference KontroLIR firmware. Of course the default signals provided will not necessarily work with your own equipment, but is an important first step.

> KontroLIR Home