Introduction to Microcontrollers

Similar documents
Microprocessors And Microcontrollers (Practical)

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

AVRUSBPRG1 USB AVR IN SYSTEM PROGRAMMER

PART 1 : MR-162. 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

Distributed Real- Time Control Systems

Figure 1-1 ISPAVRU1 application

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

AC-PG-USBASP USBASP AVR Programmer

AVR Microcontrollers Architecture

keyestudio Keyestudio MEGA 2560 R3 Board

AVR/8051 USB PROGRAMMER

Module 2: Introduction to AVR ATmega 32 Architecture

AC-PG-USBASP USBASP AVR Programmer

ATmega128. Introduction

USBTinyMkII User manual

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

AN-103 Preparing ZBasic Generic Target Devices

Atmel AVR datasheet. Matrix Multimedia Atmel AVR Board EB Contents

Alessandra de Vitis. Arduino

AVR Hand Held Programmer

Figure 1. JTAGAVRU1 application The JTAGAVRU1 is supported by AVR Studio. Updated versions of AVR Studio is found on

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

Atmel Microprocessor Programming With AVRISPmkii

MR-Servo8 User Manual

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

ET-BASE AVR ATmega64/128

AVR Prog-S. Programmer for AVR microcontrollers. User Manual

AVRminiV3.1 Manual. 1. AVRminiV3.1 Overview. 2. AVRminiV3.1 Features and Specifications Standard Features: 2.2. Optional Features:

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

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

Programming Microcontroller Assembly and C

Getting Started with STK200 Dragon

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

EE 308: Microcontrollers

STK200 Starter Kit User Guide May 2004

Programmer AVR USBasp

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

M32 Development Board

AVR Development Board

UISP, Mote Programming, and Mote Fuse Help Guide version UISP, Mote Programming, and Mote Fuse HELP GUIDE

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

BOOTLOADER for AVR-Development Modules

Memory Map for the MCU320 board:

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

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

USER'S MANUAL PICEBS2. Hes-so//Valais / ISI / sap - version 1.0 PICEBS2-1/10

ARDUINO MEGA 2560 REV3 Code: A000067

ET-BASE AVR (ATmega8535)

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

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

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

Sanguino TSB. Introduction: Features:

HAND HELD PROGRAMMER QUICK START GUIDE

GIE 8051 Mini Kit. User Manual

Omega MP. Multi-Programming Shield for Atmel Microcontrollers. User Manual

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

Arduino Dock 2. The Hardware

Goal: We want to build an autonomous vehicle (robot)

Robotics Training Module ABLab Solutions

Arduino ADK Rev.3 Board A000069

Getting Embedded Software into the Target System using Device Programmer

MICROPROCESSOR BASED SYSTEM DESIGN

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

Introduction to 8051 microcontrollers

TMCM-302 Stepper Motor Motion Control Module

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

Lecture 1: Introduction to Microprocessors

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Installation and Maintenance

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

ARDUINO MEGA ADK REV3 Code: A000069

Wireless Sensor Networks. FireFly 2.2 Datasheet

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

ARDUINO UNO REV3 Code: A000066

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

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

MINITRONICS v1.0 DATASHEET

Lab Course Microcontroller Programming

Basic Components of Digital Computer

ARDUINO MEGA INTRODUCTION

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

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

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

Breeze Board. Type A. User Manual.

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

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

AVR MICROCONTROLLER ARCHITECTURTE

Zippy AVR Programmer. Zippy Programmer Features. Lomae Pty Ltd PO BOX 1297 Baulkham Hills, NSW,1755 ACN

STK User Guide

Diploma in Embedded Systems

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

ARDUINO YÚN MINI Code: A000108

Grundlagen Microcontroller Memory. Günther Gridling Bettina Weiss

COMP2121 Introductory Experiment

Embedded programming, AVR intro

Microprocessors And Microcontroller

AVR-P development board Users Manual

HAND HELD PROGRAMMER QUICK START GUIDE

AVR Tool Guide. (Version 2.1) WIZnet Inc. Marketing & Sales: Technical Support:

Transcription:

CSE391: Embedded Systems and Interfacing Introduction to Microcontrollers Nazmus Saquib Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering and Technology April 22, 2018 Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 1 / 25

Introduction Introduction to Microcontrollers Microprocessor by itself is not functional Needs external units like RAM, ROM, I/O ports, timer, etc. Microcontrollers provide limited amount of these resources Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 2 / 25

Introduction Difference between Microprocessor and Microcontroller Microprocessor CPU is standalone Designer can decide on the amount of resources Expensive General purpose Microcontroller CPU, RAM, ROM, I/O Ports, and timer are all on the same chip Resources are fixed Cost effective Special purpose Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 3 / 25

Introduction Difference between Microprocessor and Microcontroller Microprocessor CPU is standalone Designer can decide on the amount of resources Expensive General purpose Microcontroller CPU, RAM, ROM, I/O Ports, and timer are all on the same chip Resources are fixed Cost effective Special purpose Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 3 / 25

Introduction Difference between Microprocessor and Microcontroller Microprocessor CPU is standalone Designer can decide on the amount of resources Expensive General purpose Microcontroller CPU, RAM, ROM, I/O Ports, and timer are all on the same chip Resources are fixed Cost effective Special purpose Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 3 / 25

Introduction Difference between Microprocessor and Microcontroller Microprocessor CPU is standalone Designer can decide on the amount of resources Expensive General purpose Microcontroller CPU, RAM, ROM, I/O Ports, and timer are all on the same chip Resources are fixed Cost effective Special purpose Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 3 / 25

Introduction Difference between Microprocessor and Microcontroller Microprocessor CPU is standalone Designer can decide on the amount of resources Expensive General purpose Microcontroller CPU, RAM, ROM, I/O Ports, and timer are all on the same chip Resources are fixed Cost effective Special purpose Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 3 / 25

Introduction to Atmel AVR ATmega32 Which microcontroller will we be using? Atmel AVR ATmega32 OR Atmel AVR ATmega16 Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 4 / 25

Introduction to Atmel AVR ATmega32 Which microcontroller will we be using? Atmel AVR ATmega32 OR Atmel AVR ATmega16 Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 4 / 25

Introduction to Atmel AVR ATmega32 Naming Convention of ATmega32 Atmel AVR ATmega32 AT Atmel mega series name (others are tiny and Xmega) 32 flash memory size 32KB Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 5 / 25

Introduction to Atmel AVR ATmega32 ATmega32 Pinout Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 6 / 25

Introduction to Atmel AVR ATmega32 Features of ATmega32 8-bit microcontroller 32 8-bit general purpose CPU registers Three types of memories: 1 Flash (32KB) 2 EEPROM (1KB) 3 SRAM (2KB) Von Neumann vs Harvard Architecture Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 7 / 25

Introduction to Atmel AVR ATmega32 Features of ATmega32 8-bit microcontroller 32 8-bit general purpose CPU registers Three types of memories: 1 Flash (32KB) 2 EEPROM (1KB) 3 SRAM (2KB) Von Neumann vs Harvard Architecture Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 7 / 25

Introduction to Atmel AVR ATmega32 ATmega32 Flash Memory Divide into two sections: Application section Boot section Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 8 / 25

Programming the ATmega32 Required Hardware Obvious components: ATmega32, circuit components, etc. Special component: Programmer aka Writer aka Burner We will be using USBasp (or its derivative) as our programmer Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 9 / 25

Programming the ATmega32 USBasp Programmer (and its Derivative) Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 10 / 25

Programming the ATmega32 Required Software For Windows Users... Atmel Studio IDE http://www.microchip.com/avr-support/atmel-studio-7 AVRpal Burner https://sourceforge.net/projects/avrpalnet/ USBasp Driver https://bit.ly/26hhvxq Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 11 / 25

Programming the ATmega32 Installing the Software Installing IDE and burner is easy Installing driver requires some way around for Windows 8 and above Newer Windows OS does not allow 3rd party drivers by default We need to disable driver signature enforcement Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 12 / 25

Programming the ATmega32 Disabling Driver Signature Checking Click restart while holding down the shift key Troubleshoot >Advanced >Startup Settings Find Disable driver signature enforcement from the list Type in the corresponding number Once the machine restarts you can install 3rd party drivers Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 13 / 25

Programming the ATmega32 Installing USBasp Driver Plug in USBasp Go to device manager You should find USBasp with an exclamation sign Right click, go to properties, and update driver Select search computer for driver and select the unzipped folder A warning might pop up, confirm Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 14 / 25

Programming the ATmega32 Steps in Programming Microcontroller 1 (Atmel Studio) Write code 2 (Atmel Studio) Generate hex file 3 (USBasp, microcontroller) Connect µc USBasp PC 4 (AVRpal, USBasp Driver) Burn hex file to microcontroller Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 15 / 25

Programming the ATmega32 Steps in Programming Microcontroller 1 (Atmel Studio) Write code 2 (Atmel Studio) Generate hex file 3 (USBasp, microcontroller) Connect µc USBasp PC 4 (AVRpal, USBasp Driver) Burn hex file to microcontroller Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 15 / 25

Programming the ATmega32 Steps in Programming Microcontroller 1 (Atmel Studio) Write code 2 (Atmel Studio) Generate hex file 3 (USBasp, microcontroller) Connect µc USBasp PC 4 (AVRpal, USBasp Driver) Burn hex file to microcontroller Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 15 / 25

Programming the ATmega32 Steps in Programming Microcontroller 1 (Atmel Studio) Write code 2 (Atmel Studio) Generate hex file 3 (USBasp, microcontroller) Connect µc USBasp PC 4 (AVRpal, USBasp Driver) Burn hex file to microcontroller Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 15 / 25

Programming the ATmega32 Using Atmel Studio: Create Project Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 16 / 25

Programming the ATmega32 Using Atmel Studio: Select Device Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 17 / 25

Programming the ATmega32 Using Atmel Studio: Build Project Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 18 / 25

Programming the ATmega32 Using Atmel Studio: Build Success Successful build creates a hex file Hex file is created in debug folder of project directory We need to burn this file to our microcontroller Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 19 / 25

Programming the ATmega32 Understanding USBasp Pinout Pin description is provided at the back One to one correspondence with the header Do not twist, look directly into the header CORRECT Nazmus Saquib (Lecturer of CSE, BUET) INCORRECT Microcontroller April 22, 2018 20 / 25

Programming the ATmega32 Understanding USBasp Pinout (Cntd.) Vcc (10) MOSI (6) GND (11) RESET (9) SCK (8) MISO (7) Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 21 / 25

Programming the ATmega32 USBasp Derivative Header pins are explicitly written Connections are similar Also possible to use the socket Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 22 / 25

Programming the ATmega32 AVRpal Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 23 / 25

Summary Summary Things we have learnt: Difference between µp and µc Basic features of ATmega32 How to program ATmega32 We left out: how to write our code? We will learn to write our code in next class Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 24 / 25

Summary Summary Things we have learnt: Difference between µp and µc Basic features of ATmega32 How to program ATmega32 We left out: how to write our code? We will learn to write our code in next class Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 24 / 25

Questions Questions? Nazmus Saquib (Lecturer of CSE, BUET) Microcontroller April 22, 2018 25 / 25