Accessing the ATmega/AVR directly ?

Hello,

I'm yet to get an Arduino.

I'm wondering if I were to choose could I access the AVR on it directly outside of the Arduino/Processing world ?

Like it were an AVR development board:

(something like the ET-AVR_Stamp_Board from futurlec.com)

Perhaps it's one or the other ? Can I switch from one to the other easily (or is there a one road involved?)

I like the look of the Arduino Mega if that is of consequence

operating off OS X if need be - but preferably Linux on mac (once I get that going ::))

Kind regards

There are two things involved:

(1) Arduino programs load through the serial interface using a bootloader. This is supported by AVRdude, and you can use this mechanism (i.d. profit from the bootloader mechanism) also for hex files generated by other development systems.

BTW: In fact Ardiono programs need not neccessarily take that route. AVRdude can be instructed to load all Arduini programs through any ISP programmer (STK500 or USBasp or...) This is rarely used, as most Arduino Boards have an USB connector.

(2) The Arduino IDE compiles for a limited constallation of chips only, this is - to my best knowledge:
16 MHz crystal or external oscillator
328
168
88
8

8 MHz Internal oscilator
168
328

However any clock setting is possible!!
In that case you have to either program with an external ISP programmer or remove the chip after having loaded the (strange) program with the bootloader to another board. You might also have to change the fuses, as the bootloader needs on of the above mentioned options. As this is awkward, I recommend to use an external programmer in case you want to deviate from the standard configurations...

My interest is that although I am your typical 'media/arty' tinkerer and the Arduino is very likely all I might need I'd like to learn how things are done by the rest of the world (traditional automation/robotics tinkerers etc...)

Hoping that the Arduino can be used like any other AVR development board out there in addition to its standard which is to say its unstandard (AVR) configuration - no workarounds, restrictions etc...

:smiley:

I do not understand what your second posting has to do with your first one.... Was my thorough answer in vain (well, not in general of course, but for you, specifically)?

Just read this:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281448690

Hoping that the Arduino can be used like any other AVR development board out there in addition to its standard which is to say its unstandard (AVR) configuration - no workarounds, restrictions etc...

There is nothing 'restrictive' or unique to a standard Arduino board, and you are free to use it in any programming environment that supports the various AVR processor chips that the various Arduino/Arduino clone boards use. The boards come with either 8 or 16mhz crytals installed, but you are free to change them if desired, or by proper changes to the internal AVR fuses, utilize the AVR internal clock options.

The Arduino platform assumes that the board's chip has a Arduino bootloader program installed in the AVR chip, but you are free to erase that and either install a different platforms bootloader program or not use a bootloader at all but rather a hardware programmer using the ISP connector.

So in summery, the Arduino hardware is pretty much a general purpose AVR development board that can be use with other then the Arduino IDE platform. Nothing on the boards would make it impossible to utilize other AVR platforms. Of course the devil is in the details, so if you could be more specific in what software platform you would like the board to 'talk' to, more details could be explained.

Lefty

DeSilva:

Hello,

Sorry - I think we had crossed wires there - I was just reiterating what I had said above, meanwhile unaware of your reply ...

Right, so from what I understand (which is not much yet, hence wanting to learn how to do things the 'normal' AVR way) - yes, what I want can be done without to too much, if any hassle... I just need to learn a little about the things you mention.

Senso:

Great + thanks - I'll have a read

Lefty:

I can't be more specific as I'm just beginning - I don't even know what I don't know...

I have played around with the OOPic - probably will use the Arduino purely as most other users do but would like to be able to use the AVR on it eventually in a more, I guess standard manner - so I can talk to the 'other guys' (non arty/physical computing types) without the quizzical stares when I mention 'Arduino'

@1:1: Arduino is just a bundle of an AVR prototyping board with a somewhat standardized pin layout, a processor with a preflashed bootloader and an IDE.

You can do all of the following:

  1. Use the Arduino IDE to develop for other boards (as long as the processor is supported).
  2. Use the Arduino IDE to flash targets WITHOUT bootloader using an ISP. Especially you can throw out the bootloader once you have an ISP
  3. Use the Arduino IDE to flash "naked" AVRs (if you have an ISP).
  4. Use the commandline to flash Arduino boards

The main point of Arduino is that it comes with a toolchain that works mostly out of the box.

I prefer to use the command line, Kate and an AVRispmkII. This implies that I can work with any kind of AVR target :slight_smile:
I will only use the IDE if I need some very quick very simple thing that is already available as an example sketch. Otherwise I stick to the commandline.

So once you break out of the Arduino box the money for the boards is not wasted. They are still AVR protoboards.

Having said that: I prefer the boarduino.

Udo

Right, ok - ready to buy one then - one last question:

The 'pre-flashed' bootloader - is this wiped when I work out of another IDE ? :-?

If so, is it flashed (loaded?) again easily ?

That depends on the way this "other" IDE handles the flashing.

  • If it uses avrdude and the Arduino bootloader, there will be no difference
  • If it (you!) uses an external ISP programmer then the flash will be erased first including the bootloader. But using this very ISP programmer you can flash the bootloader again. This isan option from the Arduino IDE.

Maybe you might want to re-read my posting #2 above?

@1:1 the only way to overwrite the bootloader is by means of a "real" programmer. Typically an ISP. If you own such an item, then you do not need a bootloader anymore. Of course you can use it to flash the bootloader back again. However this is somewhat pointless unless you want to provide "field updatable" devices.

Udo

Ok - I've had a look at the AVRISP mkII ... Seems like an ok deal

Any hints re. it working on some flavour of Linux running AVRStudio (Wine) on a MacBook Pro ?

Kind Regards :wink:

I have no experience with Wine. I use Ubuntu + VMWare in the very rare cases that I need to go to AVRStudio. Avrdude is fine most of the time.

Udo