Esy MP

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

2022

ESY MICROPROJECT
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION
GOVERNMENT POLYTECHNIC, JALGAON
(0018)
Program Name and Code : Electronic and Telecommunications
Course Name and Code : Embedded Systems (22532)
Academic Year : 2022-23
Semester : 5th
A MICRO PROJECT
On
Build AVR Development Board

Submitted in 2022 by the group of 4 students

Sr. Roll Enrollment


Name of student Seat No.
No. No. No.
1 52 Durvesh Rajesh Pathak 2000180080
2 56 Rohan Subhash Lad 2000180093
3 55 Vinayak Santosh Sonawane 2000180088
4 53 Sagar Subhash Jayakar 2000180082

Project Guide

K.P AKOLE SIR


MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION
Certificate

This is to certify that Master /Ms. D.R.P, R.S.L, V.S.S, S.S.J.


Roll No. 52,56,55,53 of 5th Semester of Diploma in Electronics and Tele-communication
of Institute, Government Polytechnic, Jalgaon (Code:0018) has completed the Micro Project
satisfactorily in the Subject Embedded Systems for the Academic Year 2022-23 as prescribed in
the curriculum.

Place: - Jalgaon Enrollment No: 2000180080, 2000180093, 2000180088, and


2000180081.

Date: …………………….. Exam. Seat No:

Subject Teacher Head of the Department Principal

Seal of
Institution
INDEX

SR.N CONTENT PAGE NO.


O.

1.
Introduction

2.
Board Features

3.
Atmega328p Features

4.
Pin Configuration

5.
Pin Descriptions

6.
Block Diagram

7.
Circuit

8.
Pin Out

9.
Components Used

10.
Conclusion
INTRODUCTION

AVR Development Board is an exclusive general-purpose development board for the AVR family. The
intention of the design is to endorse the engineers and scholars to exercise and explore the capabilities of
AVR microcontrollers with many communication protocol ease. AVR 40 Pin development Board is ideal for
learning AVR microcontrollers. This board contains requirements like LEDs, Switches, in system
programming, RS232 communication, etc. All Ports of controller are accessible though standard 10 pin FRC
connector or simple header pins. Also 34*11 general purpose area of normal grid is provided for extra
development on the same board. This board supports many 40 pin controllers which have identical pin
configurations like AT90S8535, ATMega16, and ATMeg32 etc.

What is AVR microcontroller used for?

AVR microcontrollers find many applications as embedded systems. They are especially common in
hobbyist and educational embedded applications, popularized by their inclusion in many of the Arduino
line of open hardware development boards.

 Board Features

1. On Board Regulator with filters and operating voltage from 6V – 20 V


2. 8 LED’s on PORTB selectable though DIP switch
3. 5 Switches including reset
4. Power Indicator LED
5. Power on/off toggle switch
6. 16MHz crystal for maximum speed
7. AREF setting potentiometer
8. JTAG Debugger port (Optional JTAGICE module at discounted rates)
9. In system programming through External Programmer (Selectable – See options above)
10. USART connector for External RS-232 Link PC (Selectable – See options above)
11. 34*11 Standard general purpose area
12. 8 ADC/Standard servo compatible connectors
13. All ports accessible through standard 10 pin FRC connector and 10 pin male header (Including VCC
and GND)
14. All required connectors included.
Features
• High Performance, Low Power AVR® 8-Bit Microcontroller
• Advanced RISC Architecture
– 131 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20 MHz
– On-chip 2-cycle Multiplier
• High Endurance Non-volatile Memory Segments
– 4/8/16/32K Bytes of In-System Self-Programmable Flash progam memory
(ATmega48P/88P/168P/328P)
– 256/512/512/1K Bytes EEPROM (ATmega48P/88P/168P/328P)
8-bit
– 512/1K/1K/2K Bytes Internal SRAM (ATmega48P/88P/168P/328P)
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM Microcontroller
– Data retention: 20 years at 85°C/100 years at 25°C(1)
– Optional Boot Code Section with Independent Lock Bits with 4/8/16/32K
In-System Programming by On-chip Boot Program
True Read-While-Write Operation Bytes In-System
– Programming Lock for Software Security
• Peripheral Features Programmable
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
Flash
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF
package Temperature Measurement
ATmega48P/V
– 6-channel 10-bit ADC in PDIP Package
Temperature Measurement
ATmega88P/V
– Programmable Serial USART
– Master/Slave SPI Serial Interface ATmega168P/V
– Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator ATmega328P
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
• Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated Oscillator
Preliminary
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby,


and Extended Standby
I/O and Packages Summary
– 23 Programmable I/O Lines
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
• Operating Voltage:
– 1.8 - 5.5V for ATmega48P/88P/168PV
– 2.7 - 5.5V for ATmega48P/88P/168P
– 1.8 - 5.5V for ATmega328P
• Temperature Range:
– -40C to 85C
• Speed Grade:
– ATmega48P/88P/168PV: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V
– ATmega48P/88P/168P: 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
– ATmega328P: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
• Low Power Consumption at 1 MHz, 1.8V, 25C for ATmega48P/88P/168P:
– Active Mode: 0.3 mA
– Power-down Mode: 0.1 µA
Rev. 8025FS–AVR–08/08
– Power-save Mode: 0.8 µA (Including 32 kHz RTC)
ATmega48P/88P/168P/328P

1. Pin Configurations
Figure 1-1. Pinout ATmega48P/88P/168P/328P

TQFP Top View PDIP

(ADC5/SCL/PCINT13)
(ADC4/SDA/PCINT12)
PD2 (INT0/PCINT18) PD1

PC3 (ADC3/PCINT11)
(TXD/PCINT17) PD0
(RXD/PCINT16) PC6
(RESET/PCINT14)
PC5
PC4

(PCINT14/RESET) PC6 PC5 (ADC5/SCL/PCINT13)


1 28
(PCINT16/RXD) PD0 2 27 PC4 (ADC4/SDA/PCINT12) PC3
32
31

30

29

28

(PCINT19/OC2B/INT1) PD3 (PCINT17/TXD) PD1 (ADC3/PCINT11)


3 26
(PCINT20/XCK/T0) PD4 (PCINT18/INT0) PD2
1 24 PC1 (ADC1/PCINT9) 4 25
2 23 PC0 (ADC0/PCINT8) (PCINT19/OC2B/INT1) PD3 PC2 (ADC2/PCINT10) PC1
5 24
GND (PCINT20/XCK/T0) PD4 (ADC1/PCINT9) PC0
3 22 ADC7 6 23
VCC (ADC0/PCINT8) GND
4 21 7 22
GND VCC
5 20 GND 8 21
VCC GND (PCINT6/XTAL1/TOSC1) AREF
6 19 AREF 9 20
ADC6 PB6 (PCINT7/XTAL2/TOSC2) PB7 AVCC
7 18 10 19
(PCINT6/XTAL1/TOSC1) PB6 (PCINT21/OC0B/T1) PD5
8 17 AVCC 11 18
(PCINT7/XTAL2/TOSC2) PB7 (PCINT22/OC0A/AIN0) PD6 PB5 (SCK/PCINT5) PB4
12 17
PB5 (SCK/PCINT5) (PCINT23/AIN1) PD7 (MISO/PCINT4)
13 16
(PCINT0/CLKO/ICP1) PB0 14 15
10

11

12

13

PB3 (MOSI/OC2A/PCINT3) PB2


9

(SS/OC1B/PCINT2) PB1
(OC1A/PCINT1)
(PCINT23/AIN1) PD7
(PCINT21/OC0B/T1) PD5
(PCINT22/OC0A/AIN0) PD6

(PCINT0/CLKO/ICP1) PB0
(PCINT1/OC1A) PB1
(PCINT2/SS/OC1B) PB2
(PCINT3/OC2A/MOSI) PB3
(PCINT4/MISO) PB4

28 MLF Top View


32 MLF Top View
(ADC5/SCL/PCINT13)
(ADC4/SDA/PCINT12)
(ADC5/SCL/PCINT13)
(ADC4/SDA/PCINT12)

PD2 (INT0/PCINT18) PD1


PD2 (INT0/PCINT18) PD1

PC3 (ADC3/PCINT11)
(TXD/PCINT17) PD0
(RXD/PCINT16) PC6
PC3 (ADC3/PCINT11)
(TXD/PCINT17) PD0
(RXD/PCINT16) PC6

(RESET/PCINT14)
(RESET/PCINT14)

PC5
PC4
PC5
PC4

(PCINT7/XTAL2/TOSC2) PB7 6 18 GND

(PCINT19/OC2B/INT1) PD3 1 (PCINT21/OC0B/T1) PD5 7 17 AREF


21 PC2
(PCINT20/XCK/T0) PD4 2 (ADC2/PCINT10) 16 AVCC

VCC 3 20 PC1 15 PB5 (SCK/PCINT5)


(ADC1/PCINT9)
10

11
8
9

GND 4
19 PC0
(PCINT6/XTAL1/TOSC1) PB6 (ADC0/PCINT8)
5

2
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

32
31

30

29

28
24 PC1 (ADC1/PCINT9)

28
27

26

25
(PCINT19/OC2B/INT1) PD3 1 23 PC0 (ADC0/PCINT8)

(PCINT20/XCK/T0) PD4 2 22 ADC7

GND 3 21 GND

VCC 4 20 AREF

GND 5 19 ADC6

VCC 6 18 AVCC

(PCINT6/XTAL1/TOSC1) PB6 7 17 PB5 (SCK/PCINT5)

(PCINT7/XTAL2/TOSC2) PB7 8

10

11

12

13
9
(PCINT23/AIN1) PD7
(PCINT0/CLKO/ICP1) PB0
(PCINT1/OC1A) PB1
(PCINT2/SS/OC1B) PB2

(PCINT4/MISO) PB4
(PCINT22/OC0A/AIN0) PD6

NOTE: Bottom pad should be soldered to ground. (PCINT3/OC2A/MOSI) PB3

(PCINT23/AIN1) PD7
(PCINT21/OC0B/T1) PD5
(PCINT22/OC0A/AIN0) PD6

(PCINT0/CLKO/ICP1) PB0
(PCINT1/OC1A) PB1
(PCINT2/SS/OC1B) PB2
(PCINT3/OC2A/MOSI) PB3
(PCINT4/MISO) PB4
NOTE: Bottom pad should be soldered to ground.

3
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

1.1 Pin Descriptions

1.1.1 VCC
Digital supply voltage.

1.1.2 GND
Ground.

1.1.3 Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2


Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high
sink and source capability. As inputs, Port B pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscil- lator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is used as
TOSC2..1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
The various special features of Port B are elaborated in ”Alternate Functions of Port B”
on page 82 and ”System Clock and Clock Options” on page 26.

1.1.4 Port C (PC5:0)

Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The PC5..0 output buffers have symmetrical drive characteristics with both high
sink and source capability. As inputs, Port C pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port C pins are tri-stated when a
reset condition becomes active, even if the clock is not running.

1.1.5 PC6/RESET

If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical char- acteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on
this pin for longer than the minimum pulse length will generate a Reset, even if the
clock is not running. The minimum pulse length is given in Table 28-3 on page 320.
Shorter pulses are not guaran- teed to generate a Reset.
The various special features of Port C are elaborated in ”Alternate Functions of Port C”
on page 85.

4
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

1.1.6 Port D (PD7:0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output
buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins
that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-
stated when a reset condition becomes active, even if the clock is not running.

5
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

The various special features of Port D are elaborated in ”Alternate Functions of Port D”
on page 88.

1.1.7 AVCC

AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should
be connected to VCC through a low-pass filter. Note that PC6..4 use digital supply
voltage, VCC.

1.1.8 AREF
AREF is the analog reference pin for the A/D Converter.

1.1.9 ADC7:6 (TQFP and QFN/MLF Package Only)


In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC
channels.

1.2 Disclaimer
Typical values contained in this datasheet are based on simulations and characterization
of other AVR microcontrollers manufactured on the same process technology. Min and
Max values will be available after the device is characterized.

6
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

2. Overview

The ATmega48P/88P/168P/328P is a low-power CMOS 8-bit microcontroller based on


the AVR enhanced RISC architecture. By executing powerful instructions in a single
clock cycle, the ATmega48P/88P/168P/328P achieves throughputs approaching 1
MIPS per MHz allowing the system designer to optimize power consumption versus
processing speed.

2.1 Block Diagram

Figure 2-1. Block Diagram

GND

VCC
Watchdog debugWIRE
Power
Timer
Supervision
Watchdog POR / BOD & PROGRAM
Oscillator RESET LOGIC

Oscillator Flash
SRAM
Circuits /
Clock
Generation

CPU
EEPROM

AVCC

AREF

GND

8bit T/C 0 2
16bit T/C 1 A/D Conv.

Analog Internal 6
8bit T/C 2
DATABUS

Comp. Bandgap

USART 0 SPI TWI

PORT D (8) PORT B (8) PORT C (7)

RESET

7
8025FS–AVR–08/08
PD[0..7]
ATmega48P/88P/168P/328P
PB[0..7] PC[0..6] ADC[6..7]

XTAL[1..2]

The AVR core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the Arithmetic Logic Unit
(ALU), allowing two independent registers to be accessed in one single instruction
executed in one clock cycle. The resulting architecture is more code efficient while
achieving throughputs up to ten times faster than con- ventional CISC microcontrollers.
The ATmega48P/88P/168P/328P provides the following features: 4K/8K/16K/32K
bytes of In- System Programmable Flash with Read-While-Write capabilities,
256/512/512/1K bytes EEPROM, 512/1K/1K/2K bytes SRAM, 23 general purpose I/O
lines, 32 general purpose work- ing registers, three flexible Timer/Counters with
compare modes, internal and external interrupts, a serial programmable USART, a
byte-oriented 2-wire Serial Interface, an SPI serial port, a 6-channel 10-bit ADC (8
channels in TQFP and QFN/MLF packages), a programmable Watchdog Timer with
internal Oscillator, and five software selectable power saving modes. The Idle mode
stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire Serial Inter-
face, SPI port, and interrupt system to continue functioning. The Power-down mode
saves the register contents but freezes the Oscillator, disabling all other chip functions
until the next inter- rupt or hardware reset. In Power-save mode, the asynchronous timer
continues to run, allowing the user to maintain a timer base while the rest of the device
is sleeping. The ADC Noise Reduc- tion mode stops the CPU and all I/O modules
except asynchronous timer and ADC, to minimize switching noise during ADC
conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest
of the device is sleeping. This allows very fast start-up combined with low power
consumption.
The device is manufactured using Atmel’s high density non-volatile memory
technology. The On-chip ISP Flash allows the program memory to be reprogrammed
In-System through an SPI serial interface, by a conventional non-volatile memory
programmer, or by an On-chip Boot pro- gram running on the AVR core. The Boot
program can use any interface to download the application program in the Application
Flash memory. Software in the Boot Flash section will continue to run while the
Application Flash section is updated, providing true Read-While-Write operation. By
combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a
monolithic chip, the Atmel ATmega48P/88P/168P/328P is a powerful microcontroller
that pro- vides a highly flexible and cost effective solution to many embedded control
applications.
The ATmega48P/88P/168P/328P AVR is supported with a full suite of program and
system development tools including: C Compilers, Macro Assemblers, Program
Debugger/Simulators, In-Circuit Emulators, and Evaluation kits.

8
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

Device Flash EEPROM RAM Interrupt Vector Size


ATmega48P 4K Bytes 256 Bytes 512 Bytes 1 instruction word/vector

2.2 Comparison Between ATmega48P, ATmega88P, ATmega168P, and ATmega328P

The ATmega48P, ATmega88P, ATmega168P, and ATmega328P differ only in


memory sizes, boot loader support, and interrupt vector sizes. Table 2-1 summarizes the
different memory and interrupt vector sizes for the three devices.
Table 2-1. Memory Size Summary

ATmega88P 8K Bytes 512 Bytes 1K Bytes 1 instruction word/vector


ATmega168P 16K Bytes 512 Bytes 1K Bytes 2 instruction words/vector
ATmega328P 32K Bytes 1K Bytes 2K Bytes 2 instructions words/vector

ATmega88P, ATmega168P, and ATmega328P support a real Read-While-Write Self-


Program- Ming mechanism. There is a separate Boot Loader Section, and the SPM
instruction can only execute from there. In ATmega48P, there is no Read-While-Write
support and no separate Boot Loader Section. The SPM instruction can execute from
the entire Flash.

9
8025FS–AVR–08/08
Circuit:-
ATmega48P/88P/168P/328P

Pin out:-
In This AVR Development Board we have used atmega328p microcontroller IC.
The Pin out of this ic is according to aurdino, So we have given the following
reference:-

1
8025FS–AVR–08/08
ATmega48P/88P/168P/328P

Components Used:-
1. 22pf capacitor
2. 12mhz crystal
3. 100uf capacitor
4. 10uf capacitor
5. Ic base
6. Atmega328p
7. L7805 ic
8. 1k resistor
9. 1n4007 diode x4
10.Led
11.PCB

Conclusion: - We have learned to build AVR development board and


construction of it. Also we have conclude the working principle of
Atmega328p Microcontroller and AVR Development Board.

2
8025FS–AVR–08/08

You might also like