This application note describes a method for compressing large sets of I2C scripts for microcontroller platforms. The information herein is targeted for applications where the user needs to put over 50 scripts to the memory of one single microcontroller. This method provides excellent results for sets of scripts containing more than 200 scripts for more than six devices. In such a case, the user requires a lot of scripts and needs to use this method to compress them. The method is easy to use and can be easily ported to any microcontroller.
Analog Devices, Inc. multiformat decoders support various video standards, requiring numerous I2C script configurations that can exceed the memory capacity of small microcontrollers. This document details a method for compressing these large sets of scripts on the PC side to reduce storage requirements.
The proposed compression algorithm identifies common sequences of four identical writes across different scripts and replaces them with single reference pointers (keys). The note provides an Octave script to perform this compression and generates portable C code containing both the compressed data and an efficient decompression routine for microcontrollers.
The method provides excellent results for sets of scripts containing more than 200 scripts.
The method provides excellent results for sets of scripts for more than six devices.
The application note describes algorithms in which scripts are checked for occurrence of sequences of four identical writes.