EmbeddedRelated.com
Forums

Moving from 8051 to AVR

Started by ziggy February 5, 2006
Looking for opinions on possibly moving from the 8051 family to the 
AVR's.

Im an old timer and really prefer the Harvard a architecture, but i do 
realize that the '51 is getting pretty dated.

It seems like the AVR is my logical step, but was wondering on what 
others out there my think, who have gone thru the change themselves.

Tks all.
ziggy wrote:

> Looking for opinions on possibly moving from the 8051 family to the > AVR's. > > Im an old timer and really prefer the Harvard a architecture, but i do > realize that the '51 is getting pretty dated. > > It seems like the AVR is my logical step, but was wondering on what > others out there my think, who have gone thru the change themselves.
Yes, the AVR is a good choice. Compared to the 8051, it has 3 index registers which allow to use the ASM quite comfortable. There are some free tools, such as ASM, Simulator available on the Atmel website. There are also some not too expensive compilers : For C have a look at the iccavr ( http://www.imagecraft.com/ ), for Pascal have a look at the e-lab ( http://www.e-lab.de/ ) Rene -- Ing.Buero R.Tschaggelar - http://www.ibrtses.com & commercial newsgroups - http://www.talkto.net
> It seems like the AVR is my logical step, but was wondering on what > others out there my think, who have gone thru the change themselves.
I can't say I've gone through the change, but I have migrated somewhat from 8051 to AVR ;) I do enjoy working with AVR very much indeed, and I never enjoyed the 8051 that much (though there was a certain sense of excitement in actually getting something done on that chip). HOWEVER... can you tell us why you are contemplating this move? If it's merely out of a sense of aesthetics, how much are you willing to invest in migrating to a "nice" processor? If you are worried that 8051 devices are going to disappear, please don't hold your breath. We will have 8051s as long as we have an 8-bit microcontroller market. The reason I ask this question is that you MIGHT be better served by leapfrogging AVR entirely and moving into the low-end ARM arena. In this case, your code will be easier to migrate into larger, faster, niftier parts. It's certainly worth thinking about. BTW, you will observe that 40-pin AVR pinouts suspiciously resemble an 8051...
On Sun, 05 Feb 2006 21:47:16 GMT, ziggy <ziggy@fakedaddress.com> wrote
in comp.arch.embedded:

> Looking for opinions on possibly moving from the 8051 family to the > AVR's. > > Im an old timer and really prefer the Harvard a architecture, but i do > realize that the '51 is getting pretty dated.
Not criticizing, mind you, but merely curious, if you don't mind replying. Why do you prefer Harvard architecture? What actual difference does it make in your actual development? -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://c-faq.com/ comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
In article <1139179150.086768.21700@f14g2000cwb.googlegroups.com>,
 "larwe" <zwsdotcom@gmail.com> wrote:

> > It seems like the AVR is my logical step, but was wondering on what > > others out there my think, who have gone thru the change themselves. > > I can't say I've gone through the change, but I have migrated somewhat > from 8051 to AVR ;) > > I do enjoy working with AVR very much indeed, and I never enjoyed the > 8051 that much (though there was a certain sense of excitement in > actually getting something done on that chip). > > HOWEVER... can you tell us why you are contemplating this move? If it's > merely out of a sense of aesthetics, how much are you willing to invest > in migrating to a "nice" processor? > > If you are worried that 8051 devices are going to disappear, please > don't hold your breath. We will have 8051s as long as we have an 8-bit > microcontroller market. > > The reason I ask this question is that you MIGHT be better served by > leapfrogging AVR entirely and moving into the low-end ARM arena. In > this case, your code will be easier to migrate into larger, faster, > niftier parts. It's certainly worth thinking about. > > BTW, you will observe that 40-pin AVR pinouts suspiciously resemble an > 8051...
Its mostly the concern of 'falling behind' a bit, and since the AVR AVR seemed similar, it wouldn't be a big change.. The AVR's seemed potentially better performance too. Kill 2 birds with one stone, so to speak.
Jack Klein <jackklein@spamcop.net> writes:

> On Sun, 05 Feb 2006 21:47:16 GMT, ziggy <ziggy@fakedaddress.com> wrote > in comp.arch.embedded: > >> Looking for opinions on possibly moving from the 8051 family to the >> AVR's. >> >> Im an old timer and really prefer the Harvard a architecture, but i do >> realize that the '51 is getting pretty dated. > > Not criticizing, mind you, but merely curious, if you don't mind > replying. > > Why do you prefer Harvard architecture? What actual difference does > it make in your actual development? >
That is actually the one thing I *don't* like about the AVR. It makes it very awkward to handle constant data efficiently. I would second Lewins suggestion of a low-end ARM. -- John Devereux
ziggy wrote:

> Its mostly the concern of 'falling behind' a bit, and since the AVR AVR > seemed similar, it wouldn't be a big change..
Mmmmmfff... this is a really tough one to comment on usefully. Yes, 8051 is old and scraggly. AVR is clean and modern by comparison. But unless you have a real project that would benefit in a concrete way from AVR, I would not advise moving. (Price is a consideration... dollar for feature, I think 8051 variants will beat AVRs in the high end at least - maybe not down at the 8-pin end though). If you are planning some massive upheaval like migrating from asm to C as your language of choice, then yes - run, do not walk to a modern architecture like AVR or MSP430. Otherwise, a careful study of actual dollar benefits is necessary.
ziggy wrote:

> Looking for opinions on possibly moving from the 8051 family to the > AVR's. > > Im an old timer and really prefer the Harvard a architecture, but i do > realize that the '51 is getting pretty dated. > > It seems like the AVR is my logical step, but was wondering on what > others out there my think, who have gone thru the change themselves. > > Tks all.
I find these kind of questions interesting. I come from a background where we: * Programmed in C (later C++) almost exclusively * Wrote our code to be as portable as possible, particularly stuff intended for reuse. * Chose whatever processor made sense at the time, be it 8-, 16- or 32-bit, CISC, RISC or DSP. So the answer to the question you're asking was always "sure, why not". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
In article <qsvcu1lui25uqd2q3gnkp66t6k4cu1ooet@4ax.com>,
 Jack Klein <jackklein@spamcop.net> wrote:

> On Sun, 05 Feb 2006 21:47:16 GMT, ziggy <ziggy@fakedaddress.com> wrote > in comp.arch.embedded: > > > Looking for opinions on possibly moving from the 8051 family to the > > AVR's. > > > > Im an old timer and really prefer the Harvard a architecture, but i do > > realize that the '51 is getting pretty dated. > > Not criticizing, mind you, but merely curious, if you don't mind > replying. > > Why do you prefer Harvard architecture? What actual difference does > it make in your actual development?
While its more of an abstract answer, i 'think' more in the Harvard way.. Always have, so it makes more sense to me. ( much as i 'think' in RPN.. ). Does it *really* matter? Nah, but its a preference. Oh, and microcode is fun ... Shows you how 'old' my thought process is :)
"ziggy" <ziggy@fakedaddress.com> wrote in message 
news:ziggy-43FE3F.16471505022006@netnews.asp.att.net...
> Looking for opinions on possibly moving from the 8051 family to the > AVR's. > > Im an old timer and really prefer the Harvard a architecture, but i do > realize that the '51 is getting pretty dated. > > It seems like the AVR is my logical step, but was wondering on what > others out there my think, who have gone thru the change themselves.
I've used the 51 for years too. C mostly with some assembly. Been using the AVR ATmega family for last year or so. The ATmega family is easy to setup, easy to use and very scalable (4K-256K). Initially I looked at the Tiny AVR family and wasn't to enthusiastic. The limitations reminded me of PICs. The ATmega family is much nicer and easy to get started, if you are using C. I've ported 8051 Keil C over to AVR WinAVR in an unexpectly short time. I found the WinAVR (GCC port) to be easy to use and reliable. (some gripe about it being difficult to setup, but I had no problems). To get more efficient C code we switched over to $$$$ IAR C compiler. Its really nice, though I have to put up with the IAR dongle. I say go for it and don't look back. :-)