EmbeddedRelated.com
Forums

PIC versus AVR

Started by mc August 3, 2006
On 2006-08-08, Anton Erasmus <nobody@spam.prevent.net> wrote:

> Reading arguments of PIC vs whatever, is very similar to the > religious discussions regarding Hi-Fi equipment.
PIC: The vacuum-tube of microcontrollers. You can quote me on that... -- Grant Edwards grante Yow! YOW!! Everybody out at of the GENETIC POOL! visi.com
"Anton Erasmus" <nobody@spam.prevent.net> wrote in message 
news:dodgd25jfhv52fumc95h69acf7c87hk6f8@4ax.com...
> On Fri, 4 Aug 2006 17:14:12 -0400, "mc" > <look@www.ai.uga.edu.for.address> wrote:
>>It would have been nice if AVR and PIC 8-pin micros had had the same >>pinout, >>so they could really fight it out in the marketplace! > > Some of the AVRs are pin compatible with standard 40-pin 8051 devices. > I doubt that Atmel sees the PIC as their main competitor. It seems > that most PIC proponents uses it more from a religious reason than for > any technical reason. Reading arguments of PIC vs whatever, is very > similar to the religious discussions regarding Hi-Fi equipment.
Hmmm... I use PICs a lot but do not feel any "religious" loyalty to them. They're quirky but handy. I will gladly use others too.
The .cod file format supports path lengths beyond 62 characters and other changes as it and teh operating systems it will run on evolved beyond MS DOS.

w..


mc wrote:

> >> The latter. Microchip MPLAB requires you to have write permissions in > >> something under C:\Program Files, presumably its own directory. I don't > >> know what it writes there, or whether different users of the same > >> computer will disrupt each other. In order to use MPLAB we have to > >> loosen security on our computers by letting all users write in that > >> directory. > > > > Have you raised this with microchip ? - it is by no means a unique > > problem, and they do need to clean up their act, so point all this out to > > them. > > Yes, I've been corresponding with them about this. I'm also pressing them > to make the old 62-character path length limit go away, because it is now > very common for paths on a Windows system to be that long or longer > (C:\Documents and Settings\blahblah\My Documents\PIC projects\myprog.asm). > The limit is actually in the .COD file format, which they don't control. > You can work around it by first adding a linker script to your project (so > the linker will run, rather than assembling directly to HEX) and then > turning off COD file generation. I argue that this should actually be the > default, since there are more people who need long paths than people who > need COD files. > > > If they realise MPLAB is being _removed_ from educational classes because > > of simply slack SW design, I'm sure they'll move very fast to remedy it. > > [ well, they should; if they can't be bothered, then they deserve the > > consequence ] > > > > Would having the project directory on a FLASH drive be a security risk > > ? - I see they are getting ever cheaper. > > Actually, that's how we did a lot of our projects last year! Flash drive > reliability isn't perfect and I urge people to make hard-disk copies often.
mc wrote:

> 8051, PIC, etc., in this respect. Among microcontrollers, the 68HC11 and > MSP430 have Von Neumann architecture; almost all larger computers do > (Pentium, VAX, etc.).
Even from the beginning of the C on the PDP-11 it pretty well worked with separate I/D spaces (and that is exactly how the Harvard architecture is visible for the programmer).
On 2006-08-09, Arcady <abaldus@hotmail.com> wrote:
> mc wrote: > >> 8051, PIC, etc., in this respect. Among microcontrollers, the >> 68HC11 and MSP430 have Von Neumann architecture; almost all >> larger computers do (Pentium, VAX, etc.). > > Even from the beginning of the C on the PDP-11 it pretty well > worked with separate I/D spaces (and that is exactly how the > Harvard architecture is visible for the programmer).
The problem isn't separate I/D space, it's the need for non-volatile, read-only data. On Harvard architecture uC's usually the only way that can be accomplished is to put the "const" data into the "code" address space. Once you've done that, you've got the whole mess of dealing two different flavors of pointers, two different flavors of memcpy, four flavors of memcmp, etc. -- Grant Edwards grante Yow! I'll take ROAST BEEF at if you're out of LAMB!! visi.com
"Grant Edwards" <grante@visi.com> wrote in message 
news:12djnslecpjtf70@corp.supernews.com...

> The problem isn't separate I/D space, it's the need for > non-volatile, read-only data. On Harvard architecture uC's > usually the only way that can be accomplished is to put the > "const" data into the "code" address space. Once you've done > that, you've got the whole mess of dealing two different > flavors of pointers, two different flavors of memcpy, four > flavors of memcmp, etc.
Precisely what I was thinking about. Thanks for elaborating it...
"Grant Edwards" <grante@visi.com> skrev i meddelandet 
news:12djnslecpjtf70@corp.supernews.com...
> On 2006-08-09, Arcady <abaldus@hotmail.com> wrote: >> mc wrote: >> >>> 8051, PIC, etc., in this respect. Among microcontrollers, the >>> 68HC11 and MSP430 have Von Neumann architecture; almost all >>> larger computers do (Pentium, VAX, etc.). >> >> Even from the beginning of the C on the PDP-11 it pretty well >> worked with separate I/D spaces (and that is exactly how the >> Harvard architecture is visible for the programmer). > > The problem isn't separate I/D space, it's the need for > non-volatile, read-only data. On Harvard architecture uC's > usually the only way that can be accomplished is to put the > "const" data into the "code" address space. Once you've done > that, you've got the whole mess of dealing two different > flavors of pointers, two different flavors of memcpy, four > flavors of memcmp, etc. > > --
Or you adopt the practice of copying the const data to the stack before use. Takes a little extra time, but usually works quite ok and conserves RAM resource. -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
> Grant Edwards grante Yow! I'll take ROAST > BEEF > at if you're out of LAMB!! > visi.com
On Wed, 09 Aug 2006 06:25:34 GMT, Arcady <abaldus@hotmail.com> wrote:

>mc wrote: > >> 8051, PIC, etc., in this respect. Among microcontrollers, the 68HC11 and >> MSP430 have Von Neumann architecture; almost all larger computers do >> (Pentium, VAX, etc.). > >Even from the beginning of the C on the PDP-11 it pretty well worked with separate I/D >spaces (and that is exactly how the Harvard architecture is visible for the programmer).
As I understand the history, C was being developed before the PDP-11 was actually a product. Am I reading you correctly as suggesting that early PDP-11s (such as the PDP-11/20) had/have separate instruction and data memory spaces? Jon
On 2006-08-09, Jonathan Kirwan <jkirwan@easystreet.com> wrote:
> On Wed, 09 Aug 2006 06:25:34 GMT, Arcady <abaldus@hotmail.com> wrote: > >>mc wrote: >> >>> 8051, PIC, etc., in this respect. Among microcontrollers, the 68HC11 and >>> MSP430 have Von Neumann architecture; almost all larger computers do >>> (Pentium, VAX, etc.). >> >>Even from the beginning of the C on the PDP-11 it pretty well worked with separate I/D >>spaces (and that is exactly how the Harvard architecture is visible for the programmer). > > As I understand the history, C was being developed before the PDP-11 > was actually a product. Am I reading you correctly as suggesting that > early PDP-11s (such as the PDP-11/20) had/have separate instruction > and data memory spaces?
IIRC, early ones didn't. Later ones did. Unix on the 80268 worked pretty much the same way: a 64K data segment and a 64K text segment. -- Grant Edwards grante Yow! I think I am an at overnight sensation right visi.com now!!
The first released PDP-11's mostly shipped to research centers.  My lab at U of Waterloo had serial numbers 186 and 216 that were labelled PDP-11's By serial number 500 or so they were labelled PDP-11/20's same computer. These computers had a linear
address space with 56K bytes RAM max and 8K of I/O space.

For nostalgia folks out there. I bought core memory for these computers at the then unheard of price of a $1 / Byte. This would be sometime in the early 70's . Yep the memory card that comes with your camera would have been worth millions.

w..


Jonathan Kirwan wrote:

> On Wed, 09 Aug 2006 06:25:34 GMT, Arcady <abaldus@hotmail.com> wrote: > > >mc wrote: > > > >> 8051, PIC, etc., in this respect. Among microcontrollers, the 68HC11 and > >> MSP430 have Von Neumann architecture; almost all larger computers do > >> (Pentium, VAX, etc.). > > > >Even from the beginning of the C on the PDP-11 it pretty well worked with separate I/D > >spaces (and that is exactly how the Harvard architecture is visible for the programmer). > > As I understand the history, C was being developed before the PDP-11 > was actually a product. Am I reading you correctly as suggesting that > early PDP-11s (such as the PDP-11/20) had/have separate instruction > and data memory spaces? > > Jon