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

PIC16F877A with a 20MHz oscillator

Status
Not open for further replies.

josh1245

Newbie level 5
Joined
Oct 20, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,355
Helloo!

Can you please tell me how long does a PIC16F877A micro controller take to execute one line of coding when used with a 20 MHz oscillator??
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,588
Helped
4,782
Reputation
9,581
Reaction score
4,562
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,328
Note: Tahmid's figures are for one machine instruction (a single non-branching assember instruction).

One line of code may be considerably longer if it is written in a high level language.

Brian.
 

Tahmid

Advanced Member level 5
Joined
Jun 17, 2008
Messages
4,758
Helped
1,791
Reputation
3,574
Reaction score
1,650
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,545
Yea, the time calculated is that for one instruction cycle.

In assembly, there are a few 2 instruction-cycle instructions.

In high-level language, one line could be 1 instruction cycle or very long, depending on the line of code.
 

josh1245

Newbie level 5
Joined
Oct 20, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,355
thank you soo much Tahmid, & Brain... since Im new to micro controllers, I am using MicroC, but not assembly.., can you please tell me how it works with microC if you do not mind.??
 

Ishah

Member level 1
Joined
Mar 13, 2013
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,502
It depends on the instruction / line of code. You can use the stopwatch option in the debugger to check the time.
stopwatch.JPG

Hi Tahmid,

Can you guide me to fill this stop watch of MicroC.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,869
Helped
14,124
Reputation
28,505
Reaction score
12,807
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,823
Stopwatch runs between breakpoints or single steps in debugging. Nothing to fill out.
 

Ishah

Member level 1
Joined
Mar 13, 2013
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,502
Stopwatch runs between breakpoints or single steps in debugging. Nothing to fill out.
Sorry Im new of this, it's quiet shame for me to ask but, it that mean I need to click F9 (start Debugger) ? Where i can check the time.. ?

Thanks FvM.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,869
Helped
14,124
Reputation
28,505
Reaction score
12,807
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,823
that mean I need to click F9 (start Debugger) ?
I'm sure you'll also find out which hotkeys are available to access
- breakpoints
- single stepping
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top