Arduino Forum

Using Arduino => Microcontrollers => Topic started by: ccdjr106 on Dec 22, 2011, 10:44 pm

Title: i want to learn how to program a microcontroller...
Post by: ccdjr106 on Dec 22, 2011, 10:44 pm
So im sure we all know how to use a arduino. Its so easy, the arduino enviroment does everything for you! I want to learn how to use a avr or pic.  For testing purposes im planning on using it to control relays which will control christmas lights. Can someone point me in the right direction(some tutorials or something) and should i start with a pic or avr? my main concern is the software because i have a mac and no access to windows.  The only microcontrollers that ive used are arduino and picaxe.

Thanks :smiley-red:
Title: Re: i want to learn how to program a microcontroller...
Post by: AWOL on Dec 22, 2011, 10:59 pm
Have you had a look over at the Playground?
Title: Re: i want to learn how to program a microcontroller...
Post by: ccdjr106 on Dec 22, 2011, 11:00 pm
haha nope, ill go look
Title: Re: i want to learn how to program a microcontroller...
Post by: ccdjr106 on Dec 22, 2011, 11:01 pm
isnt the playground only about arduino?
Title: Re: i want to learn how to program a microcontroller...
Post by: AWOL on Dec 22, 2011, 11:03 pm
Yes, what do you expect on an Arduino forum?
Title: Re: i want to learn how to program a microcontroller...
Post by: retrolefty on Dec 22, 2011, 11:04 pm

Yes, what do you expect on an Arduino forum?


Cake and or pie.  ;)
Title: Re: i want to learn how to program a microcontroller...
Post by: ccdjr106 on Dec 22, 2011, 11:04 pm
well this is the microcontrollers section for "Standalone or alternative microcontrollers"

Doesnt that mean microcontrollers other than arduino?
Title: Re: i want to learn how to program a microcontroller...
Post by: jaredpi on Dec 22, 2011, 11:06 pm
Quote
(some tutorials or something)

http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm (http://www.mstracey.btinternet.co.uk/pictutorial/picmain.htm)
http://www.winpicprog.co.uk/pic_tutorial.htm (http://www.winpicprog.co.uk/pic_tutorial.htm)
http://www.pages.drexel.edu/~kws23/tutorials/PICTutorial/PICTutorial.html (http://www.pages.drexel.edu/~kws23/tutorials/PICTutorial/PICTutorial.html)
If you go to Google and type in PIC Tutorial you will get more results.
Quote
software because i have a mac and no access to windows

Not sure about the software though since I don't have (or use) a mac.
Hope this helps.  
Title: Re: i want to learn how to program a microcontroller...
Post by: AWOL on Dec 22, 2011, 11:07 pm
What did they say about the Arduino over at the PIC forum?
Title: Re: i want to learn how to program a microcontroller...
Post by: ccdjr106 on Dec 22, 2011, 11:09 pm
im not sure, i never thought they had a pic forum, does microchip have a forum?
Title: Re: i want to learn how to program a microcontroller...
Post by: AWOL on Dec 22, 2011, 11:12 pm
Imagine walking into a Ford dealership, and asking about a GM vehicle.
Title: Re: i want to learn how to program a microcontroller...
Post by: JChristensen on Dec 22, 2011, 11:49 pm

So im sure we all know how to use a arduino. Its so easy, the arduino enviroment does everything for you! I want to learn how to use a avr or pic.  For testing purposes im planning on using it to control relays which will control christmas lights. Can someone point me in the right direction(some tutorials or something) and should i start with a pic or avr? my main concern is the software because i have a mac and no access to windows.  The only microcontrollers that ive used are arduino and picaxe.

Thanks :smiley-red:


Well, Arduino is built around an AVR, so you're already partway there. I got an ICSP programmer and downloaded WinAVR, that's one path you could go down. Or get AVR Studio from Atmel (no experience there, it's another one of those things I'm not getting around to). Also plan on spending considerable time reading the AVR datasheet(s). But that's half the fun!
Title: Re: i want to learn how to program a microcontroller...
Post by: Lurch on Dec 24, 2011, 08:28 pm
I mentioned another microcontroller once, think I got away with it.
Title: Re: i want to learn how to program a microcontroller...
Post by: retrolefty on Dec 24, 2011, 09:21 pm

im not sure, i never thought they had a pic forum, does microchip have a forum?


Of course they do:

http://www.microchip.com/forums/Default.aspx?
Title: Re: i want to learn how to program a microcontroller...
Post by: retrolefty on Dec 24, 2011, 09:22 pm

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

Doesnt that mean microcontrollers other than arduino?


Arduino doesn't make microcontroller chips, they just build on several of the Atmel AVR offerings.

Title: Re: i want to learn how to program a microcontroller...
Post by: darkscout on Dec 25, 2011, 04:01 am
http://www.avrfreaks.net/

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 (http://www.obdev.at/products/crosspack/index.html) 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.
Title: Re: i want to learn how to program a microcontroller...
Post by: westfw on Dec 25, 2011, 05:20 am
Quote
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