PWM dimming is typically the preferred dimming method, as the wavelength does not shift during dimming. The RGB mixing application is easier to control with PWM. Linear dimming is limited in RGB LED applications due to the wavelength shift caused by changes to the LED current during linear dimming.
.WAV files have a standard format that contains sample data and a header describing the format and contents of the file. It is important to check the format of the file to be downloaded to the HCS12 MCU, as reading a file of an unexpected format will result in corrupt sample data. Reading the value of a number of the parameters stored in the header and comparing these to the values expected authenticates the format of the file. This is the method used to check the validity of the .WAV file in the accompanying example source code.