ECE2049: Embedded Computing in Engineering Design A Term Fall Lecture #6: Memory Organization and Digital I/O using the MSP430F5529

Similar documents
Chapter 13. PIC Family Microcontroller

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Lecture N -1- PHYS Microcontrollers

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

8051 MICROCONTROLLER COURSE

POCKET SCOPE 2. The idea 2. Design criteria 3

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Lab Experiment 1: The LPC 2148 Education Board

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI

Microtronics technologies Mobile:

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Am186ER/Am188ER AMD Continues 16-bit Innovation

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

MICROPROCESSOR AND MICROCOMPUTER BASICS

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Let s put together a Manual Processor

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Lab 1 Course Guideline and Review

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Chapter 2 Logic Gates and Introduction to Computer Architecture

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

2.0 Command and Data Handling Subsystem

Keil C51 Cross Compiler

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data.

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Hardware and Software Requirements

Atmel Norway XMEGA Introduction

System Design Issues in Embedded Processing

MCF54418 NAND Flash Controller

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Microprocessor & Assembly Language

Discovering Computers Living in a Digital World

1. Computer System Structure and Components

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

Serial port interface for microcontroller embedded into integrated power meter

Serial Communications

DAC Digital To Analog Converter

The Programming Interface

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Microcontrollers in Practice

An Introduction to MPLAB Integrated Development Environment

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

PART B QUESTIONS AND ANSWERS UNIT I

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

ontroller LSI with Built-in High- Performance Graphic Functions for Automotive Applications

System Considerations

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

ECE 3803: Microprocessor System Design D Term 2011 Course Syllabus Department of Electrical and Computer Engineering Worcester Polytechnic Institute

PowerPC 405 GP Overview

USB OTG and Embedded Host Microchip Technology Incorporated. All Rights Reserved. Slide 1

CSE2102 Digital Design II - Topics CSE Digital Design II

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

ENGI E1112 Departmental Project Report: Computer Science/Computer Engineering

Flash Microcontroller. Memory Organization. Memory Organization

ENTTEC Pixie Driver API Specification

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

Software development and debugging for NXP ARM7 MCUs

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

W25Q128FV 3V 128M-BIT SERIAL FLASH MEMORY WITH DUAL/QUAD SPI & QPI. Publication Release Date: August 24, 2015 Revision L

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency. SPI compatible modes 0 and 3

Tutorial for MPLAB Starter Kit for PIC18F

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Embedded Software development Process and Tools: Lesson-4 Linking and Locating Software

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

Computer Organization and Components

Building Blocks for PRU Development

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Cellphone Based Device Control With Voice Acknowledgement

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

Measurement and Analysis Introduction of ISO7816 (Smart Card)

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

3. Programming the STM32F4-Discovery

AN10866 LPC1700 secondary USB bootloader

Computer and Set of Robots

Using The PIC I/O Ports

Transcription:

ECE2049: Embedded Computing in Engineering Design A Term Fall 2016 Lecture #6: Memory Organization and Digital I/O using the MSP430F5529 Reading for Today: Davies 7.1 7.4, MSP430x5xx User Guide Ch 12 Reading for Next Class: Davies 7.5 7.9, MSP430x5xx User Guide Ch 12 Homework #2 (on Web): Due Friday 9/9/16 Lab #0 (on web): Report (1 per team) due Tues (9/6) in class Be sure to attach Sign off sheet (Don't print out code) Lab #1 (on web): Pre lab sign off in Lab this week! Last class: Specifics of the MSP430F5529 architecture MSP430F5529 is Little Endian, has Von Neumann architecture This class: Memory organization and digital I/O >> MSP430 family uses Von Neumann architecture >> MSP 430 family contains over 100 versions of this CPU with various memory/ peripheral configurations -- Really a System on a Chip

>> We'll be using MSP430F5529 -- 128 KB Flash memory > Code storage -- 8 KB RAM (+2 KB RAM associated with USB) > Data storage -- LCD controller -- 32-bit Hardware multiplier, Serial interfaces (UART), analog to-digital converter (ADC) and a slew of other peripherals -- Multiple timers, comparator, USB controller, DMA, general IO ports... Memory Organization >> Memory = group of sequential locations where binary data is stored -- In MSP430, each memory location holds 1 byte -- Each byte has unique address which CPU uses to read to and write from that location (think mailbox ) -- Multibyte data is stored Little Endian! (low byte, high byte) >> 2 types of memory: Volatile and Non-volatile Volatile = Loses contents when power removed or interrupted Non-Volatile =Keeps contents when power removed or interrupted

RAM = 8 KB (+2 KB) = DATA memory = Volatile >> Read and Write = retrieving or writing DATA to/from RAM (under programmer control) (MSP430F5529 has a RAM retention low power mode) FLASH = 128 KB = CODE memory (primarily!) = Non-volatile >> Fetch = retrieving of instruction from CODE (Flash) memory (automatic CPU function) >> Flash is writable under program control -- time required to write >> time required to read -- Must be erased in multi-byte segments (e.g 512 bytes) MSP430 is 16 bit microcontroller >> 16 bit word size => 16 bit internal registers >> 16 bit data bus BUT MSP430x5xxx and '6xxx families have and extended 20 bit memory address bus to allow access to up to 1MB of memory >> Now a word about how memory sizes are (mis?) labeled... By JEDEC standard 1 KB = 2 10 bytes = 1024 bytes

IEC standard calls 2 10 bytes = 1024 bytes = 1 kilobinary = 1 KiB = 1 kibibyte >> RAM starts at 02400h, implemented in 2KB banks (sectors) -- Variables used during program execution are stored in RAM >> Our 128 KB of Flash starts at 04400h and ends at 0FFFFh. (Interrupt Vector Table is written within Flash) >> Code is written to Flash when you program the chip from CCS starting at address 04400h (by default, can give compiler directives specify other location) Internal Registers Additionally, inside the CPU, there are sixteen 16-bit register >> Registers R0 R3 have dedicated functions >> Registers R4 R15 are user registers -- Like scratch pad for data values being used by current or recent instructions -- Retrieving an operand from a CPU register is much more efficient than reading it in from memory -- CCS compiler tries to maximize register use >> Whats the deal with the addresses below 00FFFh assigned to peripherals? They are what you use to do IO!!

MSP430F5529 Basic Digital I/O Lowest level of input/output Inputting or outputting logic levels to the pins of the MSP430 package >> Eight independent, individually configurable digital I/O ports >> Ports 1 7 are each 8 bits wide, Port 8 is 3 bits wide >> Each pin of each port can be configured individually as input or output >> Each pin of each port can be individually read from or written to >> Sequential ports can be logically combined to create 16 bit port For example, Port 1 & 2 together are Port A >> Ports 1 and 2 can generate interrupts which are control signals that can be accepted or ignored by the '430 We'll be using interrupts later in the term >> Each port is controlled by six byte addressable (i.e. 1 byte wide) registers >> All the I/O port registers are memory mapped meaning each register associated with an IO port or other peripheral device has a unique address > and in CCS a predefined name (see msp430f5529.cmd and msp430f5529.h) How do you know what the addresses are? The 6 registers controlling the Digital I/O ports are Function Select Register:

Direction Register: Input Register: Output Register: Drive Strength Pull up/down Resistor Enable >> Using the digital I/O ports is conceptually simple... >> Make extensive use of C's Bitwise operations & ~ ^ (and &= = ~=) > Recall Truth Tables for AND (&), OR ( ), NOT (~) and exclusive OR = XOR (^) X Y Z=X & Y X Y W=X Y X C = ~X X Y V=X ^ Y 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0

Ex: Using CCS C configure Port 3 for digital I/O with Pins 1 and 0 as inputs and Pins 7 thru 4 and outputs.