How to set Timer2 to get PWM of 4KHz?

Status
Not open for further replies.
Thanks for the reply. I know how to set Timerx for PWM using Hi-Tech C, C18, XC8 and mikroC PRO Compilers. I wanted to know how to do that using CCS C Compiler as I am new to CCS C Compiler.
 

You could simply set the appropriate registers, instead of utilizing routines such as setup_timer_2().

Or write your own library of routines which can be easily ported from one compiler to the next.

Also, unlike mikroC, if I remember correctly, CCS provides the source code for its routines.

Take a look in the directories for the source code file and take a look at the routine's inner workings.

BigDog
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…