Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

[SOLVED] how to know the insctruction per cycle of PIC16f877

Status
Not open for further replies.

Zohaibmaroof

Member level 2
Joined
Oct 10, 2010
Messages
50
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,832
when i use 89C51 i calculate every line's time of the source code of any pgrograme by addong all the duty cycle of every line and after adding i multiply all of them by 1.08 Us(i was using 11.0 crystal)
i want that value or could i use the same 1.08 for PIC controller with 20 Mhz crystal ?
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,350
Helped
4,721
Reputation
9,457
Reaction score
4,489
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
122,472
Basically yes, but remember that the '877 executes one instruction per 4 clock cycles. A few instructions may require two machine cycles (8 clock cycles). The data sheet will tell you how many cycles are needed and under which circumstances the extra machine cycle is needed.

Brian.
 

Kurenai_ryu

Advanced Member level 2
Joined
Jun 10, 2006
Messages
671
Helped
159
Reputation
316
Reaction score
99
Trophy points
1,308
Location
Bolivia
Activity points
5,913
@brian is right for a 20mhz your factor shoulbe 0.2 for 1cicle instructions and 0.4 for 2cycle instruction (like goto, call and return)

Check your datasheet for more info on this...
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top