new to avr - advice please

Go To Last Post
67 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm looking into programming w/ avr. As a software applications developer, I'm very versed with writing code on the PC, and can handle c-code. Right now i'm coding with "PIC" eproms, but finding the support and general following kinda rare.

So I was wondering if anyone could reccomend a cheap / free and POPULAR compiler (in C), for me to take a look at. I learn by looking at examples and demos, so normally I just see how they works like that.

It looks like there are alot more forums and websites for AVR stuff, and I see alot of activity. Its just that there is SO MUCH, I can't narrow down what/where to begin, like chip size / config. I'm building stepper-motor control devices, and using pc-serial and signal communications.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try GCC with the WinAVR package.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The mega48/88/168 sounds like a good fit for your project. BTW the 48/88/168 are basicly the same except the 48 has 4kb and the 88 has 8kb and the 168......you get the picture.


My AVR Site

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are 4 popular compilers... GCC, Imagecraft, Codevision, IAR. All have many features, but its hard to say what is 'best'...

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AVR-GCC is the only free one if I'm not mistaken.
There is more than enough examples of code out there to make up your own mind just by viewing existing code. If you are serious about answers to your question read the 'sticky' thread "General Information about Posting in the AVR Forum.

Where to begin as far as chip size goes is up to you, though I would suggest; start in the middle of flash/ram size. Features vs ram vs flash size are very easy to figure out using the device section here which has a fully parametric look at almost the entire AVR line.

Stepper control and serial communication can be done on anything from discrete logic all the way to a parallel port on a PC run from nothing but software; so talking about that here is really beating a dead horse. Try a pure electronics discussion forum (except for device specifiv AVR-ASM/AVR-C code variations) such as http://www.edaboard.com/ for stepper related circuitry and more advanced signal related circuits. Standard serial is as done a discussion could ever get around here, unless you need to have the meaning of 8n1 explained to you.

Though if you are new to AVR serial ports (software or hardware based) and how they work on an AVR you will find more than enough information stored in the archives and no new post is needed. Everything from 300 to 115k baud (and some higher) on most AVR devices capable of sufficient clocks speeds has been discused in detail and is easily searchable in the archives here, sometimes with better responces than might be obtained in a new post.

-Curiosity may have killed the cat
-But that's why they have nine lives

Last Edited: Tue. Jan 10, 2006 - 11:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Like I said, they all have a range of 'features'. Some poor hobbiest would be most interested in price, someone else might be looking to port some c++ app down to an avr, so would be looking for the most complete c++ support (this narrows it down to GCC and IAR). Imagecraft is pretty good about supporting new avr chips as they materialize out of the transporter and become actual silicon instead of electrons, etc etc

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use the free GCC compiler and I just love using the atmega168.
The 168 is really low-cost when you buy 25 at a time. We get them
from DigiKey. The 168 has enough memory to do a non-trivial project.

If you go with GCC and the 168 I could send you a simple, ready2run
bit of code and a breadboard design...also I could detail the construction of a
cheap isp cable to use with the chip.

I recommend getting the STK500 if you are going to get into AVRs.

I also play with PICs but AVRs are like sooo superior!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow thanks for the responses everyone! I am just looking for something small to start with. I can see some cheap programmers on www.sparkfun.com; where I bought my pic programmer from. that stk500 looks like a nice board; if I can find one of them I'll try for it. I can code in c++ or c; and the pic-world is so limited with examples that are too old and lack of activity; I can see there is alot more support and user sites for AVR altogether, this should be fun.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
that stk500 looks like a nice board; if I can find one of them I'll try for it.

Digi-Key sells STK500's for $79 each.


My AVR Site

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm really happy with my STK500/501 for all of my experiments so far. It was absolutely painless to set up, easy to configure, etc. etc. etc.

I jumped in to this world with no electronics knowledge, and only self taught programming (although, I've been working in the field professionaly for almost 10 years now...). That said, I feel the STK500 along with the AVR tools, datasheets, appnotes, and GCC have made the first part of this transition wonderfully easy.

Man, am I pumped up about AVR's or what? :lol:

I have too many hobbies.
s-conductor.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MHatter, I live in a sort of perpetual giddiness due to the sheer greatness that is Atmel and their excelent products. Atmel are the only company on earth who I would honestly reccomend to others without prompting from them. That, and i'd be safe in the knowlege that my reccomendations won't come back t bite them in the future.

Go Atmel! :D

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the same background, I've been writing PC software for about 10 years and just started with AVRs about 3 weeks ago after being dissapointed by basic stamps in about 2 days. I can't say enough good things about AVRs and the community.

I've been using the avr-gcc compiler on windows with AVR Studio, and on linux. Both have worked fine. AVR Studio is intuitive and laid out like any standard coding IDE and isn't polluted with bells and whistles ( I like my beer cold, and my IDEs to only do what I tell them!). It has a simulator that's great for debugging and tweaking code (if you want to experiment you can start compiling code now and run it in debug mode on the simulator before you get your AVR / programmer). I haven't tried the other compilers only because I've been happy with the first one I used.

On where to begin ... if you do get the STK500 that's all you need to get started, they are shipping with two AVRs now (an ATMega8515L on the board and a ATMega16 in the box). My opinion is just pop either chip in, set it to 1Mhz internal, and learn how to use the basics like setting up the timers, doing PWM for your motors, using the UART, etc. Then worry about exactly what you're going to use, how fast it will need to be, etc (and you'll have a better idea by then about what you will really need).

For learning the coding it really doesn't matter which compiler you go with - if you are already a competent programmer and understand C then to get started the only real code-specific thing to learn is how the defines are done to access the ports / registers and how interrupts are handled, that's easy to look up between compilers. Much of the time you'll be searching for the proper procedure to do something (like which registers must be set up to use timer1, for example), not how exaclty to code it ... it's pretty easy to see the answers in any of the C code and even the assembly code. I've discovered a lot of my answers from non-gcc code and most of them have been pretty easy to follow.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I just started on AVR in Nov last year. I know that there are a bewildering number of chips to choose from but please bear in mind your soldering ability when selecting one. If, like me, its not so good, go for chips that have DIL packages as there's plenty of scope for clumsy soldering!! (besides they stick nicely direct into breadboard).

STK500 is great...it saves you a load of hassle, you can just plug in a chip and and programme it via your PC serial port. It has onboard software selectable voltage and software clock source and gives you access to the fuses. All port pins are accessible via headers. To help with simulation/debugging it also has on-board RS232 (additional to the one used for chip programming), LEDs and switches, plus other features I've not used yet like parallel programming, a dataflash store and the ability to plug in an external clock source.

I've tried most of the compilers and I find that for £0 outlay GCC is good, although bug fixes and adoption of new chips is a bit slow (no criticism - these guys do it in their spare time!! But, if you are a hobbyist, this will only be a minor irritation :)) I was almost tempted by the one of the other compilers because of their support out of the box for LCD, keypad, etc. Luckily I started messing with an LCD and found that doing it myself a) allowed more flexibility in pin/port usage over the library functions (when you put an LCD and keypad on a 28 pin AVR it can take up a massive number of those precious pins!) and b) I could produce just the code I needed rather than suck in complete library modules.

I agree with haunaben, once I'd got over the fundamental stuff like using pins, I spend most of my time looking up datasheets for the values to load into registers to get a desired outcome. (e.g. how to select the required alternative pin usage.)

Good luck :))

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the words "Butterfly" and "Smiley" haven't appeared on this page yet I'll just add them:

Butterfly: http://www.atmel.com/dyn/product...
(possibly the best $20 you'll ever spend!)

Smiley: http://www.smileymicros.com

In fact, I notice on the front page of Freak's ( https://www.avrfreaks.net/index.p... ) they're offering a Butterfly with a free T-shirt thrown in for the same $20 - but I'm not sure who's offer that actually is. (I'd like to find out cos I'd like to know if they ship to Europe!)

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ive only been using AVRs for a couple of months now. Been using PICs for years though.

I just love these little AVRs, built my own development board with ISP (I'm too tight to buy the STK500), added a 4 line LCD, a few switches and some LEDs and voila up and running in no time at all.

As for compilers I must have used demo versions of just about all of the commercial compilers. CodevisionAVR is great, the built in functions for 1 wire comms, LCDs etc make development very quick. I'm currently using the CrossworksAVR compiler demo which is amazing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

In fact, I notice on the front page of Freak's ( https://www.avrfreaks.net/index.p... ) they're offering a Butterfly with a free T-shirt thrown in for the same $20 - but I'm not sure who's offer that actually is. (I'd like to find out cos I'd like to know if they ship to Europe!)

The offer is from the AVRfreaks site itself. The AVRfreaks "mascot" is on the front of the T-shirt.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan,

Do you know who I need to contact then to ask how much shipping to UK is then? Or whether they even can ship to Europe or is this just a domestic USA offer? Or is the $10 shipping a fixed price worldwide?

Cliff

Last Edited: Wed. Jan 11, 2006 - 05:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The AVRfreaks site is in Norway (not USA). I suppose that the shipping quoted is worldwide, but I'm not sure.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
The AVRfreaks site is in Norway (not USA).

Ooh! I never knew that. I just assumed the world rotated around the USA as it seems to for just about everything else in this life.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok thanks for much advice. I'm hunting to download avr-gcc now; i'll and i also have the avr studio downlaoded and installed (the studio looks like assembler compiler).

The stk500 @ $89 is too much for me to spend as a startup, I might consider that butterfly or some type of other starter developer-board at first.

The butterfly thing looks like all I need to do is hookup a dongle to it, and i can test stuff with it.

If I can start out with 18-pin chips, (which is what I am doing now in pic); that have 12 i/o pins (dont even need that much) then I'm set. I'm running @ 20 mhz, which is probably way faster then I need right now.

The motor control software I wrote is incredibly simple, its only a page or two in code, and thats my main concern. I have other projects lined up for serial communications, too.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If I can start out with 18-pin chips, (which is what I am doing now in pic); that have 12 i/o pins (dont even need that much) then I'm set. I'm running @ 20 mhz, which is probably way faster then I need right now.

If you don't have a strong need for 18-pin, I'd suggest starting out with Mega48/88/168, or the Mega8. Inexpensive; lots of packages; all the subsystems; readily available; low power features; easy upgrade to 88/168.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Ok thanks for much advice. I'm hunting to download avr-gcc now; i'll and i also have the avr studio downlaoded and installed (the studio looks like assembler compiler).

For windows google WinAVR for the avr-gcc binaries. After installation you can compile C manually with WinAVR or use AVR Studio (the interface allows you to create assembly or gcc projects and will use the WinAVR compiler if you choose gcc).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DrStein,

If you splash $20 on the Butterfly you don't need to buy much else besides an RS232 cable (and possibly a USB ot RS232 converter if you have a PC/laptop that no longer has RS232). The AVR on board the Butterfly is the ATMega169 which has the potential to have 54 I/O pins though it's true to say that as implemented in the Butterfly circuit quite a few are already tied up for other functions but could probably be "hacked" to re-use as generic IO if you didn't mind losing some other functionality (disconnecting the LCD display springs to mind for freeing up a huge number of IO in one hit)

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff,
I'm in the UK and just ordered the AVRFreaks T-shirt & butterfly, the shipping was charged at $10.

I'll let you know if it arrives with "postage due" stamps :)

david

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I just assumed the world rotated around the USA as it seems to for just about everything else in this life.

Unfortunately PayPal assumes that too. I would buy this wonderful kit happily, but PayPal assumes that since I'm Russian, I'm a terrorist/fraud/whatever.

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

svofski wrote:
but PayPal assumes that since I'm Russian, I'm a terrorist/fraud/whatever.

Ah but look on the bright side - you get to live in one of the most beautiful cities on earth!

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And the other bright side is it's better than being labelled a scam/con artist like all the Nigerians...

...although looking at eBay that seems justified :P

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
And the other bright side is it's better than being labelled a scam/con artist like all the Nigerians...

At least we have cheap vodka :D

The Dark Boxes are coming.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dapriuk wrote:
I'm in the UK and just ordered the AVRFreaks T-shirt & butterfly, the shipping was charged at $10.

I'll let you know if it arrives with "postage due" stamps :)


David,

Yup, I just went for the offer too (about £17.40 all in). I was temted to order two but as there didn't seem to be a shipping discount (it's $10 for each) I'll wait and see how the first one turns out before ordering another.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I dont have a use for 60 pins. The reason I was using 18 pin chips is because they cost around $3 and I have bad habbits of burning and breaking stuff while I learn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The ATMega48 is US$2.69/qty. 1; $1.69/qty. 25 in DIP.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
The ATMega48 is US$2.69/qty. 1; $1.69/qty. 25 in DIP.

Lee

Good ol' mega48's. I've used em to replace mega88's in order to save a buck... almost everyting is the same except for some rather obnoxious eeprom differences (and a minor lack of support in winavr).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DrStein99 wrote:
I have bad habbits of burning and breaking stuff while I learn.

Smoke, fire, and shrapnel are excellent motivators to learning. Yesterday we blew up a 180 volt diode on a test fixture. "What's that smell?" followed immediately be a 'crack' and then me diving for the power switch. Just another day at the office.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

almost everyting is the same except for some rather obnoxious eeprom differences

You lost me on that one. What "eeprom differences"? The only note is on "erase only" when below 2.8V supply. I guess that doesn't bother me 'cause our lithium cells (twin; the "di-lithium crystals") are pretty much dead when that much below 3V.

Quote:
(and a minor lack of support in winavr).

Switch to CodeVision.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Quote:

almost everyting is the same except for some rather obnoxious eeprom differences

You lost me on that one. What "eeprom differences"? The only note is on "erase only" when below 2.8V supply. I guess that doesn't bother me 'cause our lithium cells (twin; the "di-lithium crystals") are pretty much dead when that much below 3V.

Quote:
(and a minor lack of support in winavr).

Switch to CodeVision.

Lee

Page 19 of the datasheet: "EEAR8 is an unused bit in ATmega48 and must always be written to zero." This gets tricky in winavr since EEARH and EEAR8 don't seem to be defined, and just writing to EEAR doesn't work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm, I just use the CodeVision primitives for transparent access to EEPROM variables, read and write. CV doesn't even touch EEARH in Mega48 apps. I've never seen a problem. In fact, we've used Mega88s with Mega48 binaries in a couple instances recently, since Mega48s were nowhere to be found in the supply chain.

I'm guessing there is no "wire" inside the Mega48 to connect to the high address, since there ain't nothin' there.

Again, CV has complete support. :)

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobasaurus wrote:
This gets tricky in winavr since EEARH and EEAR8 don't seem to be defined, and just writing to EEAR doesn't work.

That's a curious comment. The iomx8.h I have installed by WinAVR includes:

#define EEDR    _SFR_IO8 (0x20)
#define EEAR    _SFR_IO16 (0x21)
#define EEARL   _SFR_IO8 (0x21)
#define EEARH   _SFR_IO8 (0x22)
/* 
Even though EEARH is not used by the mega48, the EEAR8 bit in the register
must be written to 0, according to the datasheet, hence the EEARH register
must be defined for the mega48.
*/

The comment even justifies the definition of EEARH in the "48" case?!

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For windows google WinAVR for the avr-gcc binaries. After installation you can compile C manually with WinAVR or use AVR Studio (the interface allows you to create assembly or gcc projects and will use the WinAVR compiler if you choose gcc).

I did a search and found some confusing sites that claim to store the files. Am I supposed to compile the source to make a compiler? I was looking for an application to install as a compiler to write c-code with.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow thats messy. Is there a procedure somewhere to link all this into avr-studio as it's IDE?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Huh? You download the WinAVR installer, and run it. That will then install AVR-GCC, Programmers Notepad and several other goodies (including a manual) to the chosen destination. AVRStudio will the automatically find the GCC directory and link into it IIRC. No extra configuration needed.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry; i was a little hastey.

I started reading the manual as it explains it doesnt come with a standard GUI or IDE, I started muscling around and it looked like some command-line stuff; that kinda scared me.

----

When ran avr-studio, I found the GCC option to start a new project right away.

Now I'm on the prowl for some example / demo projects, thanks for advice!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

GCC itself *is* command line. But that can be a very good thing as you've just found out - it means that any IDE is free to call it easily. The editing IDE called "Programmer's Notepad" is included, which required special files to build your project called "makefiles". These "makefiles" are like complex BAT files which tell GCC where your project files are, and what compilation settings you want.

AVRStudio also uses makefiles, but they are generated "behind the scenes" via the IDE in reponse to the settings you choose on its screens. AVRStudio makes it easy to quickly get started with no prior knowlege, or just belt out a simple quick test program.

Plenty of simple projects in the academy section. Have fun!

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I seen the example code. I can understand very much all of it; and its awesome. So identical to pic-programming in most every way.

I'll probably order a developer board this week and get started testing some led flashers, and port my existing motor code over to avr.

Am I mistaken, or are most all chips max speed is 16 mhz?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also, keep your eye out for a new upcoming WinAVR release....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I bought several butterflies from smileymicros ( USA ). They sent all of them to Mallorca ( Spain ) and no problem at all. Fast shipment, in a 4 o 5 working days.

Guillem M.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I might buy this development board; it seems like a good deal to me: http://www.sparkfun.com/commerce...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If You can afford it, I'd suggest a STK500 board instead ...(or a Butterfly)
The 'sparkfun' board is limited in quite a few ways:

- Only 20 pin AVR:s
- Not access to all I/O:s
- No ISP programmer "builtin" (I've understood that the STK500 has one ?)
...
...
I assume it's the '20 Pin AVR Relay Development Board' You're referring to ?

Just my 0.02 NOK ...

/J

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was looking at the relay development board, at sparkfun. Right now I can only burn 18 pin PIC chips, so it's not much of a change or problem if I can only burn 20 pin AVRs (at first).

The stk board is too expensive; unless I can find a real good deal on one; I agree - it does look like a nice board.

The butterfly looks nice, but I'm not interested in that; is that chip soldered in? I would like a programmer where I can remove the chips and use them in my applications.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DrStein99 wrote:
I was looking at the relay development board, at sparkfun. Right now I can only burn 18 pin PIC chips, so it's not much of a change or problem if I can only burn 20 pin AVRs (at first).

The stk board is too expensive; unless I can find a real good deal on one; I agree - it does look like a nice board.

The relay board isn't a programmer though, and doesn't come with any AVR's, so already you need to spend more money. You could get a cheap ISP dongle and use it with the relay board, until you mess up the fuse settings and require high voltage programming to fix it, then you buy another programmer or another chip :)

I really like the stk500, because for the price you get two AVRs now (a mega8515 and mega16), a high-voltage and an isp programmer with many AVR socket sizes, and a lot of dev-board features (on-board configurable clock source, header connectors, rs-232 level converter, leds and buttons). I'm not saying the stk500 is the only good choice, just that it is a reasonable price compared to buying everythign seperately (but then again if you never plan on progressing past 20 pin AVRs and a cheap ISP dongle then it's probably not worth it).

Quote:
The butterfly looks nice, but I'm not interested in that; is that chip soldered in? I would like a programmer where I can remove the chips and use them in my applications.

Yes, it's an all-in-one package. It's a great demo unit and good for learning the basics (and a very cheap and tidy solution for someone that just wants to learn a bit about microcontrollers), but not really re-useable in building your own things.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have to agree. Just got my STK500 after looking at other products (in fact I also did get a 2313 board from futurlec before I realized the STK would be better value in the long run) and it is realy great. No problems setting everything up and like Haunaben said you get 2 chips with it to start off. The onboard osc is very useful if you need to run the chips at a differnet speed and the whole thing is realy solid. The futurlec board is still worth keeping (the price of $20 is worth more in parts) but the parrelle programming is not quite as nice as the serial programming you get with the STK.

I also thought ah! 20 pin chip will be fine to start off with but being able to access the larger devices is far eaiser because you have lots of ports to play with. I wanted an lcd, midi port and switches on my project which can be atcheived using the smaller devices but now I have a whole port for each part (midi, lcd and switches) which makes it eaiser to connect everything up. A seperate 10 pin header is used for each part so isolating one part or trying a different arrangment is easy.

When it is all working I can move the pin assignments to maybe work on a smaller chip (memory permitting) and thus lower the cost.

Bad spellers of the world untie!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

haunaben wrote:
DrStein99 wrote:

Quote:
The butterfly looks nice, but I'm not interested in that; is that chip soldered in? I would like a programmer where I can remove the chips and use them in my applications.

Yes, it's an all-in-one package. It's a great demo unit and good for learning the basics (and a very cheap and tidy solution for someone that just wants to learn a bit about microcontrollers), but not really re-useable in building your own things.

I'm using one to control 16 relays in a test fixture a battery charger assembly line, and another to measure 4 test voltages used in calibrating the battery chargers. One guy here at AVRFreaks is using 23 Butterflies on an assembly line. There are MP3 players, automobile ignition contollers, Data Loggers and just all kinds of places these things are used in.

Smiley

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a few dev boards (for a variety of reasons) but the only one I definietely wouldn't want to lose is my STK500 :)

If all you want to do is dip your toes in the water, the butterfly is amazing value, and smiley (above) even gets you up and running without buying his entire book... there's an online chapter :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The price of an avr chip is like $2 or $3; so if whatever I buy doesnt come with the chips then I wont go broke ordering them separate.

I will however, not know if I will have a need or use for all the features on the stk500.

What I would like is a 20 pin programmer development board with possibly a header for testing, and whatever standard led's or relays or switches built into it; for at most - half the price of a stk500.

The pic programmer I use is 18 pins, and has just about nothing on it and I've gotten by with that by making my own test boards w/ header sockets.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:
DrStein99 wrote:
I have bad habbits of burning and breaking stuff while I learn.

Smoke, fire, and shrapnel are excellent motivators to learning. Yesterday we blew up a 180 volt diode on a test fixture. "What's that smell?" followed immediately be a 'crack' and then me diving for the power switch. Just another day at the office.

Smiley

We've got a guy who likes to start jumpering out things when a piece of equipment goes down at work.

Eariler this week we had a $5,000,000.00 dough mixer go down. This guy started jumping things and something poped. Four days and, more then $100,000.00 later, we got to the original problem - an access door safety switch. I don't think this guy will be with us very long.

So Joe, do we nick-name you "Smokey" or "Sparkey":

Anyway, I think "Smokey Joe" sounds better then "Sparkey Joe"!

Matbe that should be "Smiley Smokey Joe"!

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We all know Smokey's name is Smokey. I've been using that for ages! Thankfully the internet doesn't give him the opportunity to come to my house and kick me in the junk in person.

Isn't internet tourmenting fun? :D

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:
haunaben wrote:
DrStein99 wrote:

The butterfly looks nice, but I'm not interested in that; is that chip soldered in? I would like a programmer where I can remove the chips and use them in my applications.

Yes, it's an all-in-one package. It's a great demo unit and good for learning the basics (and a very cheap and tidy solution for someone that just wants to learn a bit about microcontrollers), but not really re-useable in building your own things.

I'm using one to control 16 relays in a test fixture a battery charger assembly line, and another to measure 4 test voltages used in calibrating the battery chargers. One guy here at AVRFreaks is using 23 Butterflies on an assembly line. There are MP3 players, automobile ignition contollers, Data Loggers and just all kinds of places these things are used in.

Smiley

Yes, I suppose you can interface it to whatever you want and thus it has more use than just a demo unit. What I was getting at though was that the AVR in the butterfly is not a DIP package and cannot be removed to use elsewhere.

It's still a good deal considering everything you get (just the LCD is worth it), if that's what you need ... but unless someone just wants to experiement for little investment or has a specific re-use need for the butterfly featuers I'd still reccomend starting out with the stk500 or some other programmer / dev board combo (or at least just a programmer, an AVR, and a prot board).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

haunaben wrote:
smileymicros wrote:
haunaben wrote:
DrStein99 wrote:

The butterfly looks nice, but I'm not interested in that; is that chip soldered in? I would like a programmer where I can remove the chips and use them in my applications.

Yes, it's an all-in-one package. It's a great demo unit and good for learning the basics (and a very cheap and tidy solution for someone that just wants to learn a bit about microcontrollers), but not really re-useable in building your own things.

I'm using one to control 16 relays in a test fixture a battery charger assembly line, and another to measure 4 test voltages used in calibrating the battery chargers. One guy here at AVRFreaks is using 23 Butterflies on an assembly line. There are MP3 players, automobile ignition contollers, Data Loggers and just all kinds of places these things are used in.

Smiley

Yes, I suppose you can interface it to whatever you want and thus it has more use than just a demo unit. What I was getting at though was that the AVR in the butterfly is not a DIP package and cannot be removed to use elsewhere.

It's still a good deal considering everything you get (just the LCD is worth it), if that's what you need ... but unless someone just wants to experiement for little investment or has a specific re-use need for the butterfly featuers I'd still reccomend starting out with the stk500 or some other programmer / dev board combo (or at least just a programmer, an AVR, and a prot board).

Nested quotes are fun.

The butterfly board is a cheap way to get started with AVRs, and examine their capabilities. You can always hack parts of it off (eg. the screen) and free up more IO ports than you could shake a PIC at (assuming you'd toch the thing in the first place :D). If you want to get serious with AVRs, get a STK500. Other brands may make nice gimmiky boards with LCDs and such onboard, but nothing beats the reliability, performance, features and quality of the real Atmel gear.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
What I would like is a 20 pin programmer development board with possibly a header for testing, and whatever standard led's or relays or switches built into it; for at most - half the price of a stk500.

Take a look at the Futurlec board $20. If you want a cheap and workable solution. This is a great buy if REALY only need 20 pin devices. All the input/output lines are brought out to pin headers. There LCD (about $14) plugs straight into the board. Might be just what you are looking for

http://www.futurlec.com/ATDevBoard.shtml

One word of warning though. They do take there time for delivery, mine took 7 days to process the order and 7 days for delivery. For items I would like that are not needed fast I will use them again.

Bad spellers of the world untie!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#1. STK500 is the best don't have much to say.

#2. If you want cheap but pretty good try to get an STK200 board on ebay. If it doesn't come with the parrelell port programmer still buy it as that programmer is useless. Then build/buy some kind of newer serial port programmer that supports newer AVRs. The 200 it self has support for most new AVRs if you use a different programmer. I use an atmega16 in it programmed by an ATAVRISP that I got for $12 used. BTW, the stk200 was ~$40 but it was NOS (New Old Stock).

I'd say buy some proto-boards and a bunch of AVRs from digi-key with a super cheap homebuilt programmer and save up for an STK500. I love my STK500.


My AVR Site

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking at the chips, most of them are like 4 mhz and 8 mhz. I'm running my tests on the pic-chips at 20 mhz.

Is that the standard speed for most avr chips is 4 or 8? Is there any that run at 20 or 40 mhz?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PIC@20MHz is roughly the same as an AVR@5MHz
---> AVR@8MHz is roughly the same as a PIC@32MHz ...

This page has a short comparison covering the "basic" differences :
http://www.dvanhorn.org/Micros/A...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Looking at the chips, most of them are like 4 mhz and 8 mhz. I'm running my tests on the pic-chips at 20 mhz.

Is that the standard speed for most avr chips is 4 or 8? Is there any that run at 20 or 40 mhz?

To some extent that is apples and oranges. Most AVR models can support rated clock speeds to 16MHz, some to 20MHz. But almost all AVR instructions are carried out in 1 or 2 clock cycles. How many cycles per instruction are there on your 20MHz PIC?

Even answering that question, it is still fruit salad as the dissimilar architectures make those numbers (max frequency divided by average cycles per instruction) relatively meaningless.

In a TI study (dig through http://www.maxim-ic.com/appnotes... ) a Mega8 completed the benchmark suite in 63% of the cycles that a PIC18F242 used, and the code size was 55%. Take benchmarks for what they are worth. :) It will depend on your application and the needs for crunch power. With our dozens of production industrial apps that I would consider true microCONTROLLER apps, we have yet to crank up a clock rate to over 7.3728MHz. Remember that when you don't have any fast clocks flying around on the boards the emissions are much easier to control.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I can see lots of people use these to make their own mp3 players w/ lcd screens - so that right there takes ALOT of clock instructions to handle playing audio and refreshing an lcd. So I'm sure you're right about that speed; I was just a little nervous that I wouldnt be able to get enough frequency and calculations for my motion controllers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps you could try assembly as well, using avr studio, which is free. I think that for the kind of applications you are working on, assembly language might be a good choice

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I like the looks of this development board. onboard led's and pushbuttons? ya!

http://www.futurlec.com/ATMega8_...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would add that the latest version of AVR studio (free) is tightly integrated with the GCC compiler (WinAVR - free), providing an awesome integrated development environment. I would also second to positive comments on the STK500 and Butterfly.