Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to set Timer2 to get PWM of 4KHz?

Status
Not open for further replies.
Advanced Member level 6
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Visit site
Activity points
0
How to set Timer2 to get PWM of 4KHz?

Consider any Clock and explain.

93822d1374330780-t2ccsc.png
 

Attachments

  • t2ccsc.png
    t2ccsc.png
    82 KB · Views: 171

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top