Jump to content

Pic micro clock/instruction cycles

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
darknoobie

darknoobie

    Newbie

  • Members
  • PipPip
  • 19 posts
I was reading one of my old books on programming pic micros in assembly. Its been a while since i have played with them. I'm running my pic micro at 4mhz and it does 1 instruction per clock cycle. So you would do 1/4 and it would equal to 0.00000025 x 4 = 1 instruction every 1us? Is my math correct?

#2
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 243 posts
1 op/cycle * 4,000,000 cycle/second = 4,000,000 op/second. Invert and you get 0.00000025 seconds/op = 250 nano-seconds

#3
darknoobie

darknoobie

    Newbie

  • Members
  • PipPip
  • 19 posts
I think i just found a error in one of my books. Well its telling me that with a 4mhz clock and 1 op/cycle turns out to 1us. Yes if you 1/4 you get 0.00000025. Sounds right. Thank you. What was trowing me off was that the pic divides the clock cycle by 4 in order to process 1 operation per clock cycle, correct?