Re: PIC versus AVR



On 2006-08-04, Ulf Samuelsson <ulf@xxxxxxxxxxxxx> wrote:

Any processor that falls over when you attempt to do any
pointer manipulation isn't C-friendly.

You are probably saying that an 8 bit architecture is
inherently C-unfriendly.

After thinking more about the question, yes, an 8-bit
architecture is inherently more C-unfriendly than one which
supports "pointer-length" operations.

If you start in the other end: How do you make an 8 bit
architecture which is C-friendly you may come to a different
conclusion.

Start at yet another end again: why pick an 8-bit architecture
if you're using a language or writing an application that needs
to do a lot of 16-bit operations? Something like an MSP430
(16-bit) or H8 (16/32 bit) is cheaper than an AVR, and makes
life easier. I particularly like the H8/300 which provides
atomic read/write of 32-bit variables (long integers and
floats): that eliminates the requirements for a lot of mutexes.

From this viewpoint it is "C-friendly" to use 2 instructions
for 16 bit operations and 4 instructions to do 32 bit
operations.

Not as C-friendly as using 1. :)

--
Grant Edwards grante Yow! MY income is ALL
at disposable!
visi.com
.



Relevant Pages

  • Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
    ... The only thing I don't like about the AVR is the Harvard ... >architecture this is nothing. ... I am not aware of an AVR compiler that ... supports "generic" pointers, hence when using pointers the programmer ...
    (comp.arch.embedded)
  • Re: Moving from 8051 to AVR
    ... If you have sigificant amount of code written in assembler, ... you are locked into that architecture. ... porting it to an AVR was an even less smart thing to do. ... I would agree but the problem is you start with a nice small 8 bit MCU ...
    (comp.arch.embedded)
  • Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
    ... The only thing I don't like about the AVR is the Harvard ... >architecture this is nothing. ... are THREE diffferent types of IO register access, depending on ... Inconsistent branching methods - a mix of limited-range conditional branches and skip instructions. ...
    (comp.arch.embedded)
  • Re: Newbie question on Atmel AVR expanding program Flash
    ... As others have pointed out already, the AVR is a "harvard" ... architecture. ... it is not possible to fetch instructions from ... While you can't fetch AVR instructions from the data bus, ...
    (comp.arch.embedded)
  • Re: Moving from 8051 to AVR
    ... Rehashed 8051 is a bit like your grandmother trying on a bikini. ... AVR was designed from the ground up to be a modern processor. ... The 8051 is a great architecture, I moved from the PIC to the 8051/2 ...
    (comp.arch.embedded)