UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017

Similar documents
UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING B.ENG (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATION SEMESTER /2016

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING MSC SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2016/2017

EEE394 Microprocessor and Microcontroller Laboratory Lab #6

EXAMINATION PAPER EMBEDDED SYSTEMS 6EJ005

Interrupts on PIC18F252 Part 2. Interrupts Programming in C Language

Interrupts on PIC18F252 Part 2

Dept. of Computer Engineering Final Exam, First Semester: 2016/2017

CORK INSTITUTE OF TECHNOLOGY INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ. Electrical and Electronic Engineering

Using Timers of Microchip PIC18F Microcontrollers

Cork Institute of Technology. Autumn 2006 Microcomputer Applications (Time: 2 Hours)

PIC Microcontroller Introduction

Bachelor of Engineering in Computer and Electronic Engineering

ELE4. ELECTRONICS Unit 4 Electronic Control Systems. General Certificate of Education June 2005 Advanced Level Examination

PIC16F87X. 28/40-pin 8-Bit CMOS FLASH Microcontrollers. Devices Included in this Data Sheet: Pin Diagram PDIP. Microcontroller Core Features:

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

ootbrobotics.com Electronics and Robotics LLC

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

Laboratory Exercise 5 - Analog to Digital Conversion

University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory

PIC Serial Peripheral Interface (SPI) to Digital Pot

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

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

CN310 Microprocessor Systems Design


Laboratory 9. Programming a PIC Microcontroller - Part I

Microcontroller Overview

Introduction to Embedded Systems

CENG-336 Introduction to Embedded Systems Development. Timers

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

Getting acquainted with the development tools June 27, 2006 ELE492 Embedded System Design Exercise 1

SOLUTIONS!! DO NOT DISTRIBUTE PRIOR TO EXAM!!

Locktronics PICmicro getting started guide

EXPERIMENT 4: Parallel Input/Output. Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing

Outline. Micriprocessor vs Microcontroller Introduction to PIC MCU PIC16F877 Hardware:

evsjv `k cigvyy kw³ Kwgkb BANGLADESH ATOMIC ENERGY COMMISSION

The University of Texas at Arlington Lecture 21_Review

n/a PIC12F629-I/P (RC) n/a PIC12F629-I/SN (RC) n/a PIC12F675-I/P (RC) n/a PIC12F675-I/SN MICROCONTROLLER (RC)

EMBEDDED SYSTEMS PART A UNIT-1

Flow Charts and Assembler Programs

Professor E. Ambikairajah UNSW Sydney

ECE Senior Project Status Report. for. Scalable Regulated Three Phase Rectifier. September 21, Prepared by: Tyler Budzianowski.

/*Algorithm: This code display a centrifuge with five variable speed RPM by increaseing */

ARDUINO MEGA INTRODUCTION

Section 9. Watchdog Timer (WDT)

AVR Microcontrollers Architecture

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Week1. EEE305 Microcontroller Key Points

Unit 2. Computer Control. PIC stands for PROGRAMMABLE INTERFACE CONTROLLER. A PIC chip takes in input signals and then controls output transducers

Input/Output Ports and Interfacing

AT89S8252 Development Board V1.0. Manual

ME 6405 Introduction to Mechatronics

UNIVERSITY OF ULSTER UNIVERSITY EXAMINATIONS : 2001/2002. Semester 2. Year 2 MICROCONTROLLER SYSTEMS. Module Code: EEE305J2. Time allowed: 3 Hours

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

ECE 354 Computer Systems Lab II. Interrupts, Strings, and Busses

Microprocessors B (17.384) Spring Lecture Outline

Design Document. May Logging DC Wattmeter. Team Member: Advisor : Ailing Mei. Collin Christy. Andrew Kom. Client: Chongli Cai

Arduino Uno R3 INTRODUCTION

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Embedded System Design

Microprocessors/Microcontrollers

MC68HC908GR8A MC68HC908GR4A Data Sheet

Part B Questions. Unit I

Implementation of Temperature Sensor on PICM4520 Microcontroller

DATA ACQUISITION SYSTEM

EasyPIC5 Development System

ME 515 Mechatronics. A microprocessor

PIC Discussion By Eng. Tamar Jomaa

Chapter 11: Interrupt On Change

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12

In Class Assignment 2

Further Programmable Logic Controllers (PLCs)

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Microcontroller Based Automatic Temperature Control System

SBR The Chameleon Converter II

NH-67, TRICHY MAIN ROAD, PULIYUR, C.F , KARUR DT. DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING COURSE MATERIAL

EE6008-Microcontroller Based System Design Department Of EEE/ DCE

Microprocessors and Interfacng. Question bank

Laboratory 10. Programming a PIC Microcontroller - Part II

Rewa Engineering College, Rewa. Rewa Department OF Electrical Engineering

MICROCONTROLLERS 8051

Accurate Time and Interrupts

Introduction to Mechatronics and the Mechatronic Design Center Microchip Technology Incorporated. All Rights Reserved. 1

Section 9. Watchdog Timer (WDT) and Power-Saving Modes

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

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

Mercury System SB310

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

Basic Components of Digital Computer

Speed Control of a DC Motor using Digital Control

Introducing Microcontrollers System Design

SH69P48A EVB. Application Notes for SH69P48A EVB SH69V48A JP2 J4(ICE_J4) S1 IDD TEST JP1 74HC273 JP4 JP3 74HC273 JP6 STKOVE JP7 SW1 J5(ICE_J5)

These 3 registers contain enable, priority,

AKKON USB CONTROLLER BOARD

Learning Objectives:

VALLIAMMAI ENGINEERING COLLEGE

Introduction to ARM LPC2148 Microcontroller

ECE 354 Introduction to Lab 2. February 23 rd, 2003

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

LIN bus board datasheet EB

Hardware Interfacing. EE25M Introduction to microprocessors. Part V. 15 Interfacing methods. original author: Feisal Mohammed

Transcription:

TW34 UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BEng(Hons) Electrical and Electronics Engineering SEMESTER 1 EXAMINATION 2016/2017 INTERMEDIATE EMBEDDED SYSTEMS MODULE NO: EEE5004 Date: Thursday 12 January 2017 Time: 10.00 12.00 INSTRUCTIONS TO CANDIDATES: There are 6 questions. Answer 4 questions. All questions carry equal marks. Marks for parts of questions are shown in brackets. This examination paper carries a total of 100 marks. All working must be shown. A numerical solution to a question obtained by programming an electronic calculator will not be accepted. Extracts from the PIC18F452 data sheet is provided at the back of the paper containing Figures 1 through to 7.

Page 2 of 11 1. Digital Input /Output. An embedded system uses a PIC microcontroller to interface to two buttons and two LEDs. The connections as given below: Button 1 Button 2 LED1 LED2 PORTD bit-4 PORTB bit-5 PORTB bit-6 PORTB bit-7 The buttons and LEDs are connected to the microcontroller in active high mode. The LEDs require a forward current of 22mA, and have a forward voltage of 2.1V. The microcontroller is supplied by a 5V voltage. a) Draw the circuit diagram implementing for this design. b) Determine the values of any components required for the design. c) Explain using C statement how you would: i) Initialise the system. ii) Set and clear an LED without affecting the status of other pins iii) Read the status of the buttons 2. a) When you are designing the embedded software, you should try to break the program down along device lines. It is usually a good idea to associate a software module called a device driver with each of the external peripherals. Describe how you would implement this approach and outline the benefits that can be gained. b) Before the actual coding takes for the design of embedded software we can use several design methods to aid the understanding of the design at a high-level. Describe the following embedded system design methods: i) Flow chart ii) Pseudocode iii) Structure diagrams

Page 3 of 11 Please turn the page 3. a) A common way of designing complex software applications is by using a state machine. Describe what a state machine is and outline the benefits of its use. [10 marks] b) An embedded system is to control the operation of a security door. The system has four buttons to control the operation of the door, Open, Close, Lock, and Unlock. The Lock, and Unlock buttons are only operational when the door is closed. And the door can only be opened after it has been unlocked. i) Develop a state machine diagram to represent the system. ii) Write C code showing the implementation of the state machine. 4. a) A simple way to create a delay in C code is to use a for loop. Discuss the advantages and disadvantages of implementing a delay using this technique. Also explain the instances when its use is appropriate. b) The 16-bit timer of a PIC18F452 on TMR0 is configured to generate an interrupt on each timer count overflow. If the clock frequency used for the microcontroller is 8 MHz and the timer module is configured with the pre-scaler enabled and the prescaler bits set as 010. Calculate the period of the interrupt that will be generated. Show all your working and considerations. c) The PIC18F452 has a 16-bit timer, Timer1 but the data bus is only 8-bits wide. Explain how a 16-bit timer read / write is carried out. Please turn the page

Page 4 of 11 5. a) What is meant by TAD in relation to a Microchip microcontroller b) An ADC is using internal voltage references of 5V and 0V. If the ADC has a resolution of 10-bits what would be the result of an ADC conversion if the voltage being measured is 1.425 V. Give your answer as a hexadecimal number. c) A microcontroller application is required to process an analogue signal with the conditions given below. The microcontroller to be used is the PIC18F452 having a system clock of 8MHz The analogue signal is connected to AN0 Pin AN1 will be used as a digital output pin External voltage references of for V+ and V- will be used. The ADC module is switched on but idle. The A/D Clock source must be selected to give the minimum TAD requirement (1.6us). The required A/D result is just 8-bits. Determine the settings of the two A to D Control registers (ADCON0, ADCON1) to implement the above. Give explanations for your choice of settings and show any necessary calculations. [15 marks] 6. a) Describe what is meant by switch bounce and explain why this can be a problem when interfacing buttons to a microcontroller. b) The problem of button de-bounce can be avoided in hardware using analogue filtering technique. i) Explain with the aid of a circuit diagram how this technique operates.

Page 5 of 11 ii) Calculate the values of components required if the actual bounce time for the switch is 10ms and it is connected to a 5V power rail. END OF QUESTIONS Data Sheet Information for the PIC18F452 Microcontroller Fig 1 Timer0 Block Diagram

Page 6 of 11 Fig 2 Timer0 Control Register

Page 7 of 11 Fig 3 INTCON register

Page 8 of 11 Fig 4 PIC18F452 Pinout Fig 5 ADC Block diagram

Page 9 of 11 Fig 6 ADCON0 Register

Page 10 of 11 Fig 7 ADCON1 Register

Page 11 of 11