Pic design question

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.
Reply to
Robert Monsen
Loading thread data ...

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.

Reply to
Fritz Schlunder

design

in

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?).

Reply to
Fritz Schlunder

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?
Reply to
Cathryn

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

Reply to
Bob Eldred

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

--
?

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Thought real men drink Jolt.

petrus bitbyter

Reply to
petrus bitbyter

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

--
?

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

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

Cheers! Rich

Reply to
Rich Grise

So do the good ones, after liberal dilution with 80 proof or better. ;-)

Cheers! Rich

Reply to
Rich Grise

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
Reply to
Michael A. Terrell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.