EE 308: Microcontrollers

Size: px
Start display at page:

Download "EE 308: Microcontrollers"

Transcription

1 EE 308: Microcontrollers Introduction Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 6, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

2 What are microcontrollers? A microcontroller is a processor with memory and several other components integrated on a a single chip making it perfect for a variety of applications covering a wide range, e.g., coffee machines, automotive industry, communications, defense systems, satellites, etc. Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

3 Differences between microcontrollers and microprocessor Microcontroller Microprocessor CPU SRAM EEPROM/ Flash Timer/ Counter CPU SRAM EEPROM/ Flash Timer/ Counter Digital I/O module Serial interface ADC Other peripherals General Purpose Microprocessor Serial interface ADC Digital I/O module Microcontroller Contains a processor Has memory and I/O modules integrated on the same chip Compact Cheap Small power consumption Processor is standalone, memory and I/O modules are seperate Designer can choose components for memory and I/O High processing power General purpose Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

4 Variety of microcontroller manufacturers 68HC11/12 Freescale Semiconductors s (Formerly Motorola) 8051 Intel AVR Atmel Z8 Zilog PIC Microchip Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

5 Evaluation boards BigAVR6 Dragon12 Plus ATtiny85 Zilog Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

6 Embedded systems Control unit performed by a microcontroller is integrated into the system. Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

7 Mechatronics Integration for mechanical systems with electronics and information processing. Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

8 Factors to consider Capability of meeting the specification of the task at hand Speed Packaging Power consumption Amount of memory Number of I/O pins Upgradability Cost Development tools Availability Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

9 CISC vs RISC Complex Instruction Set Computer (CISC) Larger architecture Variable code size Powerful instruction set Requires several clock cycles to execute instructions Reduced Instruction Set Computer (RISC) Simple architecture Small set of instructions One or few clock cycles to execute instructions Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

10 Von Neumann vs Harvard Von Neumann Harvard Code memory Data memory data bus data bus CPU data bus address bus control bus Code memory control bus CPU control bus Data memory address bus address bus Von Neumann architecture Harvard architecture Code and data are accessed through the same bus Results in a bottle neck since we can t access code and data at the same time More delays Separate buses for accessing code and data Faster Less delays Requires more hardware Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

11 AVR Core RISC with Harvard architecture Code ROM Data RAM Data EEPROM Timers I/O ports ADC PWM Communication interfaces: USART, SPI, I2C (TWI), CAN, USB Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

12 Atmega1284 RISC architecture 131 instructions (most executes in single clock cycle) 128K bytes code ROM 4K bytes EEPROM 16K bytes SRAM JTAG Timers/counters, PWM, 8-channel 10bit ADC Watchdog timer USART, SPI, I2C Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

13 Atmega1284 PDIP Package This will be the chip used through out the semester. Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

14 Reasons for using assembly More efficient use of computing power and memory Closer to the hardware If mass production is the goal, then there will be money saving by going to smaller cheaper parts Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

15 Assembly language Assembly language consists of, instructions referred to as mnemonics, directives and labels.. INCLUDE " M1284DEF. INC " LDI R16, hi8 ( RAMEND ) OUT SPH, R16 LDI R16, lo8 ( RAMEND ) 5 OUT SPL, R16 ;initialize stack pointer SBI DDRC, 0 ;set bit 0 of DDRC HERE : SBI PORTC, 0 10 CALL DELAY ;call DELAY subroutine CBI PORTC, 0 CALL DELAY RJMP HERE 15 DELAY : LDI R20, 255 DL1 : DEC R20 BRNE DL1 RET Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

16 Assembly language Assembly language consists of, instructions referred to as mnemonics, directives and labels.. INCLUDE " M1284DEF. INC " LDI R16, hi8 ( RAMEND ) OUT SPH, R16 LDI R16, lo8 ( RAMEND ) 5 OUT SPL, R16 ;initialize stack pointer SBI DDRC, 0 ;set bit 0 of DDRC HERE : SBI PORTC, 0 10 CALL DELAY ;call DELAY subroutine CBI PORTC, 0 CALL DELAY RJMP HERE 15 DELAY : LDI R20, 255 DL1 : DEC R20 BRNE DL1 RET Directive Label Comment Instruction Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

17 Software tools GNU AVR toolchain (will be used in lectures) Free Open source Linux and Windows (WinAVR) Arduino IDE is based on it Requires a bit more effort to make it work Atmel Studio (mostly used in the lab) Free Supports all their products Runs only on Windows Has and additional assembler (used by default): avrasm2 Can t handle mixed C and assembly, and relies on GCC to do that Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

18 What to download on the microcontroller Assembler replaces mnemonics by their opcodes, resolves include directives, translates register names to addresses, removes comments, etc. avr-as -mmcu=atmega1284 -o ex.o ex.s Linker links multiple files avr-ld -mavr51 -o ex.elf ex.o Translate object files avr-objcopy -j.text -j.data -O ihex -o ex.hex ex.elf Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

19 Intel Hex vs S19 Intel Hex : E40EBF0FEF0DBF389A409A0E940C001B : E940C00F9CF4FEF4A95F1F70895F0 : FF Motorola S19 S D706C65345F332E686578C9 S E40EBF0FEF0DBF389A409A0E940C0017 S E940C00F9CF4FEF4A95F1F70895EC S FC Start code (:) Byte count data only (2 characters) Address (4 characters) Record type (2 characters) 00 data record 01 end of file Data (2k characters) Checksum (2 characters) Record type (2 characters) S0 Block header S1-3 Data records S5 Record count S7-9 End of block Byte count (2 characters) Address + Data + Checksum Address (4 characters) Data (2k characters) Checksum (2 characters) Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

20 Downloading the hex file avrdude -v -c dragon_jtag -p m1284 -Pusb -U flash:w:ex.hex Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

21 avr-as vs avrasm2 There are differences between the GCC assembler and the one used by Atmel. For full list you need to consult the documentation but below are some of the frequently used ones. avr-as.equ DDRA, 0x01.asciz hello.section.data.section.text hi8 lo8 avrasm2.equ DDRA = 0x01.db hello,0.dseg.cseg high low Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

22 Programmer Prototyping area Programming Interfaces SPI High Voltage Serial Parallel JTAG PDI awire Debugging Interfaces JTAG debugwire PDI awire Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

23 Makefile FILENAME MCU PARTNO ARCH PORT PROGRAMMER AS LD OBJCOPY PROG ASFLAGS LDFLAGS OBJFLAGS PRFLAGS = example = atmega1284 = m1284 = avr51 = usb = dragon_jtag = avr-as = avr-ld = avr-objcopy = avrdude = -mmcu=$(mcu) --gstabs = -m$(arch) = -j.text -j.data -O ihex = -v -c $(PROGRAMMER) -p $(PARTNO) -P$(PORT).PHONY: all install clean all: $(FILENAME).hex $(FILENAME).o $(FILENAME).elf %.o: %.s $(AS) $(ASFLAGS) -o $@ $< %.elf: %.o $(LD) $(LDFLAGS) -o $@ $< %.hex: %.elf $(OBJCOPY) $(OBJFLAGS) $< $@ install: $(FILENAME).hex $(PROG) $(PRFLAGS) -U flash:w:$< clean: rm -f $(FILENAME).hex $(FILENAME).elf $(FILENAME).o Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

24 Arduino environment Free package Arduino language implemented in C/C++ Lots of libraries A lot of copy/paste Hides a lot of the details and therefore Makes you lazy Optimization requires extensive redesign of code Resulting code may not operate under strict timing, memory, power requirements Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

25 Arduino environment Free package Arduino language implemented in C/C++ Lots of libraries A lot of copy/paste Hides a lot of the details and therefore Makes you lazy Optimization requires extensive redesign of code Resulting code may not operate under strict timing, memory, power requirements As an engineer, specifically an embedded systems engineer, you must understand enough about what you are designing, standards and specifications, and have the ability to validate and verify your design. The Arduino environment may not give you the ability to do so. Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

26 Arduino environment Free package Arduino language implemented in C/C++ Lots of libraries A lot of copy/paste Hides a lot of the details and therefore Makes you lazy Optimization requires extensive redesign of code Resulting code may not operate under strict timing, memory, power requirements As an engineer, specifically an embedded systems engineer, you must understand enough about what you are designing, standards and specifications, and have the ability to validate and verify your design. The Arduino environment may not give you the ability to do so. Very useful to non-technical users, hobbyists, students (K-12), but highly questionable for critical engineering designs Aly El-Osery (NMT) EE 308: Microcontrollers January 6, / 23

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Introduction to the Assmbly Language Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 25, 2018 Aly

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Review Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA February 15, 2018 Aly El-Osery (NMT) EE 308:

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers AVR Architecture Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 23, 2018 Aly El-Osery (NMT) EE 308:

More information

Microcontroller VU

Microcontroller VU 182.694 Microcontroller VU Martin Perner SS 2017 Featuring Today: A Deep Look into the Processor Core Getting Code onto the Microcontroller Chip Weekly Training Objective This week 1.2 Board test 2.1.1

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Timers Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA April 2, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers

More information

AVR Microcontrollers Architecture

AVR Microcontrollers Architecture ก ก There are two fundamental architectures to access memory 1. Von Neumann Architecture 2. Harvard Architecture 2 1 Harvard Architecture The term originated from the Harvard Mark 1 relay-based computer,

More information

Microprocessors And Microcontrollers (Practical)

Microprocessors And Microcontrollers (Practical) 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

More information

PIC Microcontroller and

PIC Microcontroller and PIC Microcontroller and Embedded d Systems Muhammad Ali Mazidi, Rolin McKinlay and Danny Causey Eng. Husam Alzaq The Islamic Uni. Of Gaza The PIC ucs 1-1 Chapter 1: The PIC Microcontrollers: History and

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Interrupts Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA March 1, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers

More information

Module 2: Introduction to AVR ATmega 32 Architecture

Module 2: Introduction to AVR ATmega 32 Architecture Module 2: Introduction to AVR ATmega 32 Architecture Definition of computer architecture processor operation CISC vs RISC von Neumann vs Harvard architecture AVR introduction AVR architecture Architecture

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

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

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) (Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Assmbly Language Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 30, 2018 Aly El-Osery (NMT)

More information

Microprocessors And Microcontroller

Microprocessors And Microcontroller Microprocessors And Microcontroller Semester : 4 th, 5 th (TL, ES) Course Code : ES256, ES313 By: Dr. Attiya Baqai Assistant Professor, Department of Electronics, MUET. Internal block diagram of CPU Internal

More information

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

2011 Pearson Higher Education, Mazidi, Naimi, and Naimi Pearson Higher Education, 2011 Pearson Higher Education, Objectives Students should be able to: The AVR microcontroller and embedded systems using assembly and c Introduction to AVR Chapter 1 Compare and contrast microprocessors and microcontrollers Describe

More information

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar

More information

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

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab AVR Training Board-I V., Konkuk Univ. Tae Pyeong Kim What is microcontroller A microcontroller is a small, low-cost computeron-a-chip which usually includes: An 8 or 16 bit microprocessor (CPU). A small

More information

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

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab AVR Training Board-I V., Konkuk Univ. Yong Beom Cho ybcho@konkuk.ac.kr What is microcontroller A microcontroller is a small, low-cost computeron-a-chip which usually includes: An 8 or 16 bit microprocessor

More information

Programming Microcontroller Assembly and C

Programming Microcontroller Assembly and C Programming Microcontroller Assembly and C Course Number CLO : 2 Week : 5-7 : TTH2D3 CLO#2 Student have the knowledge to create basic programming for microcontroller [C3] Understand how to program in Assembly

More information

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad Lecture 14 AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Lecture 4 The AVR Microcontroller Introduction to AVR CISC (Complex Instruction Set Computer) Put as

More information

ECE 471 Embedded Systems Lecture 2

ECE 471 Embedded Systems Lecture 2 ECE 471 Embedded Systems Lecture 2 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 7 September 2018 Announcements Reminder: The class notes are posted to the website. HW#1 will

More information

Choosing a Micro for an Embedded System Application

Choosing a Micro for an Embedded System Application Choosing a Micro for an Embedded System Application Dr. Manuel Jiménez DSP Slides: Luis Francisco UPRM - Spring 2010 Outline MCU Vs. CPU Vs. DSP Selection Factors Embedded Peripherals Sample Architectures

More information

ET-BASE AVR ATmega64/128

ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on

More information

ELC4438: Embedded System Design Embedded Processor

ELC4438: Embedded System Design Embedded Processor ELC4438: Embedded System Design Embedded Processor Liang Dong Electrical and Computer Engineering Baylor University 1. Processor Architecture General PC Von Neumann Architecture a.k.a. Princeton Architecture

More information

ATmega128. Introduction

ATmega128. Introduction ATmega128 Introduction AVR Microcontroller 8-bit microcontroller released in 1997 by Atmel which was founded in 1984. The AVR architecture was conceived by two students (Alf-Egil Bogen, Vergard-Wollen)

More information

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

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017 Lecture Objectives Introduction to Computing Chapter The AVR microcontroller and embedded systems using assembly and c Students should be able to: Convert between base and. Explain the difference between

More information

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

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director AVR XMEGA TM A New Reference for 8/16-bit Microcontrollers Ingar Fredriksen AVR Product Marketing Director Kristian Saether AVR Product Marketing Manager Atmel AVR Success Through Innovation First Flash

More information

Basic Components of Digital Computer

Basic Components of Digital Computer Digital Integrated Circuits & Microcontrollers Sl. Mihnea UDREA, mihnea@comm.pub.ro Conf. Mihai i STANCIU, ms@elcom.pub.ro 1 Basic Components of Digital Computer CPU (Central Processing Unit) Control and

More information

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Lecture (4) Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers Prof. Kasim M. Al-Aubidy Philadelphia University-Jordan DERTS-MSc, 2015 Prof. Kasim Al-Aubidy 1 Lecture Outline:

More information

MICROPROCESSOR BASED SYSTEM DESIGN

MICROPROCESSOR BASED SYSTEM DESIGN MICROPROCESSOR BASED SYSTEM DESIGN Lecture 5 Xmega 128 B1: Architecture MUHAMMAD AMIR YOUSAF VON NEUMAN ARCHITECTURE CPU Memory Execution unit ALU Registers Both data and instructions at the same system

More information

Introduction to Microcontrollers

Introduction to Microcontrollers CSE391: Embedded Systems and Interfacing Introduction to Microcontrollers Nazmus Saquib Lecturer Department of Computer Science and Engineering Bangladesh University of Engineering and Technology April

More information

Installation and Maintenance

Installation and Maintenance Chapter 9 Installation and Maintenance 9.1 Hardware and software System requirements. 215 9.2 Operating Manuals. 216 9.3 Software. 221 9.4 Maintenance. 225 Chapter 9 Installation and Maintenance. This

More information

Somes French translations :

Somes French translations : 1 RB - EPFL/IC/LAP - A2012 Embedded systems Somes French translations : Systèmes embarqués Systèmes enrobés Systèmes enfouis Embedded systems, definition There is no formal definition of an embedded system,

More information

Distributed Real- Time Control Systems

Distributed Real- Time Control Systems Distributed Real- Time Control Systems Lecture 2 Embedded Systems Basics A. Bernardino, C. Silvestre, IST- ACSDC 1 What are embedded systems? Small computers to efficiently address specific purposes, e.g.

More information

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core

Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core TKT-3500 Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s s core Erno Salminen Copyright notice Some figures by Robert Reese, from supplementary CD of the course book from PIC18F8722 Family

More information

AVR MICROCONTROLLER ARCHITECTURTE

AVR MICROCONTROLLER ARCHITECTURTE AVR MICROCONTROLLER ARCHITECTURTE AVR MICROCONTROLLER AVR- Advanced Virtual RISC. The founders are Alf Egil Bogen Vegard Wollan RISC AVR architecture was conceived by two students at Norwegian Institute

More information

ARDUINO MEGA INTRODUCTION

ARDUINO MEGA INTRODUCTION ARDUINO MEGA INTRODUCTION The Arduino MEGA 2560 is designed for projects that require more I/O llines, more sketch memory and more RAM. With 54 digital I/O pins, 16 analog inputs so it is suitable for

More information

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

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad Objectives To be familiar with microcontrollers, PIC18F4550 microcontroller. Tools PIC18F4550 Microcontroller, MPLAB software,

More information

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

WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company WIZTECH AUTOMATION SOLUTIONS (P) LTD., An ISO 9001:2000 and IAO certified company #102, W Block, 2nd and 3rd floor, 2nd Avenue, Anna nagar Roundtana, Chennai-40 E-mail: wiztech4automation@gmail.com web:

More information

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester

Embedded Systems. PIC16F84A Internal Architecture. Eng. Anis Nazer First Semester Embedded Systems PIC16F84A Internal Architecture Eng. Anis Nazer First Semester 2017-2018 Review Computer system basic components? CPU? Memory? I/O? buses? Instruction? Program? Instruction set? CISC,

More information

Fig 1. Block diagram of a microcomputer

Fig 1. Block diagram of a microcomputer Computer: A computer is a multipurpose programmable machine that reads binary instructions from its memory, accepts binary data as input,processes the data according to those instructions and provides

More information

MICROCONTROLLERS 8051

MICROCONTROLLERS 8051 MICROCONTROLLERS 8051 PART A Unit 1: Microprocessor and Microcontroller. Introduction, Microprocessor and Microcontrollers, A Microcontroller survey. RISC & CISC CPU Architectures, Harvard & Von Neumann

More information

Lecture 1. Course Overview and The 8051 Architecture

Lecture 1. Course Overview and The 8051 Architecture Lecture 1 Course Overview and The 8051 Architecture MCUniversity Program Lectures 8051 architecture t System overview of C8051F020 8051 instruction set System clock, crossbar and GPIO Assembler directives

More information

Chapter 1. Microcontroller Overview

Chapter 1. Microcontroller Overview Chapter 1 Microcontroller Overview Lesson 2 Microcontrollers- Types and Examples Outline Microcontroller Types Examples- 8051 Series Family Members Examples- 68HC11/12 Series Family Members CPU Microcomputer

More information

This week we will learn about embedded programming. The agenda:

This week we will learn about embedded programming. The agenda: Week 7: Embedded Programming 11.3. 2015 This week we will learn about embedded programming. The agenda: http://academy.cba.mit.edu/classes/embedded_programming/index.html architectures Harvard, von Neumann

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 2-3: Embedded System Hardware Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering Embedded System Hardware Used for processing of

More information

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept. Definition of an E.S. It is a system whose principal function is not computational,

More information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Serial Perpherial Interface (SPI) Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA April 9, 2018 Aly El-Osery

More information

Review on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming

Review on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming ICT 6641: Advanced Embedded System Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming Prof. S. M. Lutful Kabir Session: April, 2011 Review on Lecture-1 Three parts of a computer : CPU, Memory

More information

ME 515 Mechatronics. A microprocessor

ME 515 Mechatronics. A microprocessor ME 515 Mechatronics Microcontroller Based Control of Mechanical Systems Asanga Ratnaweera Department of Faculty of Engineering University of Peradeniya Tel: 081239 (3627) Email: asangar@pdn.ac.lk A microprocessor

More information

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee ١ Agenda What is microprocessor system? What is Microcontroller/embedded system? Definition of Embedded Systems

More information

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

EE 354 Fall 2015 Lecture 1 Architecture and Introduction EE 354 Fall 2015 Lecture 1 Architecture and Introduction Note: Much of these notes are taken from the book: The definitive Guide to ARM Cortex M3 and Cortex M4 Processors by Joseph Yiu, third edition,

More information

Microprocessors/Microcontrollers

Microprocessors/Microcontrollers Microprocessors/Microcontrollers A central processing unit (CPU) fabricated on one or more chips, containing the basic arithmetic, logic, and control elements of a computer that are required for processing

More information

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers What is common between these systems? What is common between these systems? Each consists of an internal smart computer

More information

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA? COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs3221 Lecturer: Hui Wu Session 2, 2005 Instruction Set Architecture (ISA) ISA is

More information

Embedded System Project (521423S) - Specifications

Embedded System Project (521423S) - Specifications Embedded System Project (521423S) - Specifications Design phases power consumption, environment etc. partitioning, basic solutions System requirements Sketch of hardware Sketch of software operation procedures

More information

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

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc) Software Development & Education Center Embedded Systems (Design & Development with Various µc) Module 1: Embedded C Programming INTRODUCTION TO EMBEDDED SYSTEM History & need of Embedded System Basic

More information

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS. Using Assembly and С

THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS. Using Assembly and С THE AVR MICROCONTROLLER AND EMBEDDED SYSTEMS Using Assembly and С Muhammad AH Mazidi Sarmad Naimi Sepehr Naimi Prentice Hall Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam

More information

Embedded programming, AVR intro

Embedded programming, AVR intro Applied mechatronics, Lab project Embedded programming, AVR intro Sven Gestegård Robertz Department of Computer Science, Lund University 2017 Outline 1 Low-level programming Bitwise operators Masking and

More information

HCS12 Microcontroller and Embedded Systems: Using Assembly and C with CodeWarrior 1 st Edition

HCS12 Microcontroller and Embedded Systems: Using Assembly and C with CodeWarrior 1 st Edition Online Instructor s Manual to accompany HCS12 Microcontroller and Embedded Systems: Using Assembly and C with CodeWarrior 1 st Edition Muhammad Ali Mazidi Danny Causey Prentice Hall Boston Columbus Indianapolis

More information

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform. Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform www.sierraradio.net www.hamstack.com Topics Introduction Hardware options Software development HamStack project

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Microcontroller Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor

More information

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

ECE 353 Lab 4. General MIDI Explorer. Professor Daniel Holcomb Fall 2015 ECE 353 Lab 4 General MIDI Explorer Professor Daniel Holcomb Fall 2015 Where are we in Course Lab 0 Cache Simulator in C C programming, data structures Cache architecture and analysis Lab 1 Heat Flow Modeling

More information

CHAPTER 2: AVR ARCHITECTURE & ASSEMBLY LANGUAGE PROGRAMMING

CHAPTER 2: AVR ARCHITECTURE & ASSEMBLY LANGUAGE PROGRAMMING CHAPTER 2: AVR ARCHITECTURE & ASSEMBLY LANGUAGE PROGRAMMING SECTION 2.1: THE GENERAL PURPOSE REGISTERS IN THE AVR 1. 8 2. 8 3. 8 4. 0xFF 5. $28 in R20 6. (a), (c), (d), (e), (g) 7. (c) 8. This is an illegal

More information

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

PART 1 : MR-162. PART 2 : CPU Board. PART 3 : Software Tools. PART 4 : Compile and Download. 1. Introduction 2. Features MR-162 User Manual C O N T E N T S PART 1 : MR-162 1. Introduction 2. Features PART 2 : CPU Board 1. Placement Diagram (Silkscreen) 2. Circuit Diagram 3. Parts List PART 3 : Software Tools 1. AVR Development

More information

MECE336 Microprocessors I

MECE336 Microprocessors I MECE336 Microprocessors I Lecture 1 Introduction and Background Associate Prof. Dr. Klaus Werner Schmidt of Mechatronics Engineering Çankaya University Compulsory Course in Mechatronics Engineering Credits

More information

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack Course Syllabus: Chapter# Topic Covered Duration MODULE 1 INTRO TO EMBEDDED SYSTEMS 2-1

More information

An Arduino Controlled 1 Hz to 60 MHz Signal Generator

An Arduino Controlled 1 Hz to 60 MHz Signal Generator An Arduino Controlled 1 Hz to 60 MHz Signal Generator Greg McIntire, AA5C AA5C@arrl.net WWW..ORG 1 Objectives Build a standalone 60 MHz signal generator based on the DDS-60 board. Originally controlled

More information

Microcontroller: CPU and Memory

Microcontroller: CPU and Memory Microcontroller: CPU and Memory Amarjeet Singh January 15, 2013 Partly adopted from EE202A, UCLA Slides by Mani Srivastava Logistics Programming EVK1100 Guidelines for programming using AVR32 Studio on

More information

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs. acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.) Module 0 Introduction Introduction to Embedded Systems, Real Time

More information

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch. & Ch. Introduction to Microcontroller Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 What is microcontroller? (Ch..) 85 Microcontroller

More information

Arduino Uno R3 INTRODUCTION

Arduino Uno R3 INTRODUCTION Arduino Uno R3 INTRODUCTION Arduino is used for building different types of electronic circuits easily using of both a physical programmable circuit board usually microcontroller and piece of code running

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

Lecture 2. Introduction to Microcontrollers

Lecture 2. Introduction to Microcontrollers Lecture 2 Introduction to Microcontrollers 1 Microcontrollers Microcontroller CPU + ++++++++++ Microprocessor CPU (on single chip) 2 What is a Microcontroller Integrated chip that typically contains integrated

More information

AVR ISA & AVR Programming (I)

AVR ISA & AVR Programming (I) AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo Week 1 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation Week 1 2 1 Atmel AVR 8-bit

More information

Introduction to Microcontrollers

Introduction to Microcontrollers Introduction to Microcontrollers Embedded Controller Simply an embedded controller is a controller that is embedded in a greater system. One can define an embedded controller as a controller (or computer)

More information

Low-Cost Microcontrollers

Low-Cost Microcontrollers Low-Cost Microcontrollers Examples and Applications for Embedded Systems João Carlos Martins joao.martins@ipbeja.pt Engineering Dept 1st Workshop on Applied Signal Processing IPBeja 15th May 2014 Outline

More information

Digital Homebrewing. Bob Okas W3CD. Copyright 2004 Robert P. Okas

Digital Homebrewing. Bob Okas W3CD. Copyright 2004 Robert P. Okas Digital Homebrewing Bob Okas W3CD Copyright 2004 Robert P. Okas 1 Introduction Digital Homebrewing is a broad topic that encompasses: Hardware Logic Design Software design Combinations of both: Embedded

More information

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function Module 8: Atmega32 Stack & Subroutine Stack Pointer Subroutine Call function Stack Stack o Stack is a section of RAM used by the CPU to store information temporarily (i.e. data or address). o The CPU needs

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools Development Tools AVR Development Tools This section describes some of the development tools that are available for the 8-bit AVR family. Atmel AVR Assembler Atmel AVR Simulator IAR ANSI C-Compiler, Assembler,

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture

More information

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

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar Clock and Fuses Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar Reference WHY YOU NEED A CLOCK SOURCE - COLIN O FLYNN avrfreaks.net http://en.wikibooks.org/wiki/atmel_avr

More information

LED Matrix Scrolling using ATmega32 microcontroller

LED Matrix Scrolling using ATmega32 microcontroller LED Matrix Scrolling using ATmega32 microcontroller Deepti Rawat 1, Gunjan Aggarwal 2, Dinesh Kumar Yadav 3, S.K. Mahajan 4 Department of Electronics and Communication Engineering IIMT college of Engineering,

More information

Embedded Systems and Software

Embedded Systems and Software Embedded Systems and Software Potpourri & Notes on Lab 2 Artist's concept of Mars Exploration Rover. Courtesy NASA Lab 2 Notes Slide 1 The AVR Assembler We use the AVRASM2 assembler that comes with AVR

More information

TKT-3500 Microcontroller systems

TKT-3500 Microcontroller systems TKT-3500 Microcontroller systems Lec 2 PIC18LF8722 Microcontroller s core Teemu Laukkarinen Department of Computer Systems Tampere University of Technology Fall 2011 Copyright Tampere University of Technology

More information

8051 MICROCONTROLLERS

8051 MICROCONTROLLERS 8051 MICRO The 8051 and Embedded Systems: Using Assembly and C Mazidi, Mazidi and McKinlay Chung-Ping Young 楊中平 Home Automation, Networking, and Entertainment Lab Dept. of Computer Science and Information

More information

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA) COMP2121: Microprocessors and Interfacing Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Contents Memory models Registers Data types Instructions

More information

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

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system. Course Code: EEE 4846 International Islamic University Chittagong (IIUC) Department of Electrical and Electronic Engineering (EEE) Course Title: Embedded System Sessional Exp. 1: Familiarization with necessary

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Instruction Set (AVR) Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3

More information

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

3.3V regulator. JA H-bridge. Doc: page 1 of 7 Digilent Cerebot Board Reference Manual Revision: 11/17/2005 www.digilentinc.com 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The Digilent Cerebot Board is a useful tool for

More information

BASIC INTERFACING CONCEPTS

BASIC INTERFACING CONCEPTS Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction

More information

Getting Started with STK200 Dragon

Getting Started with STK200 Dragon Getting Started with STK200 Dragon Introduction This guide is designed to get you up and running with main software and hardware. As you work through it, there could be lots of details you do not understand,

More information

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor 1 2 A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many digital circuits that perform arithmetic, logic, communication, and control functions. When a microprocessor

More information

Embedded Systems. Computer Organization. Wednesday 25 November 15

Embedded Systems. Computer Organization. Wednesday 25 November 15 Embedded Systems Computer Organization Wednesday 25 November 15 Summary Previous Class Analog-Digital Interface Today: Embedded Systems Characteristics Architectures Complete Systems Computer Organization

More information

Introduction to Arduino. Wilson Wingston Sharon

Introduction to Arduino. Wilson Wingston Sharon Introduction to Arduino Wilson Wingston Sharon cto@workshopindia.com Physical computing Developing solutions that implement a software to interact with elements in the physical universe. 1. Sensors convert

More information

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure ARCHITECTURE AND PROGRAMMING George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners OUTLINE STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and

More information

(Embedded) Systems Programming Overview

(Embedded) Systems Programming Overview System Programming Issues EE 357 Unit 10a (Embedded) Systems Programming Overview Embedded systems programming g have different design requirements than general purpose computers like PC s I/O Electro-mechanical

More information

Doc: page 1 of 6

Doc: page 1 of 6 Nanocon Reference Manual Revision: February 9, 2009 Note: This document applies to REV A-B of the board. 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The Nanocon board is

More information