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

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

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

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

Interrupts on PIC18F252 Part 2. Interrupts Programming in C Language


Interrupts on PIC18F252 Part 2

Locktronics PICmicro getting started guide

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

Laboratory Exercise 5 - Analog to Digital Conversion

evsjv `k cigvyy kw³ Kwgkb BANGLADESH ATOMIC ENERGY COMMISSION

The University of Texas at Arlington Lecture 21_Review

Chapter 13. PIC Family Microcontroller

Bachelor of Engineering in Computer and Electronic Engineering

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

CENG-336 Introduction to Embedded Systems Development. Timers

Week1. EEE305 Microcontroller Key Points

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

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

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

Using Timers of Microchip PIC18F Microcontrollers

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

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

Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

Microcontroller and Embedded Systems:

EMBEDDED SYSTEMS PART A UNIT-1

Programming 8-bit PIC Microcontrollers in С

PIC DESIGN (version 1) 2/11/2009

PIC Microcontroller Introduction

Lecture (02) PIC16F84 (I)

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

Microcontroller Based Automatic Temperature Control System

ARM Microcontroller Interfacing - Warwick A. Smith ISBN Elektor. Table of Contents

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

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

EE6008-Microcontroller Based System Design Department Of EEE/ DCE

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

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

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)

MICROPROCESSORS A (17.383) Fall Lecture Outline

HOURS SYLLABUS

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

Microcontroller Overview

The Atmel ATmega328P Microcontroller

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

Department of Electronics and Instrumentation Engineering Question Bank

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

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Embedded Systems Programming and Architectures

ARDUINO MEGA INTRODUCTION

Laboratory 9. Programming a PIC Microcontroller - Part I

AN10210 Using the Philips 87LPC76x microcontroller as a remote control transmitter

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

CSE 466 Exam 1 Winter, 2010

Part B Questions. Unit I

MICROCONTROLLER S PROGRAMMER

1. Attempt any three of the following: 15

PIC18F452 Timer adjustment

DPScope SE Programming Interface Description

AVR Microcontrollers Architecture

Power Driver 16 v2. Version 2.0 July 5, 2017

ARM Microcontroller Interfacing Hardware and Software

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

Goal: We want to build an autonomous vehicle (robot)

Arduino Uno R3 INTRODUCTION

Introduction to ARM LPC2148 Microcontroller

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

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

EasyPIC5 Development System

These 3 registers contain enable, priority,

PIC Discussion By Eng. Tamar Jomaa

DoIP Interfacer System: A Low-Cost Alternative to Computer for Basic Network Communication in LAN Environment

Chapter 11: Interrupt On Change

Hello, and welcome to this presentation of the STM32 Reset and Clock Controller.

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

PRODUCT PREVIEW TNETV1050 IP PHONE PROCESSOR. description

DGBV-EP DIGITAL GENERATOR AND GENERATOR-TRANSFORMER UNIT PROTECTION. Field of application

Input/Output Ports and Interfacing

ADC to I 2 C. Data Sheet. 10 Channel Analog to Digital Converter. with output via I 2 C

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

Embedded System Design

AKKON USB CONTROLLER BOARD

The Freescale MC908JL16 Microcontroller

SRI VENKATESWARA COLLEGE OF ENGINEERING

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

Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their

HC12 Built-In Hardware

Embedded Systems Module. 6EJ505. C Tutorial 3: using the ICD3 rev tjw

Speed Control of a DC Motor using Digital Control

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

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Lecture (04) PIC 16F84A programming I

Rewa Engineering College, Rewa. Rewa Department OF Electrical Engineering

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

PIC Serial Peripheral Interface (SPI) to Digital Pot

Capture Mode of Pic18F252

8051 Microcontroller

EB-51 Low-Cost Emulator

Transcription:

UNIVERSITY OF BOLTON TW59 SCHOOL OF ENGINEERING B.ENG (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATION SEMESTER 1-2015/2016 INTERMEDIATE EMBEDDED SYSTEMS MODULE NO: EEE5004 Date: Thursday 14 January 2016 Time: 10:00-12:00 INSTRUCTIONS TO CANDIDATES: There are SIX questions. Answer ANY FOUR questions. All questions carry equal marks. Marks for parts of questions are shown in brackets. Electronic calculators may be used provided that data and program storage memory is cleared prior to the examination. CANDIDATES REQUIRE: Data Sheet (attached).

Page 2 of 12 Q1. 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 PORTB 0 Button 2 PORTB 1 LED1 PORTB 2 LED2 PORTB 3 The buttons and LEDs are connected to the microcontroller in active low mode. a) Draw the circuit diagram required for this design. b) Determine the values of any components required for the design. c) Write a C function to initialise the system. d) Write a C function to set or clear an LED. e) Write a C function to read the status of the buttons. Total 25 marks Please turn the page

Page 3 of 12 Q2. 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. i) Show a diagram illustrating this approach when designing software. ii) Discuss the advantages of taking this approach when designing software. b) Describe the following embedded system design tools i) Flow chart ii) Pseudocode iii) Structure diagrams Total 25 marks Please turn the page

Page 4 of 12 Q3. a) Describe a state machine and outline the benefits of using them in an embedded system design. b) A motor used to drive a conveyor belt is to be controlled by a software algorithm. Three buttons are used to control the conveyor belt as listed below: StopButton Stops the conveyor belt MoveForward Makes the conveyor belt move forward MoveBackward Makes the conveyor belt move in reverse The motor must be protected from overload and shock by preventing the operator from being able to make the conveyor belt move in the opposite direction to which it is currently operating in software. i) Develop a state machine diagram to represent the system. ii) Write C code implementing the state machine. Total 25 marks Please turn the page

Page 5 of 12 Q4. a) There are two common methods to insert a delay in our code the for loop or a timer. Discuss the advantages and disadvantages of these methods. b) The 16-bit timer of a PIC18452 on TMR0 is configured to generate an interrupt on each timer count overflow. If the clock frequency used for the microcontroller is 4 MHz and the timer module is configured with the prescaler enabled and the prescaler bits set as 101. 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. Total 25 marks Please turn the page

Page 6 of 12 Q5. a) Many embedded applications often need to acquire real time world signals. This function is performed using an analogue to digital converter (ADC). One common method is the process of successive approximation. Describe the process of successive approximation. b) 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 16MHz The analogue signal is connected to AN5 Pin AN6 will be used as a digital output pin External voltage references of +1.5V fed into pin AN3 and +0.5V fed into pin AN2. 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 upper two bits of the 10-bit A/D Result are stored in the lower two bits of ADRESH register and the lower byte of the A/D result-value stored in ADRESL register. Determine the settings of the two A to D Control registers (ADCON0, ADCON1) to implement the above. Give explanations for your choice of settings. [15 marks] Total 25 marks Please turn the page

Page 7 of 12 Q6. Matrix Keypad Many embedded applications require devices to accept user input. One such devices is the matrix keypad and the liquid crystal display. a) Show a diagram of a 4 by 4 matrix keypad. b) Describe how the matrix keypad would be interfaced to a microcontroller. Include in your description the operation of reading one of the keys. Which is the recommended port to use on a PIC microcontroller and why? c) Show C or pseudo code to demonstrate the algorithm required to read the keys from a matrix keypad. Total 25 marks END OF QUESTIONS Data Sheet Information for the PIC18F452 Microcontroller

Page 8 of 12 Fig 1 Timer0 Block Diagram Fig 2 Timer0 Control Register

Page 9 of 12 Fig 3 INTCON register

Page 10 of 12 Fig 4 PIC18F452 Pinout Fig 5 ADC Block diagram

Page 11 of 12 Fig 6 ADCON0 Register

Page 12 of 12 Fig 7 ADCON1 Register