ATMega16 Programming!!

Thread Starter

zaman999

Joined Jan 29, 2011
26
Hi everyone!!
I'm trying to make a line follower circuit using a microcontroller(ATMega16) but since this is the first time i'm using a microcontroller..i need little help with the basics..
I learnt that a microcontroller has to be programmed before using in the circuit by means of a programmer using PC,also i went through diff microcontrollers like PIC,ATMega 16,ATMega 32 etc..
but what i didnt understand is how exactly we program these microcontrollers?? and what is the purpose of a "microcontroller development board"??
I'm totally new to microcontrollers so any help would be appreciated!!
 

debjit625

Joined Apr 17, 2010
790
A microcontroller(mcu) executes code,you write this code in an application software (programming language) like assembly,C,Basic...etc.When your code is ready normally your code will be assembled or compiled into a hex file,you burn or download this file into your mcu.

To burn the hex file(your program)into your mcu you will need two stuff.1) An application software ,its not the application software where you wrote your mcu's program and 2) A programmer,its a hardware like printer,mouse.etc which you connect to PC and insert your mcu which to be programmed.You load your hex file into the application software then you connect your programmer to PC and insert your mcu into the programmer and burn the hex file.

Now a development board is where your test the mcu i.e.. after programming does it works properly or not,a development board will have all sort of external modules that could be attached with the mcu,like LEDs,LCD,Switch and etc.

Good Luck
 

Thread Starter

zaman999

Joined Jan 29, 2011
26
Thanks a lot..that was helpful..
Which mcu would u suggest a beginner to start with-the PIC or which of atmega series??
 

debjit625

Joined Apr 17, 2010
790
I started with PIC16F84A ,you will find a lot of help over web and easy to understand as it doesn't contain many features, its a 8 bit mcu from Microchip. Their are some other 8 bit mcu with more features like PIC16F877A,PIC18F4520.Now comes Atmel's products they are the cheapest (these days Texas are also providing cheap mcu "MSP" range) like AT89S52 cost around INR 40.00 with a lots of feature.

Personally I prefer Microchip's products, but that depends on my applications you should check them your self before making any judgments.

About ATmega,I think when you are starting with Atmel's products start with AT89 series as they belongs to 8051 architecture and you will get a lots of help over internet.

Good Luck
 

nikwal

Joined Jan 21, 2011
3
If you are going to use avr then the simplest imho way it to buy a cheap programmer for usb somewhere and make sure it works with avrprog1.4 since thnat program is way easy to undersand the fusing bits and all that.. you dont want to be messing around with avrdude if you're a beginner.

NOW the cheaper way is to build the programmer that uses paralell port described on the ponyprog page, (and then build your own usb programmer using that), but I would'nt really recommend it. plus that program is a bit harder to undersand the fusing bits.

For avr there are several options in language, but the two I use is bascom avr or codevision avr , depending on what I need to do.. for a C compiler, codevision is quite easy to get started with imho.. same goes for bascom.
There are free compilers, I've used them but not so much that I can comment on them..
 

nikwal

Joined Jan 21, 2011
3
edit button does'nt work....

You don't really need a development board, just hook up the power, a few pullups(resetpin),oscillator(maybe) and isp connector, then youre good to go..
 
hey.. i was also searching the same thing... we were trying to make a line tracer at our college for robowars.. i dont know anything about this microcontroller.. but i was searching the details of atmega 16 and atmega 32.. plz inform me also if you get anything..
 
hi debjit can you explain the same thing you explained to zaman in simple words.. am not dat much familiar with all these things.. but i need help in the same topic
 
Top