KIR extEEPROM.ino: Difference between revisions

From AnalysIR WiKi
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
'''''> [[KontroLIR - Arduino compatible IR remote control|KontroLIR Home]] > [[Customizing the Firmware|back]]'''''
'''''> [[KontroLIR - Arduino compatible IR remote control|KontroLIR Home]] > [[Customizing the KontroLIR Firmware|back]]'''''


Currently this file contains 2 functions for the optional external I2C EEPROM:
Currently this file contains 2 functions for the optional external I2C EEPROM:
Line 17: Line 17:




'''''> [[KontroLIR - Arduino compatible IR remote control|KontroLIR Home]] > [[Customizing the Firmware|back]]'''''
'''''> [[KontroLIR - Arduino compatible IR remote control|KontroLIR Home]] > [[Customizing the KontroLIR Firmware|back]]'''''

Revision as of 08:00, 9 October 2019

> KontroLIR Home > back

Currently this file contains 2 functions for the optional external I2C EEPROM:

  • KIR_enable_eeprom - which turns on power to the I2C EEPROM
  • KIR_disable_eeprom - which turns off power to the I2C EEPROM

All of the I2C address pins are grounded (set to 0)

Due to the nature of EEPROMs, their varying capacity and varying page sizes - we have not included example code for reading and writing to this external I2C EEPROM. However, the Arduino ecosystem has numerous libraries and examples of how to read and write to I2C eeproms. You just need to ensure that you enable the EEPROM before read/write access and disable it before going to sleep. If you are not using EEPROM then it is powered off by default in the firmware.

You are free to use any storage configration in your EEPROM. However, we usually allocate storage to signals in multiples of the EEPROM's page size to avoid excessive wear and write cycles. You can use the EEPROM to store the RAW signals or just the HEX value along with a protocol identifier. It may also be helpful to store the carrier frequency as well.

Tip: You can retain pointers to signals stored in external EEPROM in either SRAM or FLASH to speed up access. Similarly, you could reserve a number of EEPROM pages for this purpose. In addition, the MCU's internal EEPROM could also be used for similar purposes. Faster accesss equals longer battery life!



> KontroLIR Home > back