Using ATMEGA chips with Arduino code

Hello;

Does anyone know of any way to program Atmel ATMEGA chips like the ATMEGA1284 using Arduino software? The libraries for the Arduino are readily available and easy to use, while I am struggling with the complexity of Studio 6. Is there a simple way to convert the libraries? I have done a ton of research and can't seem to find a viable resource. I am trying to use the AVR chips to control equipment like a PLC. The Arduino Mega is a good product, but difficult to incorporate into circuit boards and final products. I know you can program the mega1280 chip, but the price point is high compared to other Atmel chips. Any help would be greatly appreciated.

Search for "Bobuino" and "MIGHTY-1284P".

Does anyone know of any way to program Atmel ATMEGA chips like the ATMEGA1284 using Arduino software?

Any of the chips listed here: http://nongnu.org/avr-libc/user-manual/ Could be programmed in the Arduino GUI environment... What is needed is for someone to compose a set of core files (sometimes called platform files) for the specific chip. The ATmega1284P has a set of core files available. Example: https://github.com/maniacbug/mighty-1284p There may be other ports available.

Behind the Arduino GUI is the avr-gcc compiler and a toolset of utilities such as AVRDUDE. The GUI's job us to mask complexity from the user-programmer. But you should be aware of some inherent inefficiencies with the standard Adruino approach which can be partially elimited: https://code.google.com/p/arduino-lite/ Also refer to: http://arduino.cc/en/Reference/PortManipulation and http://www.billporter.info/2010/08/18/ready-set-oscillate-the-fastest-way-to-change-arduino-pins/

Ray

mrburnette: https://code.google.com/p/arduino-lite/

Ray,

That arduino-lite alternative core looks very interesting, a good tool to have in the toolbox if you are running low on flash for a project, perhaps. I hadn't heard of it before, so I just had a quick look. (I actually found this thread because I was looking for info of what the state of the art is for atmega644/1284/2564 support.)

Have you much experience with it? What are the main things that have been left out (if any) to make it "lite"?

I notice it hasn't been updated since 2011, so I don't know how up-to-date it would be working with the latest IDE distributions.

I'll certainly get around to installing and giving it a try, but if you have some experience using it already already, any comments appreciated.

@pico:

I had made a note of Arduino-lite while researching alternatives for flash usage in the challenged attiny AVR series, specifically the tiny85. I have not actually compiled with the library (yet) however. The library is primarily for use outside the Arduino GUI, SO users must be proficient at the command line.

If the library performs as stated, the additional command-line effort will be rewarded with a significantly faster and smaller code. The downsides are most 3rd party libraries will be unavailable without changes and variables for pin-parameters are not allowed.

Added:
Much of the speed can probably already be achieved with digitalWriteFast, digitalReadFast, pinModeFast etc.
http://forum.arduino.cc/index.php/topic,46896.0.html

Ray

mrburnette: @pico:

I had made a note of Arduino-lite while researching alternatives for flash usage in the challenged attiny AVR series, specifically the tiny85. I have not actually compiled with the library (yet) however. The library is primarily for use outside the Arduino GUI, SO users must be proficient at the command line.

If the library performs as stated, the additional command-line effort will be rewarded with a significantly faster and smaller code. The downsides are most 3rd party libraries will be unavailable without changes and variables for pin-parameters are not allowed.

OK, thanks for the heads-up. The smaller code size does sound useful, particularly for the smaller devices.

mrburnette: Added: Much of the speed can probably already be achieved with digitalWriteFast, digitalReadFast, pinModeFast etc. http://forum.arduino.cc/index.php/topic,46896.0.html

Yes, I know of those libraries, but they don't get the code size reduction, which is primarily what caught my eye. That, and support for the 644/1284 etc devices (and full range of clock speeds, 1MHz-20MHz. Cool!) Sounds interesting. I'll definitely have a play at some stage. It would be interesting to find out what libraries will work as-is and which ones would need to be modified (if they could be made to work at all).

But of course, when programming smaller devices the number of libs you use is usually pretty limited anyway.