Which language do you recommend for programming AVR microcontrollers? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Which language do you recommend for programming AVR microcontrollers?

Should I learn for example asm?

14th May 2018, 6:38 PM
Arc
Arc - avatar
5 Answers
+ 2
I think I will start with C, because actually I wanted to program ATmegas. But I will take a look at assembly as well. Thanks for all answers😁
15th May 2018, 5:23 AM
Arc
Arc - avatar
+ 1
I can Recomment C (Maby C++) because it is Very hardware near. Or if you want the best performence Assembly.
14th May 2018, 7:27 PM
XiLef
0
I've done a few things using the Arduino and got 3 Uno (Atmega328P) and 1 Mega2560 (Atmega2560-16AU) boards. I like them👍☺ Now I wanted to start programming AVRs without using a board, via external programmer...
15th May 2018, 12:03 PM
Arc
Arc - avatar
0
I am trying to program an APM 2.6 (autopilot mega) using Code:Blocks with the AVR plugins. I have no idea what I am doing...autopilot mega is part of the Arduino family and C++ / C is used to program https://create.arduino.cc/ I feel - I will learn to program C or C++ better if I can get one of the LEDS to blink on the APM (Atmeg256) ultimately if you can program in binary you are closest to the machine but no sane person does this these days. Assembly is one step away from binary and a not much easier to use, next up the ladder could be C with its human-readable interface, and it would appear things get easier again with C++ but the further away from binary you go the further away from understanding what your program is doing electronically. I am happy to share my experiences as I learn to program microcontrollers using C++ / C / Assembly, but it will be the blind leading the blind. Step 1 is to get a led to blink on an Arduino lilypad (Atmeg)
17th May 2018, 2:19 PM
Trevor Seaman
Trevor Seaman - avatar
0
My Lilly pad died I managed to break off the usb connector, I could hard wire a USB cable directly to the board, but can't find much data on this particular board. (Duinotech Lilypad Board https://www.jaycar.com.au/arduino-compatible-duinotech-lilypad-board/p/XC4620 ) It is not hard to get the device to flash its built-in LED. I tried to dig a bit deeper into the chip by using pointers (I'm still learning about them.) The task was to read the value of the port register as it goes high/low of the ATMega 32U4's built-in LED, but the Arduino web editor does not seem to work with them (* &) or I am just using them the wrong way. It does not help if you destroy the USB connector. I was using the serial monitor to view the inside of the chip. Going to break open my quadcopter and pull out the AutoPilotMega which is a basically an ATmeg256 with heaps of cool sensors connected to it, it will be a shame to delete the autopilot program and replace it with BLINK, but in the name of discovery and learning... Hopefully I will be able to re-load the autopilot program back on to the APM. Yes that is supposed to be ArduPilotMega not AutoPilotMega.
26th May 2018, 2:48 PM
Trevor Seaman
Trevor Seaman - avatar