NXP P89LPC935 MCU Heximal Copying will find a way to set up the 16-bit software timer mode.
The PCA modules can be used as software timers (see below Figure) by setting both the ECOM and MAT bits in the modules CCAPMn register. The PCA timer will be compared to the module’s capture registers and when a match occurs an interrupt will occur if the CCFn (CCON SFR) and the ECCFn (CCAPMn SFR) bits for the module are both set.
In this mode (see below Figure) the CEX output (on port 1) associated with the PCA module will toggle each time a match occurs between the PCA counter and the module’s capture registers. To activate this mode the TOG, MAT, and ECOM bits in the module’s CCAPMn SFR must be set.
All of the modules will have the same frequency of output because they all share one and only PCA timer. The duty cycle of each module is independently variable using the module’s capture register CCAPnL to carry out the execution of Philip Microprocessor P89C638 Flash Program cloning.
When the value of the PCA CL SFR is less than the value in the module’s CCAPnL SFR the output will be low, when it is equal to or greater than the output will be high.
When CL overflows from FF to 00, CCAPnL is reloaded with the value in CCAPnH. this allows updating the PWM without glitches. The PWM and ECOM bits in the module’s CCAPMn register must be set to enable the PWM mode from NXP P89LPC935 MCU Heximal Copying.