DOC PREVIEW
UNCC ECGR 4101 - Introduction to Embedded Systems

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introduction to Embedded SystemsTodaySlide 3Definition of an Embedded ComputerA Customer ViewMicrocontroller and Starter KitM16C DemonstrationSource CodeWhy Are We Using Such a Small Processor?Small Computers Rule The MarketplaceOptions for Implementing Embedded SystemsCourse OverviewMicrocontroller vs. MicroprocessorDesigning a Microcontroller into a SystemPower SupplyBatteriesBattery PowerClock Signal GeneratorReset ControllerResult of ResetMemoryDigital InterfacingAnalog InterfacingMore Analog InterfacingCommunicationsMiscellaneousWhy Are We…?Why Are We Supposed to Read So Much?Why So Much Work?Introduction to Embedded SystemsLecture 1These lecture notes created by Alex Dean, NCSUEmbedded Systems 1-2TodayWhat Are Embedded Systems?Why Are We ….?Course OverviewIntroduction to Microcontroller-based Circuit DesignEmbedded Systems 1-3Embedded Systems 1-4Definition of an Embedded ComputerComputer purchased as part of some other piece of equipment–Typically dedicated software (may be user-customizable)–Often replaces previously electromechanical components–Often no “real” keyboard–Often limited display or no general-purpose display deviceBut, every system is unique -- there are always exceptionsEmbedded Systems 1-5A Customer ViewReduced CostIncreased FunctionalityImproved PerformanceIncreased Overall DependabilityEmbedded Systems 1-6Microcontroller and Starter KitMitsubishi Semiconductors is now “Renesas”M16C/26 family of microcontrollers–M30626–32K RAM, 384K FlashSKP = starter kit MDS = Microcontroller Data Sheet = M16C_Hardware_Manual_Rev0.9.pdfEmbedded Systems 1-7M16C DemonstrationConfiguring I/O ports–Input: switches–Output: LEDsEcho switch state on LEDsHuman response time analysis–How quickly can a person press a switch after seeing a light?Processor response time analysis–How quickly does the processor respond to the switch being pressed?Processor speed evaluation–How much work can the processor do in that time?Embedded Systems 1-8Source Code#include "stdio.h"#include "sfr626.h"#include "SKP_LCD.h"#define RED_LED (p8_0) /* from board data sheet */#define YEL_LED (p7_4) #define GRN_LED (p7_2) #define LED_ON (0) /* 0 is ON for LEDs (active-low) */#define LED_OFF (1)#define DIR_IN (0)#define DIR_OUT (1)#define SW1 (p8_3)#define SW2 (p8_2)#define SW3 (p8_1)void init_switches() { pd8_1 = pd8_2 = pd8_3 = DIR_IN;}void init_LEDs() { pd8_0 = pd7_4 = pd7_2 = DIR_OUT; RED_LED = YEL_LED = GRN_LED = LED_ON; RED_LED = YEL_LED = GRN_LED = LED_OFF; }void test_switches(void) { while (1) { RED_LED = (!SW1)? LED_ON : LED_OFF; YEL_LED = (!SW2)? LED_ON : LED_OFF; GRN_LED = (!SW3)? LED_ON : LED_OFF; }}void main () { char buf[9]; long int i, r=12345; init_switches(); init_LEDs(); InitDisplay();#if (1) test_switches();#endif DisplayString(LCD_LINE1, "Response"); DisplayString(LCD_LINE2, " Timer "); while(1) { for (i=0; i<200000+(r%50000); i++) ; i=0; RED_LED = YEL_LED = GRN_LED = LED_ON; while (SW1) i++; #if (1) sprintf(buf, "%8ld", i); DisplayString(LCD_LINE1, buf); DisplayString(LCD_LINE2, "iters. ");#else sprintf(buf, "%8.3f", i*39.1/287674); DisplayString(LCD_LINE1, buf); DisplayString(LCD_LINE2, "millisec");#endif RED_LED = YEL_LED = GRN_LED = LED_OFF; r=0; while (!SW1) /* wait for switch to come up */ r++; }}Embedded Systems 1-9Why Are We Using Such a Small Processor? I’ve learned that 8 bits will never go away. Ever. Analysts and pundits have told me they see 8 and 16 bits disappearing over the next year or two, but developers disagree. I’m convinced we’re on the brink of an explosion in embedded systems, with embedded processing filling every conceivable niche in our lives. Some of this will be the Internet appliances whose hype saturates all media channels. Much more will be tiny bits of processing, from smart tools to clever pens and intelligent wires. None of these needs a 32 bit monster.Jack GanssleEmbedded Systems 1-10Small Computers Rule The MarketplaceEmbedded market growing (revenue up 17% - 30% per year)PC market is saturated (US revenue 12/2000 down 30% from 12/1999)Global Microcontroller Market Share by Revenue (1999)4 bit6%16 bit20%32 bit6%DSP31%8 bit37%Global Microcontroller Market Share by Volume (1999)4 bit19%8 bit62%16 bit9%32 bit2%DSP8%Embedded Systems 1-11Options for Implementing Embedded SystemsImplementation DesignCostUnit CostUpgrades & BugFixesSize Weight Power SystemSpeedDiscrete Logiclow mid hard large high ? very fastASIChigh ($500K/ mask set)very lowhard tiny - 1 dievery low low obscenely fastProgrammable logic – FPGA, PLDlow mid easy small low medium to highvery fastMicroprocessor + memory + peripheralslow to midmid easy small to med.low to moderatemedium moderateMicrocontroller (int. memory & peripherals)low mid to loweasy small low medium slow to moderateEmbedded PClow high easy medium moderate to highmedium to highmoderateDedicated HardwareSoftware Running onGeneric HardwareEmbedded Systems 1-12Course OverviewIntroduction to Embedded Systems M30626 Processor–M16C Instruction Set Architecture–Circuit DesignProgramming–Assembly Language Programming –C Programming Review–C and the CompilerSoftware Development–Debugging–Simulation Design and Debugging•Interfacing –Using and Programming Interrupts–Digital I/O Peripherals: General Purpose, T/C and PWM–Analog I/O Peripherals–Serial Communications and Peripherals•Optimizations–Performance Analysis–Power Analysis•Multithreaded Systems–Threads, Tasks and Simple Scheduling–Real-Time Operating Systems–Threaded Program DesignEmbedded Systems 1-13Microcontroller vs. MicroprocessorMicrocontroller has peripherals for embedded interfacing andcontrol–Analog–Non-logic levelsignals–Timing–Communications•point to point•network–Reliability and safetyEmbedded Systems 1-14Designing a Microcontroller into a SystemPower supplyClock signal generatorReset controllerMemory Digital interfacingAnalog interfacingCommunicationsEmbedded Systems 1-15Power SupplyWhat do we need (voltage and current)? Look at datasheet for voltage and current for microcontroller and other circuits–Table 1.18.2 Recommended Operating Conditions (p. 171-MDS)•Supply voltage: 2.7 V <= VCC <= 5.5 V–Table 1.18.5 Electrical Characteristics (p. 173 - MDS)•Supply current typically 28.0 mA, max 38.0 mA (VCC = 5.0 V, TAmbient = 25 C, f(XIN) = 20 MHz)–Don’t confuse with Table


View Full Document

UNCC ECGR 4101 - Introduction to Embedded Systems

Documents in this Course
Load more
Download Introduction to Embedded Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to Embedded Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to Embedded Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?