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 do we calculate instruction execution time for PIC micro-controllers?

Status
Not open for further replies.

sush

Member level 4
Joined
Aug 24, 2005
Messages
78
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,946
hi,
I'm a newcomer to PIC, but i know 8051. as i've just started there is question in my mind,
For calculating time taken by an instruction to execute, in 8051, we use formula:-
Time, t = (No. of clock cycles x 12)/ (Xtal Frequency)
For example :- in case of timer suppose TH0=1Eh & TL0=2Ch or TMR=1E2Ch = 7724d; & crystal frequency=24MHz, then
time, t= 7724x12/24e6=3.862 mSecs
How do we calculate this in case of PIC micro-controllers, is it:- t= (No. of clock cycles x 4)/ (Xtal Frequency)??

Thanks
 

newcomer to PIC

the time period for each assembly instruction in the PIC is

Code:
the inverse of [crystal_clk/4]
 

Re: newcomer to PIC

In Pic the external clock frequency is internally divided By four and this is the main clock used inside the controller.
This is true for all Pic controllers though new ones have a PLL option.
hence instruction time will be 1/(clock frequency/4)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top