AVR I/O Port Programming

Slides:



Advertisements
Similar presentations
EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
Advertisements

TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
CHAPTER 4 I/O PORT PROGRAMMING. I/O Port Pins The four 8-bit I/O ports P0, P1, P2 and P3 each uses 8 pins All the ports upon RESET are configured as input,
COMP3221: Microprocessors and Embedded Systems Lecture 17: Computer Buses and Parallel Input/Output (I) Lecturer: Hui.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
Indian Institute of Technology Hyderabad ROBOTICS LINE FOLLOWER HARI KISHAN TANDEY – ES12B1008 DILIP KONDAPARTHI – ES12B1010 SAI KARTIK – CE12B1015.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
Programming Microcontrollers B. Furman 19MAR2011.
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
EE1A Revision What should you be expected to do in a typical exam question ? Understanding of basic principles. Ability to perform simple circuit analysis.
Programming the ATmega16
Sensors And Micro-Controllers
Essentials of motors and motor driver
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
You must be knowing about Digital Integrated Circuits (ICs) right ? For example 7404: Hex Inverter 7408: Quad 2-input AND gate 7410: Triple 3-input NAND.
Introduction to Microcontrollers Shivendu Bhushan Summer Camp ‘13.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
1 EKT 225 MICROCONTROLLER I CHAPTER 3 I/O PORT PROGRAMMING.
AVR Microcontrollers.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Control pins and Writing Microcode. Simple architecture Recall our architecture from the previous week It was a simple bus architecture “Control” was.
Embedded Systems Design 1 Lecture Set 6 I/O Ports.
I/O Ports CS-280 Dr. Mark L. Hornick 1. CS-280 Dr. Mark L. Hornick 2 Ports are channels from the CPU to external hardware and software Atmega32 has: 4.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
AVR Programming: Digital I/O September 10, What is Digital I/O? Digital – A 1 or 0 Input – Data (a voltage) that the microcontroller is reading.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
Microcontroller Intel 8051 [I/O Ports]. Pin out of the 8051 –40 pin package –32 pins are used for the 4 ports. –V CC / V SS –ALE Address Latch Enable.
PPI-8255.
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Basic LED Interface.
EMBEDDED SYSTEM & ROBOTICS. Introduction to robotics Robots are machines capable of carrying out a complex series of actions automatically. Robotics is.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Arduino Mega Arduino Mega 2560 Arduino Mega 2560.
Chapter Microcontroller
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
8255:Programmable Peripheral Interface
Introduction to AVR Name : 1) Abhishek Yadav ) Prakash Giri ) Kheni Niral ) Bhadresh Langadiya Branch.
The 8085A is a general-purpose microprocessor with low hardware overhead requirements. Within the 8085A are contained the functions of clock generation,
ALPHA COLLEGE OF ENGINEERING & TECHNOLOGY Introduction to AVR ATMega32 Architecture PREPARED BY SHWETA ( ) BHOOMI ( ) YOGEN ( )
Embedded Systems Programming (What they do and when / how to use them)
Microprocessor and Microcontroller Fundamentals
The 8085 Microprocessor Architecture
Environment Temperature Monitor
AVR ATMEGA 8 MICRO-CONTROLLER
LAPTOP THEFT IDENTIFIER.
For further information
The 8085 Microprocessor Architecture
COMP2121: Microprocessors and Interfacing
The Arduino Microcontroller: Atmel AVR Atmega 328
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interfacing Memory Interfacing.
8255.
Parallel communication interface 8255
Tri-state Buffers and Drivers By Taweesak Reungpeerakul
The 8085 Microprocessor Architecture
Chapter 14 Control Unit Operation
8051 Micro Controller.
I/O Programming with Arduino
CHAPTER HARDWARE CONNECTION.
CHAPTER 4 I/O PORT PROGRAMMING.
Department of Electronics
Costas Foudas, Imperial College, Rm: 508, x47590
Computer Architecture
Presentation transcript:

AVR I/O Port Programming Presentation by:- kanojeeya pathik v. (140433111011) (4121) Guided by:- Prof. A.J.Mankad Department of electronics and communication Shantilal shah engineering collage Bhavnagar

outline AT Mega 32 pin diagram ATMega32 Pin out & Descriptions Configuration of port Alternate functions of ports

AT Mega 32 pin diagram Port B Port A Port C Port D

ATMega32 Pin out & Descriptions

Port description

ATMega32 Pin out & Descriptions

Configuration of port This is very important point of port programming. You have to configure the port as either input port or output pot. The DDRx will help us to define the directions of port. We can configure each and every pin of all of 4 ports either input or output individually. For configurations of port we need to understand the importance and construction of DDRx.

Defining a pin as either Input or Output – The DDRx Registers

How it configured

Cont… Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedance

Cont… Simply the DDRx works as a tri-state buffer, as shown in above figure when DDRx has zero value at that time the ports works for input, at that time the pull up registers managed by PORTx registers. And hence the on the external pins are copied into the PINx register located in SFR memory. When the DDRx have one or high value at that time the pull up registers are connected to the external pins and hence the data stored in PORTx register goes at external pins. The DDRx, PORTx, PINx are located in SFR memory of microcontroller, each port has its own and separate registers.

PINx PINx is a simple register located at SFR memory region. It always remind that we used the PINx register to copy the data from port to the PIN register, to process it we have to take this data into some another register from R0 to R31. IN instruction is used to copy data from PIN register to another register.

PORTx As the PINx register is used to input the data, this is used to output data from registers to in ports. This also a simple register which is located into SFR The OUT instruction is used to copy data of PORT register on the port pins. For ex. To out the data of R16 on port B after the configuration the program is like this Out PORTB,R16

Alternate functions of ports As we know the all ports provides multiple functions. The main or primary function is I/O, but using overriding signals we can put them to work some other function like serial communication etc. All port and all pins of every ports provide dual functions.

Cont…

Cont…

Overriding of signals

Cont… Note: 1. WPx, WDx, RRx, RPx, and RDx are common to all pins within the same port. clkI/O, SLEEP, and PUD are common to all ports. All other signals are unique for each pin.

Single pin accessing

example

Cont…

references Universiti teknologi Malaysia (www.utm.my) Avr AT Mega 32 datasheet Avr microcontroller and embedded system using assembly and c by mazidi

Thank you