Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Embedded Systems Course for Multiple Disciplines

Ali El-Mousa and Ashraf Al-Suyyagh


Computer Engineering Dept., Faculty of Eng. & Tech. University of Jordan
Amman, Jordan
elmousa@ju.edu.jo, a.suyyagh@ju.edu.jo

Abstract— The process and experience of designing and The course and associated laboratory are designed such
developing an embedded systems course that serves different that they cover concepts and topics on the use of embedded
disciplines at the University of Jordan together with its systems in different domains including control,
associated laboratory is reported. The course serves three instrumentation, and embedded processing. This will appeal
different departments with varying requirements and student
to the different backgrounds of the students. The laboratory
initial backgrounds. The stages of the design process of the
course and associated labs are explored. Emphasis is given experiments are quite intensive and are uniquely designed to
throughout to the notion of systems design without losing track reduce the learning curve and provide an enjoyable
of the details involved in the design process. The design experience to the students.
methodology used for the laboratory facilities and the learning The objectives of introducing the course and its
outcomes are explored. accompanying laboratory in the curriculum of computer,
electrical and mechatronic engineering are:
I. INTRODUCTION 1. Introducing the students to the growing importance of the
field of embedded systems; its techniques, applications,
An embedded system is defined as a “system whose principal
concepts and practical implementation.
function is not computational, but which is controlled by a
2. Helping the students grasp the concepts involved in
computer embedded within it” [1]. These types of systems
engineering system design. This is particularly visible during
have become very widely spread in all types of equipment
the project phase at the end of the lab. This particular
whether consumer, industrial or military products. They can
objective is unique as it is rarely possible in an undergraduate
be found in washing machines, microwave ovens, cellular
setting for the students to be able to start and finish a
phones. They are the main subsystem in Programmable Logic
complete working project demonstrating a working prototype
Controllers (PLC) used to control industrial assembly lines
that involves both hardware and software, all in a single
and machinery. Their use has become prevalent in all aspects
course and in a single semester.
of our daily lives. The suggested guidelines for curricula for a
3. Aiding the students in understanding the hardware-
computer engineering program produced by the joint task
software co-design paradigm and the necessity of insuring
force of the IEEE Computer Society and the ACM
compliance.
recommends a minimum of 20 hours of core lectures in
4. Offering practical hands-on experience in building
embedded systems. It also suggests that courses also cover
embedded systems based on programmable devices such as
elective topics in embedded systems [2]. Also, in recognition
microcontrollers. Also, providing experience in the use of
of the importance of the topic in education, for the first time a
digital and analogue devices for interfacing along with the
workshop on Embedded Systems education was organized by
required software control.
the ACM at the end of 2005 [3]. Other disciplines such as
5. Helping the students understand the intricacies involved
Electrical, Software and Mechatronic Engineering in many
in applied embedded systems especially with topics that
universities have also discovered the importance of the topic
involve real time operation and control.
and have incorporated it into their curriculum.
6. Introducing the students practically to the current tools
Towards this end, the Computer Engineering Department
and methodologies used in embedded system design and
of the Faculty of Engineering and Technology at the
development.
University of Jordan has developed a course with a design
This paper outlines the current introduction to embedded
laboratory on embedded systems.
systems course and its accompanying laboratory offered by
The offered course and its accompanying laboratory are the Computer Engineering Department in the Faculty of
designed as introductory suitable for all engineering students Engineering and Technology at the University of Jordan.
from the computer, electrical and mechatronic departments.

978-1-4673-0784-0/12/$31.00 ©2012 IEEE 446


TABLE I. THE AREAS AND TOPICS WHICH THE COURSE ADDRESSES overburdened, and the number of credit hours required for
graduations are shrinking.
General Area and 2. Although the course is introductory, the focus was on
Topic(s)
Field depth rather than breadth. This included in-depth look at
Embedded General CPU architectures, buses, interrupt structures and associated software, real-time issues
architecture, general interfacing, the embedded and requirements, data acquisition systems and their
system level system types (hard, soft and firm) components, advance use of debugging tools and utilities.
Embedded 3. Reinforcing the different topics learned in the core
Embedded machine organization, curriculum by allowing the students to apply them and
architecture,
built-in peripherals, RTL, HW associate them in the course and lab. These include concepts
Internal block
control abstraction layer, I/O relating to electronic circuits used in interfacing,
diagrams
Communications protocols, different communications hardware, digital logic design, signal
Embedded serial interfaces, microcontroller integrity etc.
Communications communications ports, real world 4. The realization that embedded systems designers in the
architectures limitations, types of signal market now utilize advanced platforms with complex
interference capabilities in networking, user interfaces, processing power.
Task scheduling, interrupt structures This puts a burden on the software component side to be able
Real-time to handle such tools and systems.
and latency, software requirements,
embedded systems 5. The fact that students are coming from different disciplines
critical code, multi-tasking
System structure and hardware with slightly varying backgrounds in the prerequisite
Data acquisition materials.
requirements, A/D and D/A,
and embedded Table 1, presents a summary of the subject areas that the
transducer interfacing, signal
systems course covers.
conditioning
Hardware-software interface, co- III. LABORATORY
Software design design, embedded software
requirements architectures, assembly language A. LAB FACILITIES
programming Due to the large demand on the course and lab, special lab
Embedded control External hardware interfacing space and equipment were provided exclusively for its use.
and Real world techniques, different HMI, motor Due to financial constraints which are endemic these days in
interfacing control, PWM techniques the academic sector, and since this is an introductory course
and because of the various different backgrounds of the
II. COURSE STRUCTURE students, ready-made hardware kits were considered for the
Students taking this course come from different disciplines lab together with simple to grasp and learn software tools.
i.e. Computer, electrical, and mechatronic engineering. For all Based on the constraints, it was decided to go with
of them the course is mandatory. However, their backgrounds microcontroller-based embedded systems as a basis as it was
differed which had to be taken into consideration. Students thought that they were easier to grasp for students. The next
were either second or third year as the course is offered early step was to decide on which microcontroller to use. This is a
on. By the time students take this course, all are expected to critical step as the choice of a microcontroller will affect how
have strong background in computer applications, digital the students will react towards the course and the lab. There
design fundamentals electrical circuits, computer are several criteria which ought to be taken into consideration
programming languages, and electronic devices and their use. when making this choice:
However, students from electrical and mechatronic 1. The architecture of the microcontroller: In a practical
engineering lacked previous exposure to assembly language,
hands-on embedded systems course, it is important to
while some students from computer engineering lacked
understand quickly the internal structure as this will allow
exposure to electronics design basics.
proper utilization and usage in the lab. Microcontrollers come
These differences had an impact on the structure of the course in mainly two flavors; CISC or RISC. We opted for a RISC-
since it had to take these differences into consideration. The based architecture as this architecture is simple, the
content had to be based on the common denominator and instruction set architecture does not contain many addressing
where it was necessary to provide introductory background modes and therefore easy to understand, and the instruction
information while each department will supplement the set is limited and straight forward which will allow the
current course with other material using other course students to quickly be able to write control programs and
offerings. reduce the learning curve.
The approach taken in designing the course and 2. H/W peripheral richness: Since the lab experiments cover
accompanying lab took into consideration the following many different topics with different requirements, it is
factors: important to find a microcontroller that has on-board as many
1. The current prevalent academic environments where if not all of the hardware peripherals required such as
resources are a precious commodity, faculty are timer/counters, USART or serial interfaces, A/D converter,

447
PWM generation, etc. This will reduce cost and will allow the reducing the learning curve. Below is a description of the
students to concentrate on the system design. main features of the lab sessions:
3. Cost and popularity: Although cost is not the prime factor Weeks 1 – 4: Introduction to Lab. Topics in the Development
in selecting the microcontroller and it should not become an Environment and Assembly Programming
obstacle for students or faculty, but nevertheless choosing one Since the lab is a co-requisite to the theory class, these
at a reasonable cost is logical. Regarding popularity, it is very sessions start by deeply covering assembly programming and
helpful if the selected controller has a wide base of usage and IDE simulation skills. This will allow lab sessions to follow
popular following on the Internet and is supported by many orderly the theory class. Early lab sessions introduce the
tutorial books and application notes etc. following:
4. Development and debugging tools: These are extremely 1. Rules and regulations governing the lab as well as safety
essential for a successful utilization of the hardware. These precautions.
tools should be very stable, easy to use and provide all the 2. Lab working environment including the hardware kit, the
essential utilities (preferably integrated) to perform programmer, and the MPLAB Integrated Development
development and implementation such as compilers, cross Environment (IDE).
assemblers, full feature debuggers, in-circuit emulators, etc. 3. Target microcontroller addressing modes, internal
5. Performance: The chosen microcontroller should be able registers and memory map.
to run at a suitable level of execution speed to support the 4. The instruction set and assembler directives through
different requirement of the experiments. This means bus example programs. These examples are based on
speeds, instruction cycle time and interrupt latency are factors mathematical grounds: basic arithmetic operations, arrays
that need to be taken into consideration. and BCD with emphasis on conditional, comparison and
Based on the above discussion, we decided to use
repetition techniques as well as the use of look-up tables.
Microchip’s 16 series family of PIC microcontrollers as it is
5. Programming techniques and methodologies with
very suitable for an introductory course for it contains many
different parts with varying complexity yet a simple emphasis on modularity concepts, writing an optimum code
instruction set. and the concept of interrupts.
6. The whole process of installing and configuring the
B. LAB EQUIPMENT software, entering a provided code, compiling, debugging
In order to focus the experiments on the applications and methodologies programming a microcontroller using the
to reduce cost, we opted to buy readymade kits that contained programmer and finally getting the kit to work with the
most of the components necessary to perform the required programmed part to achieve the objective.
experiments but was also expandable. After reviewing several At the end of the lab, students are presented with lab
kits available in the market, we selected a kit called the sheets loaded with questions which the student will be able to
Millennium board. We also selected Microchip’s PIC Start solve after running and simulating the example codes.
Plus [4] as a means for PIC programming. Later, Microchip’s Weeks 5 – 8 Introduction to Embedded Systems
PICDEM™ Mechatronic demonstration board [5] and the Hardware/Software Design and Basic HMI
ICD2 debugger/programmer [6] were also acquired to These lab sessions concentrate on empowering students with
complement the previous set of lab kits. These are used logical and analytical skills to solve real life system design
together with PCs that contain the MPLAB IDE development problems. This part is concerned with introducing the
environment [7] and the necessary software compilers and following:
debuggers. 1. Off-the-shelf components and ICs covering regulators,
resonators, encoders, decoders, flip flops, 7-segments, LEDs,
C. Lab Experiments
switches, push buttons, LCDs and keypads. This will ensure
To complement and practically clarify the ideas presented that all students from different backgrounds are brought to the
in the course, a set of experiments have been devised that same level of knowledge-base required.
closely follow the plan laid down for the course. Each student 2. Illustrating a simplified example drawn from an industrial
has access to an embedded system design kit plus a PC automation background such as a filling machine.
workstation. Each lab session is three hours long. Due to the
3. Guiding students through the steps of system requirement
varying backgrounds of the students, a specific style for
experiments has been adopted. Early lab experiments are analysis and definition, program flow analysis and flowchart
divided into two sections; the first provides a complete design, system and subsystem design.
working program fully commented that can be run directly on 4. Coding the design and building the hardware.
the target processor to accomplish a specific task. This is 5. Familiarizing the students with the concept of unit and
followed by questions that probe the student’s understanding system testing through simulation.
of the inner workings of the implemented task. The second Weeks 9 – 12 Introduction to Embedded Systems Peripherals
section will either require the students to use the program of Through these set of lab sessions, embedded systems
the first part as a template and add extra processes and hardware as well as the microcontrollers built in peripherals
features, or it will require them to rewrite the code to are emphasized. These experiments are concerned with the
accomplish the same task using a different available following:
methodology. We have found that this style greatly helps in

448
1. Introducing the built-in 8/16 bit timers which are the issue of project choice. This was due to the requirement
employed in various examples such as digital clocks, time that each student or group had to chose a different project.
lapse measurements and timed interrupts. This, overtime, led to the fact that many of the well-known
2. Intersystem communication in modern embedded ideas got selected and the students quickly ran out of unique
systems, the USART peripheral as an example covering simple ideas.
Master/Slave communication, and communicating with PC The approach later adopted was to provide all students
through hyper terminal with a unified basic project idea which students will develop
3. Introducing the A/D module, software and hardware Pulse and submit as a minimum. No further restrictions were
Width Modulation (PWM) techniques in an example which imposed. This allowed the project to be of a highly
drives a DC motor based on the temperature acquired and competitive nature. Students submitting projects fulfilling the
digitized through the ADC in an open loop control scenario. above criteria with fully working extra features and adhering
Optical speed sensor circuit are presented and used to to best system design practices were awarded bonus marks.
measure the speed of rotation. Projects with similar features were weighed against each other
in terms of code simplicity, program space, efficiency and
D. Lab Project hardware cost. Projects following optimum system design and
To make it possible for the students to grasp and practically implementation methodologies were also rewarded.
implement the ideas learned during the course and lab However, two main problems were observed in this
sessions, the students are required to design, implement and approach, first of which is the similar feature set which the
then demonstrate a working embedded system project. Two students come up with. This was a clear sign of the limited
approaches to the format of the project were tested: creativity that this approach forces. Sadly, we have also
The first approach had the format for the project quite observed some occurrences of plagiarism. We sought to
loose; the student is allowed to choose his/her own project address and limit this problem by introducing a project
with a minimum of constraints. The motivation for adopting timeline where students should submit their project in phases.
such an approach is as follows: This will allow us to closely monitor student’s progress from
1. Encourage and allow the students to use their own the early stages and help those with difficulties rather than
ingenuity, creativity and ideas. letting them revert to plagiarism.
2. Allow the students to be exposed to quite a variety of
applications and implementations as the students demonstrate IV. CONCLUSION
and present their work in front of others. In this paper, the importance of introducing embedded
3. Let the students take direct full control of their projects systems in current engineering curricula is highlighted. The
from idea to concept to design to final implementation process and experience of designing and developing an
therefore mimicking real-life situations. embedded systems course that serves different disciplines with
4. Allow the students the freedom to use their own tools, different backgrounds and requirements at the University of
choose their own work methodology and their own system Jordan together with its associated laboratory is reported.
design criteria. Emphasis is given throughout to the design methodology used
5. Allow students to work in groups. for the laboratory facilities and the learning outcomes are
However, this approach presented some problems: Due to explored.
the openness and few restrictions imposed, it was quite
difficult to provide the required infrastructure to support the REFERENCES
high diversity of requirements to support the different [1] T. Wilmshurst, An Introduction to the Design of Small-Scale
projects. However, most students were so enthusiastic that Embedded Systems, Palgrave, 2001.
they supplied their own supplies at their own expense. We [2] IEEE Computer Society/ACM Task Force on Computing Curriculum,
recognized that this problem caused some concern to some "Computing Curricula—Computer Engineering, Final Report"
http://www.eng.auburn.edu/ece/CCCE/. 12Dec. 2004.
students, but we solved it by making things clear from the
[3] D. J. Jackson and P. Caspi, “Embedded systems education: future
beginning regarding our abilities and left the decision to directions, initiatives, and cooperation”, ACM SIGBED Review, Vol.
proceed with the project to the students. Since the project is 2 , Issue 4, pp. 1-4, October 2005.
solely the responsibility of the student, time was also of [4] PICSTART Plus Website, Microchip Technology Inc,
concern due to the large number of students and our limited http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE
&nodeId=1406&dDocName=en010020, 2009.
space and equipment in the lab. This was solved by
[5] PICDEM™ Mechatronics demonstration board Website, Microchip
scheduleding lab openings throughout the day all week long. Technology Inc,
This approach was tested for two years with mixed results. http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE
For many students this approach has proved very successful &nodeId=1406&dDocName=en023837, 2009.
as they managed to produce some very interesting and [6] MPLAB ICD 2 Website, Microchip Technology Inc
sometimes even ingenious projects using low-cost hardware http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE
&nodeId=1406&dDocName=en010046&part=DV164005, 2011.
platforms. For others, the approach proved difficult. From our
[7] MPLAB IDE Website, Microchip Technology Inc,
monitoring and requested anonymous written feedback, we http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE
concluded that the majority of the problems were to do with &nodeId=1406&dDocName=en019469&part=SW007002, 2011.

449

You might also like