If you are using a resonator frequency of 10MHz please calcu
If you are using a resonator frequency of 10MHz, please calculate the instruction cycle. If the resonator frequency has been changed to 15MHz, what is the instruction cycle?
Solution
The instruction cycle depends on the internal structure of the microcontroller or processor we are using.
from standatd data
for a PIC instruction cycle takes 4 clock cycles,
for an 8051 it takes 12 cycles,
for the AVRs take 1 cycle.
first we have frquency f = 10 MHz,
consider that we are using PIC controller
so in PIC controller instruction cycle takes 4 clock cycles,
as we are using PIC instruction cycle = Fosc/4
if we are using 8051 than instruction cycle = Fosc/12 and if avr than instruction cycle = Fosc/1
consider PIC with no PLL so Fosc = f*1 = 10*1 = 10 MHz
so with no PLL ,
instruction cycle = Fosc/4 = 10*106 /4 = 2.5 Mhz =25,00,000 single word instruction per second
now consider PIC with 4 PLL so Fosc = f*4 = 10*4 = 40 MHz
instruction cycle = Fosc/4 = 40*106 /4 = 10 Mhz =100,00,000 single word instruction per second
now f = 15 MHz
consider PIC with no PLL so Fosc = f*1 = 15*1 = 15 MHz
so with no PLL ,
instruction cycle = Fosc/4 = 15*106 /4 = 3.75 Mhz = 37,50,000 single word instruction per second
now consider PIC with 4 PLL so Fosc = 15*4 = 15*4 = 60 MHz
instruction cycle = Fosc/4 = 60*106 /4 = 15 Mhz =150,00,000 single word instruction per second
