Computing Machinery Chapter 10: Microcontrollers.

Slides:



Advertisements
Similar presentations
Analog-to-Digital Converter (ADC) And
Advertisements

Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Microcontroller – PIC – 4 PIC types PIC architecture
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
EET260: A/D and D/A converters
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
COMP3221: Microprocessors and Embedded Systems Lecture 20: Analog Output Lecturer: Hui Wu Session 2, 2004.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Aztec PC Oscilloscope Michael Mason Jed Brown Josh Price Andrew Youngs.
Data Logger for Water Meter Function Continuously counts pulses from pulse output of the water meter (or other meters with pulse output) and periodically.
Digital I/O Connecting to the Outside World
Digital to Analog Converters
Microcontroller based system design
Microcontroller: Introduction
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Digital Communication Techniques
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
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.
1 Sensors and Measurements Penderia & Pengukuran ENT 164 Signal Processing Elements Hema C.R. School of Mechatronics Engineering Northern Malaysia University.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
4.0 rtos implementation part II
Arduino Josh Villbrandt February 4, Digital Circuits Analog versus digital – What’s the difference? – How to represent an analog signal in a computer?
Input/Output mechanisms
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
1 SERIAL PORT INTERFACE FOR MICROCONTROLLER EMBEDDED INTO INTEGRATED POWER METER Mr. Borisav Jovanović, Prof.dr Predrag Petković, Prof.dr. Milunka Damnjanović,
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
MICROPROCESSOR INPUT/OUTPUT
DLS Digital Controller Tony Dobbing Head of Power Supplies Group.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
EGRE 6311 Midsize Microcontrollers and Microprocessors The 8051 is an example of a small inexpensive microcontroller intended for simple applications.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
Microprocessor-based Systems
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
Presented by Sadhish Prabhu
Digital to Analog Converter (DAC)
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
Chapter Microcontroller
Digital-to-Analog Analog-to-Digital Week 10. Data Handling Systems  Both data about the physical world and control signals sent to interact with the.
Components of a typical full-featured microcontroller.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
Digital-to-Analog Analog-to-Digital
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Digital Signal Processor HANYANG UNIVERSITY 학기 Digital Signal Processor 조 성 호 교수님 담당조교 : 임대현
“Atmega32 Architectural Overview” SIGMA INSTITUTE OF ENGINEERING Prepared By: SR.NO NAME OF STUDENT ENROLLMENT 1 Parihar Shipra A Guided By:-
Components of Mechatronic Systems AUE 425 Week 2 Kerem ALTUN October 3, 2016.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Introduction to Microcontroller Technology
EKT124 Digital Electronics 1 Introduction to Digital Electronics
Popular Microcontrollers and their Selection by Lachit Dutta
Atmega32 Architectural Overview
Microcontroller Applications
Chapter 11: Inter-Integrated Circuit (I2C) Interface
Programming Microcontroller
Introduction to Microprocessors and Microcontrollers
Interfacing Memory Interfacing.
AVR – ATmega103(ATMEL) Architecture & Summary
Presentation transcript:

Computing Machinery Chapter 10: Microcontrollers

Microprocessors vs. Microcontrollers The primary difference between a microprocessor and a microcontroller is that the microcontroller includes more supporting functions such as on-board memory and I/O than the microprocessor. Until recently, microcontroller units (MCU's) were considered less powerful than microprocessors, however, continued development has lead to MCU's that meet or exceed the throughput (number of equivalent instructions per second) of high-end microprocessors. The power of some modern microcontrollers is equal to high- end CPU's but more specific in their designs and applications than general-purpose microprocessors. Microcontrollers offer many application specific features such as I 2 C and CAN bus communications and video controllers. Microcontroller

Embedded Systems An embedded system is a device or module designed for a specific purpose and based on some computational (software modifiable) element. One of the key features of an embedded system is real-time operation.

The Harvard Architecture separates the data and instructions into separate memory units each with their own bus. Besides speeding up the data transfer rate, separating the data from the instructions permits us to implement different bus widths and word sizes for program and data memory space. Harvard Architecture

Digital Signal Processors Digital Signal Processors (DSP's) are types of microcontrollers that are more specialized for a particular application. DSP represent around 20% of the total MCU market. DSP's are particularly well suited to real-time operations in which a data stream, video, audio, etc. is modified in someway as it is passed along to another device or component. Most DSP's are based on the Harvard Architecture. DSP's commonly include analog-to- digital (A/D) conversion for their inputs and digital-to-analog (D/A) conversion of their outputs.

Pulse Width Modulation Pulse Width Modulation (PWM) - Many MCU are designed to generate variable width squarewave signals as shown below. A pulse width modulated (PWM) signal is a squarewave with a varying ratio of high and low logic levels, called the duty cycle. The PWM signal is defined by two parameters, the frequency and the duty cycle. A 10% duty cycle signal is at a logical high 10% of the time and low 90% of the time. The average rate at which the signal oscillates between logic levels is given by the frequency in cycles per second (Hertz).

Digital to Analog Conversion A PWM signal can be filtered using passive electronic components (e.g. an RC [resistor-capacitor] network) to generate a smoothed average voltage level. A controlled voltage level or power level can be delivered using PWM signals.

Serial I/O Interface (UART) The Universal Asnychronous Receiver/Transmitter (UART) is a popular form of serial communication between digital devices. A number of bits are presented to the UART in parallel and are then serialized, transmitted to another UART where they are converted back into a binary vector. The UART specification does not include details of the communication details. In fact, there are several interface standards in common use (e.g. RS232, RS422 and RS485). For embedded systems the RS232 standard is the most popular.

The Serial Peripheral Interface (SPI) This is a communications protocol used on most MCU's as an inexpensive alternative to multiple pin parallel communications. SPI is used for many applications in MCU including memory data block transfers. The SPI interface include a clock line, a data-in, a data-out and a chip enable line, named as, SCLK - serial clock MISO - master input, slave output MOSI - master output, slave input CS - chip select (optional, usually inverted polarity)

Basic-X35 Schematic AT25256

The Inter-Integrated Circuit (I 2 C) computer bus is used to interface many different types of peripherals to MCU's or other embedded systems when a high data throughput is not required. The I 2 C uses bidirectional data and clock lines with open-collector logic. The standard data rate for the I 2 C is 100 kilobits/second. It also support a low-speed 10 Kbits/s or lower. The I 2 C protocol is ideal for sending control signals to remote devices, collecting A/D signals from sensors and accessing slow-speed non-volatile RAM. One of the most valuable features is that periperals can be connected and removed from the I 2 C bus while powered up. This is possible because of the open-collector logic in which a bus line is either set to ground or no-connection. In open-collector circuits, a logical high is achieved by placing pull-up resistor on each open-collector line. I 2 C Communications

Controller Area Nework (CAN) Bus This is a multicast shared serial bus standard. The CAN bus was designed to operate in high noise conditions, which makes it a preferred communications standard for applications involving electrical motors and internal combustion engines. The CAN protocol uses error- correcting codes to automatically detect and recover bit errors in data words. The the full data transfer rate of 1Mbit/s the total length of the CAN network is limited to less than 50 meters.

Analog-to-Digital (ADC) Many of the devices and sensors interfaced to a MCU produce varying voltage levels (analog signals) rather than binary vectors (digital signals). For this reason most modern MCU's include built-in analog-to-digital (A/D) conversion circuits. These circuits accept a voltage level on an input line and generate an internal binary encoded value that corresponds to the magnitude of the voltage.

Aliasing When we choose a sampling rate, we are setting a limit on the maximum frequency (or time rate of change) of the signal that we will be able to measure. Shown below are two signals of different frequencies. The lower frequency signal is being sampled at a rate of 12 samples per cycle of the signal. If we replace this signal with one with a frequency that is 11 times higher we will be sampling this signal a little more that once per cycle. As shown the sampled voltage levels will match those of the lower frequency signal. This effect is called aliasing. To prevent aliasing we need to sample at a rate at least twice as high (in samples per second) at the highest frequency signal we want to measure (in cycles/second).

Digital to Analog (D/A) This is the process of converting a digital (binary encoded) value into an analog voltage level. This operation is much less common on an MCU, but can be implemented using a varying duty-cycle signal and some passive electronics for filtering (see Pulse Width Modulation above). A much better aproach is to use a linear amplifier as a summing circuit, as shown in Figure This is an example of a digital to analog (D/A) circuit called an R2R ladder network.

A prescaler is a circuit that divides an incoming clock signal by a predetermined amount. An N level prescaler is sometimes called a divide-by-N counter. Prescalar

AVR A/D The AVR MCU includes 8 A/D input circuits. These cicuits can operate in two different modes, either single conversion and free run. When in single conversion mode, each conversion must be prompted by the running programming. In free-run mode the A/D conversion is started and will run continuously with updated values being placed in the ADC data register.

BasicX Microcontrollers The BasicX system is the MCU and the software development environment for a PC- compatible desktop computer running the Microsoft Windows operating system. BASIC programs are written and compiled on the PC and downloaded onto the BasicX MCU through a serial interface to an EEPROM or a parallel USB interface (which needs some additional circuitry). As with the AVR and PIC18, the BasicX is in-circuit/FLASH programmable. The BX-24 and BX-35 IC's are depicted in Figure The BX-35 is also available as a surface mount IC. BasicX-35 BasicX-24

The BasicX MCU's offer the following features: 25 I/O Lines BX-35 (16 I/O Lines BX-24) - (17 TTL I/O BX-35) (8 TTL I/O BX-24) - 8 Channel Analog-to-Digital Converters (10-bit) or TTL 32 KB EEPROM (external for BX-35) for program and data storage On-chip RAM 400 bytes Program execution speed 60 microseconds per 16 bit integer add/subtract Serial I/O speed 2400 baud to Kbaud on Com1 300 baud to baud on any I/O pin (Com3) Operating voltage range VDC to 6.0 VDC I/O internal pull-up resistors 120 kΩ maximum Floating point math On-chip multitasking On-chip clock/calendar Built-in SPI interface Parallel or serial FLASH Programmable