Microcontrollers Lecture L12.2 Section 12.2. Microcontrollers Microcontrollers vs. Microprocessors Two standard architectures PIC microcontroller 68HC12.

Slides:



Advertisements
Similar presentations
Micro controllers introduction. Areas of use You are used to chips like the Pentium and the Athlon, but in terms of installed machines these are a small.
Advertisements

Microprocessors Typical microprocessor controlled devices: Camera, mobile phone, stereo, mp3 player, electronic toys… High-level microprocessor controlled.
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Chapter 2 Machine Language.
Computer Architecture Abhinav Agarwal Veeramani V.
© 2010 Kettering University, All rights reserved..
Microcontroller – PIC – 4 PIC types PIC architecture
Chapter 2 Machine Language. Machine language The only language a computer can understand directly. Each type of computer has its own unique machine language.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Railway Foundation Electronic, Electrical and Processor Engineering.
The 8051 Microcontroller Architecture
Programmable Logic Controllers (PLCs) This course deals with PLCs, Programmable Logic Controllers. PLCs are the industrial computer/controllers that are.
Microcontroller: Introduction
Embedded System Spring, 2011 Lecture 3: The PIC Microcontrollers Eng. Wazen M. Shbair.
The domestic refrigerator-An example A car door mechanism.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
ATMEL AVR 8 bit RISC MICROCONTROLLERS
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.
Lecture - 1 Introduction. Outline Course assessment criteria PIC microcontrollers Basic computer architecture – CPU – Memory – I/O – Buses.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Atmega32 Architectural Overview
CS-280 Dr. Mark L. Hornick 1 Parts of a GP Computer (Microcomputer) Contains separate Microprocessor chip Memory/Memory controller MB control chips Peripheral.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
ECE 447: Lecture 1 Microcontroller Concepts. ECE 447: Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device.
Computer Organization
MICROCONTROLLERS. What is a microcontroller? A microcontroller is a nifty little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Computer Fundamentals ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
ECE Lecture 1 Microcontroller Concepts. Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device Data.
ATMEL AVR 8 bit RISC MICROCONTROLLERS a general comparison.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Embedded System. What is an Embedded System? Computing systems embedded within electronic devices Hard to define – Nearly any computing system other than.
MICROOCESSORS AND MICROCONTROLLER:
MICROPROCESSOR FUNCTION Technician Series Created Mar 2015 gmail.com.
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
Presented by Sadhish Prabhu
Lecture 7: Overview Microprocessors / microcontrollers.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Components of a typical full-featured microcontroller.
8051 Microcontroller Tutorial and Architecture with Applications.
THE PPT OF THE FINAL YEAR PROJECT OF B-TECH ECE (4-TH YEAR) UNDER THE GUIDANCE OF SWARASATI SAHA,LECTURER OF DEPARTMENT OF ECE IS SUBMITTED BY- ARIJIT.
The 8051 Microcontroller architecture
Dr. Kyung Eun Park Summer 2017
Government Engg College Bhuj E. C. Engg. Department
ATMEL AVR 8 bit RISC MICROCONTROLLERS
MICROCONTROLLER ARCHITECTURE & ASSEMBLY LANGUAGE PROGRAMMING
Atmega32 Architectural Overview
Microcontrollers & GPIO
UNIT – Microcontroller.
Microcontroller Based Digital Code Lock
Microprocessor and Assembly Language
Introduction to Microcontrollers and the Board of Education
DIGITAL CALCULATOR USING 8051
Why microcontrollers in embedded systems?
Chapter 1: The 8051 Microcontrollers
Introduction to Microprocessors and Microcontrollers
Programming Languages
Introducing the PIC Mid-Range Family and the 16F84A
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
Wireless Embedded Systems
CHAPTER 1 THE 8051 MICROCONTROLLERS
Presentation transcript:

Microcontrollers Lecture L12.2 Section 12.2

Microcontrollers Microcontrollers vs. Microprocessors Two standard architectures PIC microcontroller 68HC12 Microcontroller BASIC Stamp Jstamp What’s the Difference

Microcontrollers Microprocessor – Performs computing function for different architectures of memory, input/output ports, devices, and communication ports Microcontroller –Performs computing functions and contains onchip memory, input/output ports, devices, and communication ports. –Resources are limited

Microcontrollers

Desktop Computers –Different architectures/configurations of memory, devices, and ports –Microprocessor is a general purpose computing machine Embedded Systems –Includes coffee makers, burglar alarms, TV remote controls, simple robots, etc… –Easier to use a microcontroller with limited functionality and onchip resources No need to select/design a board with memory, etc… Ready to program

The PIC Microcontroller Very common microcontroller Made by Microchip Technology Over 180 different microcontrollers Available in different configurations of on-chip resources Timers, Drivers for writing to Liquid Crystal Displays, USB and TCP/IP interfaces, temperature sensors, and more Packaged in 8- to 84-pin configurations Contains from 1 KB to 128 KB memory Available in 8 and 16 bits

Microcontrollers PIC controllers have a Harvard Architecture Architecture used for Desktop personal computers

Microcontrollers What do you think are some advantages/disadvantages of these architectures?

PIC

368 Bytes of Memory for Data 8 KB of Memory For Programs 14-bit program words

PIC Similar to Lab 10

PIC The Instruction Set

3 Types of instructions

Byte-oriented instructions fff ffff – the 7-bit address for which location in the register file (memory) contains the data of interest d – if d = 0, then the answer will be stored in the W register, otherwise if d = 1, then the answer will be stored in the memory location selected by fff ffff.

Byte-oriented instructions If ADDWF is encoded as machine code: d = 0 memory location = 0A d Memory address

Byte-oriented instructions If ADDWF is encoded as machine code: d = 0 memory location = 0A W reg is added to RF[0A] and the answer is placed in W reg OPCODE = 070A

Byte-oriented instructions If ADDWF is encoded as machine code: d = 1 memory location = 0A W reg is added to RF[0A] and the answer is placed in RF[0A] OPCODE = 078A

Byte-oriented instructions For ADDWF, we have seen type machine codes: 070A – add RF[0A] to W reg and place answer in W reg 078A – add RF[0A] to W reg and place answer in RF[0A] … and there are many more where that came from…

Bit-oriented instructions bbb – selects the bit that will be operated on ffffff – selects the memory location of the data to be operated on For example, BCF encoded as the machine code: Bit # Memory address

Bit-oriented instructions bbb – selects the bit that will be operated on ffffff – selects the memory location of the data to be operated on For example, BCF encoded as the machine code: Bit 7 (MSB) of the Byte in RF[0B] is cleared to zero OPCODE = 138B

Literal and Control instructions X – means don’t care K’s – the literal Literal means ‘inline data’ like in the 8086 when we used MOV AX, 0FFFF to move FFFF into AX, FFFF was the Literal or inline data.

Literal and Control instructions X – means don’t care K’s – the literal For example, if ADDLW is encoded as machine code: Inline Data

Literal and Control instructions X – means don’t care K’s – the literal For example, if ADDLW is encoded as machine code: F is added to the value in W reg and the sum is put in W reg OPCODE = 3E0F

Development Tools for PIC There is a Windows Development Environment for the PIC Controller

BASIC Stamp Based on 8-bit PIC 14-pin microcontroller Can be programmed using the BASIC language –It has a BASIC language interpreter built-in

BASIC Stamp

Online Interpreter Most microcontrollers do not have a built-in interpreter of any kind Usually source code written in higher level languages are compiled to a microcontrollers machine code BASIC Stamp is inexpensive and easy to program for small applications

JStamp Directly executes Java bytecodes

JStamp

The Java Processing Core

What’s the Difference When selecting a microcontroller there are several factors that need to be considered There are many microcontrollers available Each brings advantages and disadvantages

Considerations Cost –Prototype –Mass Production Inputs –Correct # of inputs –Digital / Analog

Considerations Outputs –Correct # of Outputs –Digital / Analog Processing Speed and Function –Adequate Computational Power –Upgrading a processor due to choosing the incorrect processor can be costly Rework of written programs

Considerations Memory –Programs –Data –Enough internal memory and/or can address enough external memory Ports –Correct ports for communicating with other devices Parallel Serial

Considerations Support –Online Forums Free source code Frequently Asked Questions (FAQs) –Support from Vendor –Pre-developed software Availability –Volumes – lead time

Considerations Extensibility –Future growth –Avoid changing microcontrollers in future releases Development Tools –Language (C / BASIC / Java) –Development Environment Debugging

Considerations Other technical requirements –Power Consumption Portable applications –Operating Voltage Compatible with other circuits