Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontrollers - basic architecture and programming questions

Status
Not open for further replies.

mondo90

Junior Member level 1
Joined
Oct 26, 2014
Messages
19
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
151
Hello, I have quite big knowledge and expierence of programming desktop apps, server scripts etc... but now I want to start programming microcontrollers like "Atmega8A". I have some difficulties understand how it is actually programmed. Can you elaborate a little bit or even better, recommend a good book on subject how micocontrollers are architectured and programmed.

Below my issues:
1. I don't understand the mechanism of programmer device i.e "USBasp", how it programs the MIC ?
2. Why do we need such big software like Atmel studio, why don't just compile my program (using GCC or whatever) and flash it to MIC ?
3. I donwloaded Atmel studio, and as it turns out it isn't compatibile with my USBasp programmer, so I read about plugin called "avrdude", what is it and why the whole process of comunication with microcontroller is so complicated and weird.


Regards.
 


Hi,

As Nagkiler says Adruino is a good way to start.

You can buy the genuine Arduino boards or ebay clones for very little and they do not need a separate programmer as its all bootloaded.

Arduino has it own very simple IDE and when you want to actually program a separate chip for your own circuit you can run an USBASP type programmer using a programs like ProgIsp - see pics below


When you advance and want to use some of the features of program like Studio 6 with Arduino then use this Adruino plug in https://www.visualmicro.com/

Not something I have yet tried but seems you can run a USBISP from Studio 6, heres just one of several such links out there https://shannonstrutz.com/?p=629



I
 

Attachments

  • 000189.jpg
    000189.jpg
    62.5 KB · Views: 93
  • 000190.jpg
    000190.jpg
    66.9 KB · Views: 101
Thanks for answer guys, but I am not going to buy and play with arduino or any other higher level board. I have atmega8 + USBasp programmer, and with this stuff I want to understand the whole process of programming microcontroller.
My first question from first post haven't been answered yet, can somebody explain how the binary is send to microcontroller via programmer within these 4/5 pins connected ? How these data is saved ?

Regards.
 

By ISP!!!

see "hXXp://VVV.atmel.com/images/doc0943.pdf"

The c file is compiled as .HEX file... this file is the binary for your target!!!

You need the GUI to program a .hex file... (hXXp://VVV.fischl.de/usbasp/) like a "eXtreme Burner - AVR"...
 

Thanks for answer guys, but I am not going to buy and play with arduino or any other higher level board. I have atmega8 + USBasp programmer, and with this stuff I want to understand the whole process of programming microcontroller.
My first question from first post haven't been answered yet, can somebody explain how the binary is send to microcontroller via programmer within these 4/5 pins connected ? How these data is saved ?

Regards.


Hi,

Yes we understand what you are saying about learning things in detail.

The process of sending your complied code out to the flash memory of the Amega8 chip is done in a serial mode.
However it is quiet complex and to be honest serves little in your wider understanding of a micro.

Although the principle of programming flash memory is basically the same, the exact detail can vary from chip to chip and maker to maker.

If you search for the Amega8 datasheets I expect you will find one on its programming specifications; though it doubtless will make heavy reading.


The reason for suggesting a ready made dev board like the Arduino Uno is that they are very cheap and importantly , complete ready to use solutions.

They allow you to get started straight away with good examples and tutorials so you can soon start writing your own code which in turns allows you to learn about the fuller features of the Megas.

If that is still not what you want to do, then I suggest you start programming using Assembly, the most basic language you can use, next to machine code.
This really gets you using all the micros registers in bit and byte detail.

Thats just my view, sure other will come in and give theirs ...
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top