The duty cycle of the carrier signal is controlled by varying the ratio of high time to low+ high time. As the input clock period is fixed, the duty cycle resolution will beproportional to the number of counts required to generate the desired carrier period.41.7.3 ModulatorThe modulator block controls the state of the infrared out signal (IRO) . The modulatoroutput is gated on to the IRO signal when the modulator/carrier generator is enabled .When the modulator/carrier generator is disabled, the IRO signal is controlled by the stateof the IRO latch. OC[CMTPOL] enables the IRO signal to be active high or active low.In CMT modes, the modulator functions as givenbelow:• In Time mode, the modulator can gate the carrier onto the modulator output.• In Baseband mode, the modulator can control the logic level of the modulator output.• In FSK mode, the modulator can count carrier periods and instruct the carriergenerator to alternate between two carrier frequencies whenever a modulation period(mark + space counts) expires.The modulator provides a simple method to control protocol timing. The modulator has aminimum resolution of 1.0 μs with an 8 MHz . It can count bus clocks (to provide real-time control) or it can count carrier clocks (for self-clocked protocols).The modulator includes a 17-bit down counter with underflow detection. The counter isloaded from the 16-bit modulation mark period buffer registers, CMD1 and CMD2. Themost significant bit is loaded with a logic zero and serves as a sign bit. When the counterholds a positive value, the modulator gate is open and the carrier signal is driven to thetransmitter block.When the counter underflows, the modulator gate is closed and a 16-bit comparator isenabled which compares the logical complement of the value of the down counter withthe contents of the modulation space period register which has been loaded from theregisters, CMD3 and CMD4.When a match is obtained, the cycle repeats by opening the modulator gate, reloading thecounter with the contents of CMD1 and CMD2, and reloading the modulation spaceperiod register with the contents of CMD3 and CMD4.Functional DescriptionK51 Sub-Family Reference Manual, Rev. 6, Nov 20111026 Freescale Semiconductor, Inc.