Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Sergio Masci <sergio@xxxxxxxxxxxxxxxxx>
- Date: Sun, 16 Oct 2005 02:49:48 +0100
On Sun, 16 Oct 2005, Andreas Schwarz wrote:
> Ian Bell schrieb:
> > Andreas Schwarz wrote:
> > > Ian Bell schrieb:
> > > > Michael N. Moran wrote:
> > > > > Ian Bell wrote:
> > > > > > Andreas Schwarz wrote:
> > > > > > > The problem is that you need different instructions to
> > > > > > > read from RAM
> > > > > > > and ROM, so you often end up with two functions that
> > > > > > > do the same thing,
> > > > > > > one for RAM arguments (printf), and one for ROM
> > > > > > > arguments (printf_P).
> > > > > >
> > > > > > Right so the *real* problem is handling large constant
> > > > > > strings.
> > > > >
> > > > > Well ... strings are only one part of the problem.
> > > > > Any constant tables/arrays, such as:
> > > > >
> > > > > o state tables
> > > > > o lookup-tables
> > > > > o <shield-up> v-tables <shield-down>
> > > > >
> > > > > are problematic to most traditional compilers/languages that
> > > > > only understand a single contiguous address space.
> > > > >
> > > > >
> > > >
> > > >
> > > > But surely that is a *compiler* issue not a fault of the
> > > > underlying
> > > > architecture?
> > >
> > > No. To achive true transparency, the compiler would have to generate
> > > code that can tell a ROM address from a RAM address at runtime.
> > > Otherwise functions that take pointer arguments would not be possible.
> >
> >
> > So it *is* a compiler issue.
>
> Any hardware annoyance can be hidden by a layer of software. Still I think
> it's fair to think of it as a fault of the architecture.
>
No you do not always need to add a LAYER of software. Most of the time it
is just a case of generating code that looks horrible to YOU.
On a PIC you can insert RAM page select instructions in front of all
instructions if you wish *** OR *** you can analyse your code and only
insert them where you NEED them. This may not be "nice" because it
involves extra work for you. But if you do the job properly you end up
with a VERY LOW page select overhead, much lower than if each instruction
actually carried the extra bits required.
The trick is to use a high level language or sophisticated assembler that
will do this work for you. This is not adding a layer of software.
Regards
Sergio Masci
http://www.xcprod.com/titan/XCSB - optimising PIC compiler
FREE for personal non-commercial use
..
.
- Follow-Ups:
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Andreas Schwarz
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- References:
- Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Bill Giovino
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Mochuelo
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Sergio Masci
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Mochuelo
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Mike Harrison
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Andreas Schwarz
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Ian Bell
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Andreas Schwarz
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Ian Bell
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Michael N. Moran
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Ian Bell
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Andreas Schwarz
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Ian Bell
- Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- From: Andreas Schwarz
- Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- Prev by Date: Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- Next by Date: Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- Previous by thread: Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- Next by thread: Re: Microchip Introduces First 16-bit Microcontroller Product Line - the PIC24
- Index(es):
Relevant Pages
|
|