Go Down

Topic: i want to learn how to program a microcontroller... (Read 2818 times) previous topic - next topic



It depends on how much C you know. I've been making everything I do in Arduino in parallel in straight AVR C. On Linux there is avr-gcc. OS X has CrossPack which is based off of Windows WinAVR.

CrossPack makes it really easy to create a new template with full 'make' and 'make install'. Which uses avr-gcc and avrdude. Everything you do here you can upload right now to your Arduino board.

Take a look at some of my very simple blinking code: https://github.com/jedediahfrey/Arduino/blob/master/C/simpleBlink/main.c
Be warned this isn't as simple as Arduino. You need to sleep with the AVR datasheet for your chip and keep in mind that AVR and Arduino pins do not match. This is the 2560 correlation: http://arduino.cc/en/Hacking/PinMapping2560 You also have to be very up on your C and binary logic.


this is the microcontrollers section for "Standalone or alternative microcontrollers"

Doesnt that mean microcontrollers other than arduino?

Arduino is not a microcontroller.  Arduino is an environment and some libraries that run on several different microcontrollers (Mostly Atmel AVRs, but also some ARM an PIC32 chips.  Except that they can't call themselves "Arduino."  This forum is more about getting the Arduino environment to work for "other" microcontrollers than for helping existing Arduino users graduate beyond the Arduino environment...

You also overestimate the differences between the Arduino environment and "AVR programming."  Arduino uses the same C/C++ compiler shipped with (for example) Atmel's AVRStudio, and you can write "real" AVR programs by simply ignoring the Arduino functions and doing things the hard way.  Your choice whether you also want to avoid the standard C libraries and/or the C language itself.

Avrfreaks (as previously mentioned) has many tutorials http://smileymicros.com has some tutorials and books and things for AVRs, including some that specifically try to bridge the gap between Arduino and "real microcontroller programming."

Also, see this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257722764

Go Up