Pic design question

C

Cathryn

Guest
I was just wondering why the pic16f676 (and most others)
use bank0 and bank1 to access registers. Would it be such
an overhead to use a 15 lines flash memory instead of just
14, this way we could have a full 8 bit for the registers instead
of just 7, doesn't this make more sense, i.e. make the design
slightly wastefull but in return we could have a much simpler
learning curve without all this bank0/1 business? Sometimes
elegance has a cost, but isn't it worth paying?
 
Cathryn wrote:
I was just wondering why the pic16f676 (and most others)
use bank0 and bank1 to access registers. Would it be such
an overhead to use a 15 lines flash memory instead of just
14, this way we could have a full 8 bit for the registers instead
of just 7, doesn't this make more sense, i.e. make the design
slightly wastefull but in return we could have a much simpler
learning curve without all this bank0/1 business? Sometimes
elegance has a cost, but isn't it worth paying?
I'm guessing it's historical. There exists lots of software that uses
it. Thus, it's recorded in sand (silicon). I find it an annoying source
of bugs. It probably simplified bringing their decoder to a larger flash
in 1992, or something like that.

If you are looking for elegance, skip the PIC series, which is hopeless
from that standpoint. There are many choices out there that don't have
these annoying quirks.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
 
"Cathryn" <cathrynse@hotmail.com> wrote in message
news:d24ij1$b1s$1@domitilla.aioe.org...
I was just wondering why the pic16f676 (and most others)
use bank0 and bank1 to access registers. Would it be such
an overhead to use a 15 lines flash memory instead of just
14, this way we could have a full 8 bit for the registers instead
of just 7, doesn't this make more sense, i.e. make the design
slightly wastefull but in return we could have a much simpler
learning curve without all this bank0/1 business? Sometimes
elegance has a cost, but isn't it worth paying?
In a high volume tight budget design no the elegance isn't worth the cost.
I assume you are using MPLAB and are familiar with the "banksel"
"instruction." It isn't so bad once you get used to it and if you stick to
a single PIC so you can memorize which bank all your registers are in.

Fortunately if you do have money burning a hole in your pocket you can use a
different PIC like the 18F2320 for instance where all your special function
registers are in a single bank. Of course 18F devices are more complicated
so they may not have a learning curve advantage. On the other hand I think
the new PIC10F offerings have so few special function registers they don't
need splitting up into more than one bank either.
 
"Cathryn" <cathrynse@hotmail.com> wrote in message
news:d24ij1$b1s$1@domitilla.aioe.org...
I was just wondering why the pic16f676 (and most others)
use bank0 and bank1 to access registers. Would it be such
an overhead to use a 15 lines flash memory instead of just
14, this way we could have a full 8 bit for the registers instead
of just 7, doesn't this make more sense, i.e. make the design
slightly wastefull but in return we could have a much simpler
learning curve without all this bank0/1 business? Sometimes
elegance has a cost, but isn't it worth paying?
Bank shifting as well as having to load "high" bytes into the pclath for
paging is an anachronism of the PIC design. It apparently comes about from
the days when silicon was dear to keep chip area down. That's hardly the
case these days. As was mentioned the PIC 18 series does not require this
nonsense and there are many other choices from other manufactures. I think
Microchip would be well advised to re-design the 16 series so that these
inconveniences are not required. These days they could do a hardware design
that would use the same code at the assembly level but with added bits to
not require any banking or paging for operation. Where such commands are in
the code, the hardware could ignor them. Most of the problems I have had
with PICs are related to improper banking and paging, the reqirements of
which are less than obvious to a beginner. Sometimes the hardest thing to
find is the case where the damn things jumps to an unrelated place in the
code because some goto isn't properly pclathed. Also a new 16 bit design
would alleviate all of these problems plus give much added power.
Bob
 
"Bob Eldred" <nsmontassoc@yahoo.com> wrote in message
news:uwl1e.1908$FN4.1772@newssvr21.news.prodigy.com...

inconveniences are not required. These days they could do a hardware
design
that would use the same code at the assembly level but with added bits to
not require any banking or paging for operation. Where such commands are
in
the code, the hardware could ignor them. Most of the problems I have had
with PICs are related to improper banking and paging, the reqirements of
which are less than obvious to a beginner. Sometimes the hardest thing to
find is the case where the damn things jumps to an unrelated place in the
code because some goto isn't properly pclathed.
That just means you are a wuss programmer. :)

A real programmer programs in machine code, never needs to debug anything,
believes direct sunlight causes instant death, and eats tires for breakfast
(or was it they drink Mountain Dew?).
 
Fritz Schlunder wrote:
A real programmer programs in machine code, never needs to debug anything,
believes direct sunlight causes instant death, and eats tires for breakfast
(or was it they drink Mountain Dew?).

I think bad programmers drink Classic Coca-Cola. ;)

--
?

Michael A. Terrell
Central Florida
 
"Michael A. Terrell" <mike.terrell@earthlink.net> schreef in bericht
news:4245F0FC.FF1332FE@earthlink.net...
Fritz Schlunder wrote:

A real programmer programs in machine code, never needs to debug
anything,
believes direct sunlight causes instant death, and eats tires for
breakfast
(or was it they drink Mountain Dew?).


I think bad programmers drink Classic Coca-Cola. ;)

--
?

Michael A. Terrell
Central Florida
Thought real men drink Jolt.

petrus bitbyter
 
petrus bitbyter wrote:
"Michael A. Terrell" <mike.terrell@earthlink.net> schreef in bericht
news:4245F0FC.FF1332FE@earthlink.net...
Fritz Schlunder wrote:

A real programmer programs in machine code, never needs to debug
anything,
believes direct sunlight causes instant death, and eats tires for
breakfast
(or was it they drink Mountain Dew?).


I think bad programmers drink Classic Coca-Cola. ;)

--
?

Michael A. Terrell
Central Florida

Thought real men drink Jolt.

petrus bitbyter

I prefer my caffeine ice cold and green, thank you!

--
?

Michael A. Terrell
Central Florida
 
On Sat, 26 Mar 2005 23:32:20 +0000, Michael A. Terrell wrote:

Fritz Schlunder wrote:

A real programmer programs in machine code, never needs to debug anything,
believes direct sunlight causes instant death, and eats tires for breakfast
(or was it they drink Mountain Dew?).


I think bad programmers drink Classic Coca-Cola. ;)
That may be, but so does at least one excellent programmer that I know of!

Cheers!
Rich
 
On Sat, 26 Mar 2005 23:32:20 +0000, Michael A. Terrell wrote:

Fritz Schlunder wrote:

A real programmer programs in machine code, never needs to debug anything,
believes direct sunlight causes instant death, and eats tires for breakfast
(or was it they drink Mountain Dew?).


I think bad programmers drink Classic Coca-Cola. ;)
So do the good ones, after liberal dilution with 80 proof or better. ;-)

Cheers!
Rich
 
Rich Grise wrote:
On Sat, 26 Mar 2005 23:32:20 +0000, Michael A. Terrell wrote:

Fritz Schlunder wrote:

A real programmer programs in machine code, never needs to debug anything,
believes direct sunlight causes instant death, and eats tires for breakfast
(or was it they drink Mountain Dew?).


I think bad programmers drink Classic Coca-Cola. ;)

That may be, but so does at least one excellent programmer that I know of!

Cheers!
Rich

Do you remember the computer magazine "Kilobaud" published by Wayne
Green? On of the joke articles was asking people to support "The old
programmer's home" where they would be provided with blank punch cards,
coding sheets and Coke Cola.

--
Former professional electron wrangler.

Michael A. Terrell
Central Florida
 

Welcome to EDABoard.com

Sponsor

Back
Top