ASK AN EDUCATOR! – “What is the best path if you want to progress from Arduino to bare AVRs? “

David asks:

What is the best path if you want to progress from Arduino to bare AVRs? There seems to be a range of toolchains of varying currency around so google requires a lot of digging to find if what you have is actually current. Ditto some ICSPs seem to have no windows 7 support which can be a trap if that’s your OS of choice. Another way to word the question would be ‘what is the easiest way to work with AVRs while still being able to use things like the internal oscilator and timer interupts’?

Well David, the results are in and it looks like the transition shouldn’t be too hard. It looks like AVR Studio is the way to go as far as IDE and offers debugging. You will need an AVR Dragon or the monster SKT500 for programming. As tz commented:

The AVR “Dragon” available from Digikey and other places works with the AVR studio environment as well as with avrdude (the programmer under Arduino). It can do ISP, JTAG, dW, serial or parallel high-voltage programming, I use jumpers and have added a ZIF socket

tz also wisely mentioned that because Arduino is compiled with gcc:

Any Arduino (or compatible – with the right chip and bootloader) can run pure embedded by replacing main() with init(). I just did that for my radar detector interface. You need a trivial sketch (which is never executed), but “init” is called as the first thing from the Arduino environment’s “main()”, so if you just don’t return, you can set all the registers as if you were doing a makefile and C programs. There are a few gotchas and I may not have found all cases (mainly I needed to declare things volatile if the interrupt would modify them and the main routine would read them – this is technically correct but I didn’t have to do it with the command-line direct install tools).

Bruce also nicely pointed you should take your question:

…over to avrfreaks.net. There are several very helpful and very knowledgeable AVR developers over there who could help you with this, and you’ll want to get familiar with those forums anyway as you get deeper into the mysteries of your future AVR projects. Browse the FAQs in the forum for a while and if you don’t feel like your question was fully answered, introduce yourself and ask away. Here’s a good jumping off point, I think.

Lianna has also given a quick tutorial in the 3rd comment for using an Arduino for programming non-bootloaded AVRs. This doesn’t give you the debugging capability of AVR Studio, but does offer an alternative to programming the base set of Arduino ICs.

Thanks again everyone for your feedback and wisdom, and I hope this has helped to answer your question! If anyone else has something to add feel free to leave a comment!

Don’t forget, everyone is invited to ask a question!

Click here!

“Ask an Educator” questions are answered by Adam Kemp, a high school teacher who has been teaching courses in Energy Systems, Systems Engineering, Robotics and Prototyping since 2005.

Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

Maker Business — Fewer startups, and other collateral damage from the 2018 tariffs

Wearables — Battery wash cycle

Electronics — How to make your own magnetic field probe!

Biohacking — The State of DNA Analysis in Three Mindmaps

Python for Microcontrollers — One year of CircuitPython weeklies!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !

1 Comment

  1. Hi all, and thanks for all the responses. Thought there had to be directions from classic Arduino that didn’t involve command lines straight up, and now I’ve got several.

    Again, thanks.


Sorry, the comment form is closed at this time.