Microprocessors And Microcontrollers (Practical)

Similar documents
Introduction to Microcontrollers

Microprocessors And Microcontroller

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

EE 308: Microcontrollers

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

Lab Course Microcontroller Programming

AN-103 Preparing ZBasic Generic Target Devices

Embedded programming, AVR intro

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Programming Microcontroller Assembly and C

3.3V regulator. JA H-bridge. Doc: page 1 of 7

The Atmel ATmega328P Microcontroller

The Atmel ATmega168A Microcontroller

ARDUINO MEGA INTRODUCTION

AVR- M16 development board Users Manual

Distributed Real- Time Control Systems

INTERFACING HARDWARE WITH MICROCONTROLLER

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

AVRUSBPRG1 USB AVR IN SYSTEM PROGRAMMER

Assembly Programming in Atmel Studio 7 Step by Step Tutorial

DBAT90USB162 Atmel. DBAT90USB162 Enhanced Development Board User s Manual

Getting Started with STK200 Dragon

Doc: page 1 of 6

Doc: page 1 of 8

ATmega128. Introduction

PART 1 : MR-162. PART 2 : CPU Board. PART 3 : Software Tools. PART 4 : Compile and Download. 1. Introduction 2. Features

U6DIL. AVR USB Module. Rev. 1.1 Documentation Rev. 18. Reusch Elektronik Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch

Arduino Uno R3 INTRODUCTION

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

Cerebot Nano Reference Manual. Overview. Revised April 15, 2016 This manual applies to the Cerebot Nano rev. A

Basic Components of Digital Computer

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

Various power connectors. 3.3V regulator. 64K Flash (Internal) 2K EEPROM (Internal) 4K SRAM (Internal) JA Mem Adr/ Data. Doc: page 1 of 9

LED Matrix Scrolling using ATmega32 microcontroller

Robotics Training Module ABLab Solutions

Atmel Microprocessor Programming With AVRISPmkii

U2DIL. AVR USB Module. Rev. 1.1 Documentation Rev. 37. Reusch Elektronik Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

ET-BASE AVR ATmega64/128

U4DIL. AVR USB Module. Rev. 1.1 Documentation Rev. 19. Reusch Elektronik Reusch Elektronik, Dipl.-Ing. (FH) Rainer Reusch

Doc: page 1 of 6

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

PIC Microcontroller and

keyestudio Keyestudio MEGA 2560 R3 Board

AVR Development Tools. Shenzhen April 2005

2011 Pearson Higher Education, Mazidi, Naimi, and Naimi Pearson Higher Education, 2011 Pearson Higher Education,

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

Revision: 05/05/ E Main Suite D Pullman, WA (509) Voice and Fax. Various power connectors. 3.3V regulator

Hardware Manual. Crumb128. Rapid Prototyping Module with the Atmega128 AVR Microcontroller

AVR Microcontrollers Architecture

Microcontroller basics

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

EE 308: Microcontrollers

M32 Development Board

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Figure 1-1 ISPAVRU1 application

Programming in the MAXQ environment

SECURE DIGITAL ACCESS SYSTEM USING IBUTTON

AC-PG-USBASP USBASP AVR Programmer

Distributed Real-Time Control Systems. Module 3 Hardware for Real Time Distributed Control Systems

Installation and Maintenance

Introduction to Arduino. Wilson Wingston Sharon

Sanguino TSB. Introduction: Features:

STK200 Starter Kit User Guide May 2004

HAND HELD PROGRAMMER QUICK START GUIDE

Breeze Board. Type A. User Manual.

8051 Microcontroller

MICROPROCESSOR BASED SYSTEM DESIGN

AC-PG-USBASP USBASP AVR Programmer

PART 1 : MR-16. PART 2 : CPU Board. PART 3 : Software Tools. PART 4 : Compile and Download. 1. Introduction 2. Features

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

AVR-TLCD-128CAN development board Users Manual

ET-AVRProg mini. Technical Specifications of ET-AVRProg mini

Microprocessors And Microcontrollers (Practical)

AVR USBISP+ V4.0 for specialist(model:ad-usbisp+ V4.0)

ECE 353 Lab 4. General MIDI Explorer. Professor Daniel Holcomb Fall 2015

PART 1 : MR Introduction 2. Features. PART 2 : CPU Board 1. Placement Diagram (Silkscreen) 2. Circuit Diagram 3.

Module 2: Introduction to AVR ATmega 32 Architecture

Alessandra de Vitis. Arduino

MR-Servo8 User Manual

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

MEXLE. International Educational Platform. International Educational Platform. for Informatics based on Embedded Systems

ARDUINO MICRO WITHOUT HEADERS Code: A000093

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

8051 MICROCONTROLLERS

PSU 2008 Winter - PH-315 Experimental Physics

AT89S8252 Development Board V1.0. Manual

MicroBolt. Microcomputer/Controller Featuring the Philips LPC2106 FEATURES

WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company

Embedded Systems. Read pages

Atmel AVR datasheet. Matrix Multimedia Atmel AVR Board EB Contents

ARDUINO YÚN MINI Code: A000108

An Arduino Controlled 1 Hz to 60 MHz Signal Generator

ARDUINO MEGA ADK REV3 Code: A000069

PIC32&Overview& E155&

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

University of Kashan Faculty of Electrical and Computer Engineering Department of Computer Engineering. Lecture note 2

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

Transcription:

Microprocessors And Microcontrollers (Practical) Semester : 4 th, 5 th (TL, ES) Course Code : ES256, ES313 By: Dr. Attiya Baqai Assistant Professor, Department of Electronics, MUET.

3 Introduction to Programming and AVR Microcontroller Semester : 4 th, 5 th (TL, ES) Course Code : ES256, ES313 By: Dr. Attiya Baqai Assistant Professor, Department of Electronics, MUET.

AVR s CPU PROGRAM ROM General Purpose Registers RAM EEPROM Timers Program Bus CPU Data Bus Data Bus address bus data bus control bus OSC Interrupt Unit Ports Other Peripherals I/O PINS

Altera Analog Devices Atmel Cypress Semiconductor Dallas Semiconductor ELAN Microelectronics Corp. Energy Micro EPSON Semiconductor Freescale Semiconductor Parallax NXP Semiconductors Texas Instruments Fujitsu Holtek Infineon Intel Lattice Semiconductor Maxim Integrated Microchip Technology National Semiconductor NEC Panasonic Rabbit Semiconductor Silicon Laboratories Available Microcontrollers

ATMEGA 8 Microcontroller 8-bit Atmel with 8KB in-system Programmable Flash 32 8 General Purpose Working Registers Up to 16MIPS Throughput at 16MHz 512 B EEPROM 1KB Internal SRAM Two 8-bit Timer/Counters and One 16-bit Timer/Counter Three PWM Channels Two-wire Serial Interface Programmable Serial USART Master/Slave SPI Serial Interface 23 Programmable I/O Lines 0-8MHz (ATmega8L) 0-16MHz (ATmega8)

ATMEGA 16L Microcontroller

Programming Methods In System Programming (ISP) JTAG DebugWire (dw) Pre-programmed Bootloader High Voltage Parallel Programming (HVPP) High Voltage Serial Programming (HVSP) Program and Debug Interface (PDI) Tiny Programming Interface (TPI) awire (aw)

In Circuit System Programming (ICSP) In System Programming is perhaps the most common method of programming the Flash, EEPROM, fuse and lock bytes of the entire AVR line. ISP can program AVRs at extremely high clock rates (assuming the target AVR is running at a high frequency and the programmer supports it) and is the method of choice for almost all AVR hobbyists. There are many, many AVRISP clones and AVR910 programmers on the market in addition to simple do-it-yourself dongles which connect to your computer's parallel port. Recent new dongle designs may use the computer's serial port, however anecdotal evidence has said that this method is *extremely* slow due to technical limitations. ISP requires that the target AVR is running at a clock rate of at least four times that of the ISP clock.

AVR Programming Languages Programming Language for AVR is Assembly, however C language Compilers for AVRs are also available which convert C language program to Assembly or Machine (HEX) language.

Simulation: AVR Programming Tools Proteus Simulator v7.9 (Simulation) AVR Studio 4.18 (Programming) Win AVR (GCC Compiler) Experiment: USBAsp Programmer AVR Studio 4.18 Extreme Burner (for Programming through ICSP) AVR Trainer or AVR ATMEGA 16 Chip WinAVR

USBAsp Programmer Connection Diagram ICSP Header VCC MOSI MISO SCK RST GND ATMEGA 16

AVR Microcontroller Trainer

AVR Microcontroller Trainer 10-segment LED bargraph display LCD ICSP header ATMEGA16 4 Switches Power Socket

Introduction to AVR Studio 4

Select New Project

Atmel AVR Assembler for Assembly AVR GCC for C-language

Enter details and click NEXT

AVR Simulator > ATmega16

Compile and Build Options Project Files Programming Window uc I/O Info Compilation Status I/O Status / value

Input & Output Operations To initialize ports as Input / Output: DDRx = 0xFF; // Output DDRx = 0x00; // Input Getting / Writing Data on Ports: PINx // for Input PORTx // for Output x is the Port name i.e. A, B, C etc

Program#01: Send Data on Port B.INCLUDE "M16DEF.INC".ORG 0000 LDI R16,0xFF OUT DDRB,R16 ; making PORT B as output LDI R17, 0xF0 ; sending data F0 to PORT B OUT PORTB,R17 AGAIN: JMP AGAIN

Simulate & Debug Program in AVR Studio.INCLUDE "M16DEF.INC".ORG 0000 LDI R16,0xFF OUT DDRB,R16 ; making PORT B as output LDI R17, 0xF0 ; sending data F0 to PORT B OUT PORTB,R17 AGAIN: JMP AGAIN

Proteus Output

Proteus Output Browse Hex File from PC Run Simulation

Program # 02: Get Data from Port C and Put it on Port B.INCLUDE "M16DEF.INC".ORG 0000 LDI R16,00 OUT DDRC, R16 LDI R17,0xFF OUT DDRB,R17 AGAIN: IN R0,PINC OUT PORTB,R0 JMP AGAIN ; making PORT C as input ; making PORT B as output ; Read continuously from PORT C ; & send it to PORT B

Example # 02: Proteus

Example # 02: Proteus

Khazama AVR Programmer

Exercise Questions Get Data from Switches connected at Port C and Output complimented data to Port B Get data from lower nibble of Port C and put it to upper nibble of port B Count numbers from 0 to 255 on Port B Write a program to generate these random numbers: 100, 255, 123, 80, 66, 36, 15, 00

Acknowledgement Originally taken from Practical Lecture slides and handouts by Engr Azam Rafique Memon Modified by Dr. Attiya Baqai

Thanks! Any questions?