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.


Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in! adafruit.com/mastodon

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

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

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

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

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.

    David

Sorry, the comment form is closed at this time.