EMBEDDED AVR FAMILY
Basically, it is an 8-bit Reduced instruction set computer microcontroller device manufactured by the company ATMEL.
This peculiar architecture was proposed by two Norwegian students and was again remodified at ATMEL Norway.
ATMEL Norway was like the subsidiary of ATMEL manufactured by two intelligent architects.
The Architecture of devices employed into these devices employed a re-modified Harvard architecture.
- The internal memory was utilized for program data and program instructions.
- External memory was completely left free.
- Quicker access and enhanced capacity were achieved by employing separate buses for data and program instructions.
- Each memory was located on a single chip on the CPU core cut each Memory is separated from each other.
- E.g.Address 0 contained within program memory is unique from the address 0 within data memory.
TYPES OF AVR FAMILIES:-
- AVR classic
- Tiny AVR
- Mega AVR
1.GPIO(General purpose Input Output Registers):
Each port has specifically three registers:-
- The Reset pin within the AVR family is mainly active low pin which resets the computing processor and all of it’s related peripherals.
- AVR’S also comprises of a watchdog timer that resets the CPU itself after count finish(0 to FF(255)).
USES OF RESET PIN:
- Debugging General Purpose Input Output Registers
- In system serial Programming.
- This architecture of AVR’S can support multiple interrupts
- Some signal filtering or debounce logic must be applied as button bounce issues can arise at any time.
- Many of the modern AVR’S have a dedicated interrupt pin INT0.
- The older versions could produce an interrupt on a low, high or falling edge of any signal.
- Each specific interrupt creates a jump or transition with In memory address.
- They have at least ONE 8-BIT COUNTER known as timer
- In normal mode, the counter counts from zero to FF(Rollover) and sets the flag bit(TF0)
- The CTOC(Clean Timer on Compare mode ):- Allows timer to be cleared when matching a corresponding value in the register before the timer proceeds to the highest value and overflows.
- It is non- volatile in nature(non-erasable).
- They can be re-written with a minimum number of 100,000 times.
- Each Electronic Erasable Programmable read-only memory is FF16.
- Most of the AVR’S have encountered an error while writing data to address 0 so ATMEL suggested avoiding that address, especially during unintentional power outage conditions.
- The Fuse is essentially an EEPROM bit that has various pins assigned and certain low-level functions.
- They contain features before the chip can come out of the RESET stage and start computing instructions.
- Usually, these fuse settings are used:-
- Crystal Oscillator strength
- JTAG pins
- Reset pin
- Brownout voltage-trigger points and Brown out detect enable
TYPES OF PROGRAMMING INTERFACES:
1.) IN SYSTEM PROGRAMMING:
It is done with the aid of Serial Peripheral Interface.
2.) HIGH VOLTAGE SERIAL PROGRAMMING:
Mostly the backup mode on smaller AVR’s
3.) HIGH VOLTAGE PARALLEL PROGRAMMING:
Backup mode on larger AVR’S.
4.) BOOTLOADER SECTION:
A vast majority of the ATMEL chips have a separate bootloader memory region. Here the reprogrammed code resides.
At power on, the bootloader runs- first and takes the decision whether to boot the main program or to initiate reprogramming code.
Various types of memories in AVR microcontrollers:
- Electronic Erasable Programmable read-only memory(EEPROM)
- Fuse Bits
- Flash Memory
- Data memory comprising:-
- Input/Output Registers
The application of software can be an effective means of assistance before implementing the actual physical hardware design.
Debugging interface is absent.
The software packages that provide the property for simulation are:-
- VM lab
ATMEL Studio makes use of assembly level language to manipulate the internal registers within the AVR core.
HAP sim: A collection of virtual devices that connect to AVR studio
TYPES OF COMMUNICATION:
- They support a wide range of serial communication protocols such as:-
1.Universal Asynchronous Receiver Transmitter
a.)Universal:-Utilized in different serial communication devices.
b.)Synchronous:- In the same clock cycle serial communication is done.
c.)Asynchronous:- Transfer takes place without clock signal but becomes same on the data signal.
d.)Receiver:- AVR gets data through hardware
e.)Transmitter:- Hardware will transfer serial data.
SPI(Serial Peripheral interface):-
It comprises the master to slave serial protocol having a clock input(synchronous).
The three main components are:-
- Master in Slave out
- Master out slave in
- Serial clock
Since the transfer of serial data takes place forth and back SPI interface is known as a bidirectional shift register.
The master can only assign as many as slaves as the number of extra output pins provides, it cannot simply exceed. This is achieved by utilizing a different decoder.
RS-232 ( UART protocol ):-
- This particular specification calls for a negative voltage.
- This type of communication permit voltages from +3v to +15v and -3V to -15V.
- It has a comparatively shorter transmission cable length.
- RS-482 enables long distance
- Speeds include 20 Kbps for every 15 meters(50 feet)
TWO WIRE INTERFACE:
- This is known as I2C
- Comprises of two main wires for communication namely:-
- Serial Clock(SCA)
- Serial data(SDA)
- It uses a common ground for connection in a way that all the existing devices must be at equal ground potential to avoid ground loops.
- E.g The AVR’S Two-wire interface can behave either as slave or master and transmit data at 400 kbits/s.
- An example of parallel communication is the transfer of data within USB connected from printer to computer.(6 m distance)
- In addition to the existing peripherals(UART, ADC, SPI) AVR’S also incorporates the following hardware components:-
- For E.g in the AVR Butterfly, an LCD is integrated.
- The module performs exact timing to display pixels forward and backward at the same rate.
- AT90USB series employ various USB functions such as:-
(I) On the GO
(II) USB host(interfacing with slave)
(III) USB slave
2. If no internal USB is there then an external USB can be interfaced
3.FOr little functionality and lower speeds, the only firmware is needed.
- The modern AVR models comprise a temperature sensor module hooked with the ADC(Analog Digital Converter)
PROTOCOL ISSUES AND REQUIREMENTS:-
- These three above mentioned protocols( I2C, RS232, SPI) are only defined by the number of bits or bytes transferred.
- They point to the physical layer of the Operating System.
- The SPI in case of power failures it should be able to recover data and must employ a wide range of functions.
- The protocol must be able to resynchronize the transmitter and receiver in case of power outages so the beys of data transferred are not lost.
1.) Join test action group(JTAG):
It gives access to an on-chip property of debugging.
Various types of JTAG are:-
- AVR Dragon
- JTAGICE mkll
- JTAGICE adapter
Was unable to deliver the four secondary pins responsible for debugging(JTAG).
If the firmware is absent then there is not much a microcontroller can do.
A number of languages can be used for coding purposes namely:-
- 3 AVR assembly language