Académique Documents
Professionnel Documents
Culture Documents
EVENTS
BLOG
TUTORIALS
TEAM
ABOUT US
ALUMNI
AVR Basics
AVR Basics
In autonomous robotics, the robot interacts with the
environment autonomously. Hence, it must have certain control
system which governs its movement. It requires a brain which
receives the external signals, interprets it and performs an
action accordingly.
Pin configuration
First of all, note that the ATMEGA16 and ATMEGA32 MCUs are
completely similar, except the fact that their memory features
are different. ATMEGA16 has 16KB Flash, 1KB RAM and 512B
EEPROM whereas ATMEGA32 has 32KB Flash, 2KB RAM and
1KB EEPROM.
Vcc and Gnd, as you might clearly understand are the pins for
the power supply of uC. ATmega16/32 works at 5V. Exceeding
this voltage at power supply might result in burning of the IC.
The Reset (bar) pin, as the name suggests is to reset the uC.
However, its an active low pin, i.e. It gets activated when you
give it a low signal.
Peripherals
Registers
Register is a small amount of storage available as part of a CPU
or other digital processor. Such registers are (typically)
addressed by mechanisms other than main memory and can be
All the calculations in the uC are also done using 8-bit registers.
Fuse Bits
The AVR microcontroller (ATmega16) consists of sixteen fuse
bits which are classified as low fuse and high fuse. These Fuse
bits can be configured to select the microcontroller clock
options or to control some in-built peripherals like JTAG, SPI etc.
Once you set the appropriate fuse bits, you need not set it every
time you program the uC until you want to use it under different
configuration.
Fuse Bit
OCDEN
JTAGEN
SPIEN
CKOPT
EESAVE
BOOTSZ1
BOOTSZ0
BOOTRST
Bit No.
Default
values
Fuse Bit
BODLEVEL
BODEN
SUT1
SUT0
CKSEL3
CKSEL2
CKSEL1
CKSEL0
Bit No.
Default values
The CKSEL bits stand for Clock selection. It is via these bits
that uC determine which clock has to be used. (1111-1010 for
external crystal)
SUT bits determine the Start Up Time. (We usually prefer the
longest start time(11) to ensure everything settles down by
then.)
JTAGEN, SPIEN are the ones which configure the JTAG, SPI
peripherals. (JTAG disabled when 1)
Prerequisites
Now that we have some basic knowledge about uC, lets learn
how to work with it.
Before you start working with AVR, basic thing you need to know
is how to program the chip and writing programmes for the chip.
AVR microcontrollers are programmable in C language.
Softwares Required:
1.
Software in which you can write the code for your uC.
2.
Hardware Required:
1.
Microcontroller
2.
Programmer
3.
Datasheet
If you want to know anything and everything about the uC youre
using, refer to its datasheet. The datasheet contains all you
want to know about bit settings, its actual working, its behavior,
tolerance etc.
Links
Robotix App
Events
Tutorials
Contacts
Contact Us
Archive
Robotix 2016