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.

[Req] Timer Calculations

Status
Not open for further replies.

Umair Naveed

Newbie level 6
Joined
Nov 7, 2006
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,365
Hi everybody!!!
please tell me how to calculate delays, duty cycle, wave frequency with reference to PIC, i have used 8051 before in assembly and know some of these calculations but now i am using PIC16F877A with CCS C Compiler, which has built in functions for Timer related problems, but i could not understand although by reading examples in manual, how formulas are formed and how are these functions are used, is there any book which has these timer calculations for PIC16F877A or PIC16F877 using CCS C compiler, i there is or you can help me please help me!!!

Bye
Thanx in advance
 

hi
what do you want to do?do you want to generate pwm signal with ccp module?or you want to use theire interrupts?

Code:
   setup_timer_2 ( T2_DIV_BY_16,55, 8);
cycle time of interrupts =Fosc/(4*16*55*8)
for other timers ,setup is different
i hope it's helpful
 

thanx but i want to know what are these arguements in the function you have mentioned of ccs c compiler.!!!!!
ok
Bye
 

The CCS C compiler has a very extensive Help file and example library. Just goto the help file (F1) and in the index check the functions setup_timer_0 , setup_timer_1, etc. It should explain what all the arguments are for, and which are availible to you on your PIC. Do note that not all timers have the same functionality.

For very strict timing, I personally go back to ASM. You can also include ASM parts in CCS C.

Goodluck
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top