EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

speed of PIC vs 8051

Started by Mike Liu January 24, 2011
Hi all

I have a question regarding the speed of microcontrollers. As I know
that RISC mcus such as PIC need only 1 clock for each instruction while
CISC need several clock (8051 need 12T). That's why PIC is usually
faster than 8051 (for the same clock frequency).

I noticed that there're many 8051 core microcontrollers (STC 8051
, siliconlab , Atmel
). My question is which one is faster between
the 1T 8051 and PIC (for the same clock freq, programmed with C
language)?

Mike
Em 20/1/2011 04:51, Mike Liu escreveu:
>
>
> Hi all
>
> I have a question regarding the speed of microcontrollers. As I know
> that RISC mcus such as PIC need only 1 clock for each instruction
>
Not exactly. Small PICs take 8 clock cycles to execute one instruction.
As they have a two-level pipeline, they finish one instruction each 4
clock cycles.
> while CISC need several clock (8051 need 12T).
>
Correct, but some optimized 8051 cores may need only 3 clocks.
> That's why PIC is usually faster than 8051 (for the same clock
> frequency).
>
Yes, PICs execute more instructions than 8051s in the same time at the
same clock. BUT as PICs instructions are simpler, you may require more
instructions to do the same job, somewhat reducing the imbalance.
> I noticed that there're many 8051 core microcontrollers (STC 8051
> , siliconlab , Atmel
> ). My question is which one is faster between
> the 1T 8051 and PIC (for the same clock freq, programmed with C language)?
>
> Mike
>
> _

It depends on the compilers and how the program was written. It's a long
time since I programmed my last 8051, but a PIC surely will be faster
than a 12T 8051 at the same clock. I'm not sure about a 1T optimized 8051.
Isaac
Em 24/1/2011 15:42, Isaac Marino Bavaresco escreveu:
>
>
> Em 20/1/2011 04:51, Mike Liu escreveu:
>
>>
>>
>> Hi all
>>
>> I have a question regarding the speed of microcontrollers. As I know
>> that RISC mcus such as PIC need only 1 clock for each instruction
>>
> Not exactly. Small PICs take 8 clock cycles to execute one
> instruction. As they have a two-level pipeline, they finish one
> instruction each 4 clock cycles.
>> while CISC need several clock (8051 need 12T).
>>
> Correct, but some optimized 8051 cores may need only 3 clocks.
>> That's why PIC is usually faster than 8051 (for the same clock
>> frequency).
>>
> Yes, PICs execute more instructions than 8051s in the same time at the
> same clock. BUT as PICs instructions are simpler, you may require more
> instructions to do the same job, somewhat reducing the imbalance.
>> I noticed that there're many 8051 core microcontrollers (STC 8051
>> , siliconlab ,
>> Atmel ). My question is which one is faster
>> between the 1T 8051 and PIC (for the same clock freq, programmed with
>> C language)?
>>
>> Mike
>>
>> _
>
> It depends on the compilers and how the program was written. It's a
> long time since I programmed my last 8051, but a PIC surely will be
> faster than a 12T 8051 at the same clock. I'm not sure about a 1T
> optimized 8051.
> Isaac
I Just checked the links Mike provided. The Silabs 8051 are impressive,
25 to 48 MIPS !!! Wow!!!

In my good old 8051 times (around 16 years ago) they did at most 2 MIPS.

But I probably would not use 8051s again, nowadays we have 55 MIPS
AVR32s, 80 MIPS PIC32s, 400 MIPS ARMs, etc. (all at 32 bits).
Best regards,

Isaac
Actually, the small PICs need 4 clocks per instruction, the 16 bit ones need 2 and the 32 bit PICs need 1.

DLC

--
Dennis Clark
While traveling

On Jan 19, 2011, at 11:51 PM, "Mike Liu" wrote:

> Hi all
>
> I have a question regarding the speed of microcontrollers. As I know that RISC mcus such as PIC need only 1 clock for each instruction while CISC need several clock (8051 need 12T). That's why PIC is usually faster than 8051 (for the same clock frequency).
>
> I noticed that there're many 8051 core microcontrollers (STC 8051 , siliconlab , Atmel). My question is which one is faster between the 1T 8051 and PIC (for the same clock freq, programmed with C language)?
>
> Mike
On 24/1/2011 7:22 PM, Dennis Clark wrote:
> Actually, the small PICs need 4 clocks per instruction, the 16 bit ones
> need 2 and the 32 bit PICs need 1.

I was going to respond in the same fashion, but actually 8 clocks per
instruction from start to completion is correct for the 12/14 bit cores.
With the two-stage pipeline (fetch/execute, both stages being 4 clocks
long) this results in one instruction being completed every 4 clocks
(except for the ones that cause the pipeline to be cleared).

--

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu


The 2024 Embedded Online Conference