Tuesday, 10 July 2012

Embedded System ( AVR microcontroller by ATMEL)


What is Embedded System?

My dear Friends
Here you are going to learn some basic concepts of Robotics.Before we start you need to know about 'Embedded System'.So what is 'Embedded System'?.......
In short, you can learn that 'Embedded System' is the interaction of Software and Hardware.Well hearing this definition of 'Embedded System' , a question often rises in the mind..... What is basic difference between a microprocessor and a microcontroller?........
Difference between a microprocessor and a microcontroller is defined on the basis of an IC. Microprocessor is an IC which has only CPU.It has no physical memory(RAM,ROM etc.) and no peripheral devices to interact with CPU directly.while a microcontroller is an IC which has its central processing unit,Physical memory,input-output ports and other peripheral devices.



                      EMBEDDED SYSTEM= SOFTWARE + HARDWARE

SOFTWARE -

What is Software?

Microcontrollers have a big family.With the development in the field of microcontrollers,we have always tried to explore a better programming language which has good interaction with hardware.A better programming language always takes lesser time and executes very easily and in lesser time.
What are the reasons behind choosing C as programming language in microcontroller.

As a basic microcontroller 8051 is always chosen as a hardware interacted with assembly programming language.But assembly language is a low level language.So the .hex file obtained after the execution of programmed code takes much space because a program written in low level language is always complicated as compared to that program written in high level language.So devices based on low level programming are not in vogue.

It is always tried to reduce Human efforts.Why to much programming to perform a task ?

In terms of Software , you should have a little knowledge of any programming language like - Basics of C,java or any other programming language.


Machine neither understand a High level language nor a Low Level Language.The only language is 'Machine Language' which is taken by Hardware of any device.
Machine language is not a specific code.It is any thing in the form of zeros & ones(like 11100011010 is a machine code).So if we have a source code written in C(.c file) then it is needed to convert this file in machine language.
We know how to convert a source code(.c file) into machine code( binary file OR .hex file ).The software used in this process is compiler.Compiler is a sophisticated set of instructions.Compiler is used to perform this operation.

Well, compiler used for this operation is AVR-gcc compiler.AVR-GCC compiler is used to convert the Source code into machine code.

AVRDUDE is an utility to download/upload manipulate ROM & EE-PROM contents of microcontroller.
  • Install WINAVR and JAVA Runtime Environment.
  • Eclipse : You need to download Eclipse and install it.Run the software and to switch the workspace go to "menu bar >>File >>Switch Workspace >> Other " and select your workspace.
HARDWARE -

What is Hardware?

In terms of Hardware , you are needed a microcontroller(ATMega-16 mainly ).It is used as the main working hardware(whole discussion is based on the working model of ATMega-16).Required Hardware components are listed below -
  • ATMega-16
  • USBTINY
  • DB-9 male connector
  • DB-9 female connector
Direction of connection will be discussed later.


© All rights reserved.Mohit Kumar Patel Blog