SlideShare a Scribd company logo
1 of 13
ELE2303 Assign 1 Page | 1
ELE2303 Embedded Systems Design
Assignment 1 – Gas Monitor Unit Stage 1
Description Marks out of Wtg (%) Due date
Gas Monitor Unit – Stage 1 200 20 28/04/14
Purpose
This assessment is intended to evaluate the student’s capability
in selecting and configuring a
microcontroller unit (MCU), designing simple interface
hardware and writing subroutines to
operate those interfaces.
Please note – the purpose of studying a ‘design’ course like
this, is that you learn how to design
hardware and write programs to solve new problems. This
requires you to understand the how
individual parts of the microcontroller function and how to
control them with a program. You are
expected to link together pieces of interface circuitry and
combine segments of program you
learn about in the course materials, into a structured solution.
Do not expect to find a ‘solution’
to this problem on the internet. Expect that you have to create
it!
Grading of this assessment
This task will be assessed against the course objectives 1, 2, 3,
4, 6 and 7. This assessment will
be graded (F, C, B, A, HD) using a rubric marking scheme
against criteria such as: the
appropriate selection and use of microcomputer hardware; the
design of I/O hardware to meet a
specification; implementation of software to meet a
specification; quality of documentation
including organisation of ideas and format; spelling, grammar
and punctuation. Note - this
course is a communications benchmark course, hence marks will
be awarded for the quality of
documentation.
Assignment Requirements
This assessment requires students to meet the requirements the
specification below. Select a
suitable microcontroller from the PIC18 family, design simple
interface hardware, write
and test some C programs (subroutines) to operate the hardware
interface and then document
the hardware and software as a proposed design. Software is to
be written in C using the
MPLAB X IDE. You must create an MPLAB X project which
may include one or more C
source files. The testing is to be completed using either: the
Oshonsoft PIC18 simulator or the
MPLAB X simulator.
There is NO requirement to assemble any hardware, or layout a
PCB for this assignment.
The circuit design for the hardware may be drawn using
electronics CAD software, OR hand-
drawn and scanned, for inclusion in the documentation. The
‘hardware’ can be successfully
configured and simulated on the Oshonsoft PIC18 simulator or
the MPLAB simulator. A few
screen captures of the software under-going testing are to be
included in the documentation.
ELE2303 Assign 1 Page | 2
Each student is required to submit:
1. A report in PDF format which includes:
a brief introduction (100 – 150 words) outlining the design
requirements based on the
specification.
– 300 words) explaining the key
elements of the design and
how they meet the specification, plus include a single page
circuit diagram of the
proposed hardware. You must specify all part numbers and the
values of any discrete
components used (ie. resistors, capacitors, crystals). Show any
calculations you make to
check the scaling and resolution of analog input values.
– 300 words) briefly
explaining each of the
subroutines and how they meet the specification, plus include a
copy of the C source
code showing all the subroutines.
tware (250 – 300
words) explaining what is
working and isn’t working, plus include a few screen captures
of the Oshonsoft or
MPLAB X simulator showing the software under-going testing.
The document should be formatted as a report and must
include:
-headings
captions
eader of the
document
document
2. A copy of the program source file(s) as:
(directory) you created for the
assignment
Notes on plagiarism or collusion
This is an individual assessment. Students must write and
submit their own hardware design,
program and documentation. Students may discuss concepts and
methods of implementation
with others, but it is forbidden to share circuits and source code
or copy another student’s
work. Discuss how to do it, but come up with your own work.
For this sort of assessment two or more students submitting the
same circuit or program may be
considered as plagiarism or collusion. There are several ways
that each part of a program may be
implemented, so two ‘independently’ written programs are
highly unlikely to be identical.
“Working together on the assignment” should not result in
exactly the same design or program.
Also re-using assignment work from past years is also not
allowable and easy to identify.
Plagiarism is very easy to identify!
Students are also warned that paying someone else to do your
assignment is considered a serious
breach of regulations. This too is very easy to identify!
ELE2303 Assign 1 Page | 3
The System Specification
Outline of the task
You have been requested by your Senior Engineer to design a
Gas Monitor Unit (GMU) and
prepare a report detailing your proposed solution. The client
requires a microcontroller based
unit to measure the gas concentration from multiple gas sensors,
compare each gas concentration
against an alarm level and trigger the alarm if any gas
concentration exceeds the alarm level set
by the user. The alarm level is to be entered into the unit via a
set of buttons and a display will be
used to provide output to the user.
Stage 1 of the project (this assignment) requires you to (a)
design the hardware for a PIC18
microcontroller and the input/output circuitry required to
interface the sensors, buttons, display
and any other specified devices to meet the hardware
requirements and (b) write a set of simple
input/output subroutines (in C) only to operate each interface
according to the input/output
requirements.
[ Stage 2 (assignment 2) will require you to write a main
program to operate the fully functional
gas monitoring and alarm system. Some additional hardware
may also be required. ]
Hardware Requirements
Microprocessor support circuitry
components necessary to
operate a PIC18 processor at a clock speed of 20MHz.
equired
as the PIC18 includes this.
using a 5Volt power supply.
(Note that the 5V power supply itself is not part of this design
problem.)
Microcontroller Interfacing
e to be connected to the GMU. Each gas
sensor has a single 4 to 20mA
current output which indicates a gas concentration from 0 to
1000 ppm (parts per million).
[ ie. A continuously variable (analog) output from 4mA = 0ppm
to 20mA = 1000ppm ]
A current output of less than 4mA is an indication of a fault on
that sensor.
Figure 1. Sensor and resistor termination.
As shown in Figure 1 - the current from each sensor is
terminated into a 250ohm resistor to
convert it into an analog voltage between 1 and 5 Volts. This
analog voltage needs to be
converted to digital value inside the processor to represent a gas
concentration between 0
and 1000 (ppm), with a minimum resolution of 5ppm.
gas
sensor
4 to 20mA
0 to 5 V
+
0
ELE2303 Assign 1 Page | 4
circuitry are to be provided as inputs
from the user to control the software operation and to set the
alarm level. They are to be
labelled as: Exit, Up, Down, and Enter
LED indicators of different colours are to be used to
indicate the operational state of the
GMU program as: Run, Enter alarm value or Fault detected.
-segment display is required to display either the
gas concentration of a selected
sensor input or the alarm level during the alarm level setting
process. The display is not to
be multiplexed.
indicate a ‘no alarm’ condition and
switched to inactive (off) when an alarm condition (including
sensor fault) is detected. This
relay will thus provide a fail-safe alarm indication if the GMU
loses power.
-to/out-of the controller must be logically
grouped and connect to the GMU
circuit board via suitably sized connector each with a 0 Volt
(GND) reference signal.
(Note that the type or model of connector is not significant to
the assignment; just show a
connector as a rectangle with a single row of numbered pins.)
Input/Output Requirements (8 parts)
The following subroutines must be written:
(Note you are NOT allowed to use any library functions
provided with MPLAB X or XC8.
Write directly to the special function registers controlling the
ports and the ADC.)
Part 1. Write a C subroutine called initports to initialise the
I/O ports you have chosen in your
hardware design for the button inputs, alarm and LED outputs
and the seven segment display.
Part 2. Write a C subroutine called initadc to initialise the
ADC ready to read any sensor input
(as in part 3).
Part 3. Write a C function called sensor which accepts a
parameter ‘s’, starts a conversion on
the analog channel specified by ‘s’, scales that converted value
to the range 0 to 1000ppm and
returns the scaled sensor value as an integer. This function is to
return -1 if a sensor error is
detected.
Part 4. Write a C function called buttons to read the status of
all buttons and return an
integer whose value is 0 if no button is pressed, 1 for the Exit
button, 2 for the Up button, 3
for the Down button and 4 for the Enter button. Assume only
one button is active at any
instant.
Part 5. Write a C subroutine called leds that accepts a
parameter ‘n’, where the value ‘n’
(between 0 and 7) is used to control the 3 LED indicators Run,
Enter and Fault. A value of n=4
will turn on the Run LED, n=2 will turn on the Enter LED, n=1
will turn on the Fault LED, n=0
will turn all LEDs off. Assume only one LED is on at any
instant.
Part 6. Write a C subroutine called alarm that accepts a
parameter ‘a’, to control the alarm
relay, where a=1 turns the relay off (triggering the alarm) and
a=0 turns the relay on (no alarm).
ELE2303 Assign 1 Page | 5
Part 7. Write a C subroutine called display that accepts a
parameter ‘c’, to display the gas
concentration ‘c’ onto the 4 digit seven segment display. The
display is not multiplexed.
Part 8. Write a main C program calls all the subroutines in
some logical sequence so that their
functions can be tested on a simulator. The main program
should include multiple loops to test
each possible sensor input, each button press, each LED output,
the control of the relay output
and show a range of values on the seven segment display.
End of specification
If you have any questions on the assignment post them to the
assignment discussion forum so a
common answer is available to all students at the same time.

More Related Content

Similar to ELE2303 Assign 1 Page 1 ELE2303 Embedded Systems Design.docx

Detecting soft errors by a purely software approach
Detecting soft errors by a purely software approachDetecting soft errors by a purely software approach
Detecting soft errors by a purely software approachMd. Hasibur Rashid
 
Detecting soft errors by a purely software approach
Detecting soft errors by a purely software approachDetecting soft errors by a purely software approach
Detecting soft errors by a purely software approachMd. Hasibur Rashid
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 manjurkts
 
Summary Create an Object-Oriented program that creates a simulator an.pdf
 Summary Create an Object-Oriented program that creates a simulator an.pdf Summary Create an Object-Oriented program that creates a simulator an.pdf
Summary Create an Object-Oriented program that creates a simulator an.pdfallwinsupport
 
H63ECH_1B_023799_OsamaAzim
H63ECH_1B_023799_OsamaAzimH63ECH_1B_023799_OsamaAzim
H63ECH_1B_023799_OsamaAzimOsama Azim
 
IRJET - Simulink based Real Time Blood Pressure and Body Tempraure Monitr...
IRJET -  	  Simulink based Real Time Blood Pressure and Body Tempraure Monitr...IRJET -  	  Simulink based Real Time Blood Pressure and Body Tempraure Monitr...
IRJET - Simulink based Real Time Blood Pressure and Body Tempraure Monitr...IRJET Journal
 
Design the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsDesign the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsAnkita Tiwari
 
Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlIOSR Journals
 
Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Ronza Sameer
 
PID Controller based DC Motor Speed Control
PID Controller based DC Motor Speed ControlPID Controller based DC Motor Speed Control
PID Controller based DC Motor Speed Controlrahulmonikasharma
 
ECE 323 Final Project Report
ECE 323 Final Project ReportECE 323 Final Project Report
ECE 323 Final Project ReportJonathan Lepp
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER cscpconf
 
Power Windows Using Touch Screen
Power Windows Using Touch ScreenPower Windows Using Touch Screen
Power Windows Using Touch ScreenIRJET Journal
 
Internship Report (VTOL) (2)
Internship Report (VTOL) (2)Internship Report (VTOL) (2)
Internship Report (VTOL) (2)Rishabh Prakash
 
IRJET - Lie Detector using MATLAB, Arduino and Biomedical Sensors
IRJET -  	  Lie Detector using MATLAB, Arduino and Biomedical SensorsIRJET -  	  Lie Detector using MATLAB, Arduino and Biomedical Sensors
IRJET - Lie Detector using MATLAB, Arduino and Biomedical SensorsIRJET Journal
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdfVcTrn1
 
Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Ankita Tiwari
 

Similar to ELE2303 Assign 1 Page 1 ELE2303 Embedded Systems Design.docx (20)

Detecting soft errors by a purely software approach
Detecting soft errors by a purely software approachDetecting soft errors by a purely software approach
Detecting soft errors by a purely software approach
 
Detecting soft errors by a purely software approach
Detecting soft errors by a purely software approachDetecting soft errors by a purely software approach
Detecting soft errors by a purely software approach
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Summary Create an Object-Oriented program that creates a simulator an.pdf
 Summary Create an Object-Oriented program that creates a simulator an.pdf Summary Create an Object-Oriented program that creates a simulator an.pdf
Summary Create an Object-Oriented program that creates a simulator an.pdf
 
H63ECH_1B_023799_OsamaAzim
H63ECH_1B_023799_OsamaAzimH63ECH_1B_023799_OsamaAzim
H63ECH_1B_023799_OsamaAzim
 
IRJET - Simulink based Real Time Blood Pressure and Body Tempraure Monitr...
IRJET -  	  Simulink based Real Time Blood Pressure and Body Tempraure Monitr...IRJET -  	  Simulink based Real Time Blood Pressure and Body Tempraure Monitr...
IRJET - Simulink based Real Time Blood Pressure and Body Tempraure Monitr...
 
Design the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsDesign the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with Constraints
 
Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature Control
 
Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)Report 2 microp.(microprocessor)
Report 2 microp.(microprocessor)
 
PID Controller based DC Motor Speed Control
PID Controller based DC Motor Speed ControlPID Controller based DC Motor Speed Control
PID Controller based DC Motor Speed Control
 
ECE 323 Final Project Report
ECE 323 Final Project ReportECE 323 Final Project Report
ECE 323 Final Project Report
 
CE150--Hongyi Huang
CE150--Hongyi HuangCE150--Hongyi Huang
CE150--Hongyi Huang
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
 
Power Windows Using Touch Screen
Power Windows Using Touch ScreenPower Windows Using Touch Screen
Power Windows Using Touch Screen
 
Plc notes
Plc notesPlc notes
Plc notes
 
Internship Report (VTOL) (2)
Internship Report (VTOL) (2)Internship Report (VTOL) (2)
Internship Report (VTOL) (2)
 
IRJET - Lie Detector using MATLAB, Arduino and Biomedical Sensors
IRJET -  	  Lie Detector using MATLAB, Arduino and Biomedical SensorsIRJET -  	  Lie Detector using MATLAB, Arduino and Biomedical Sensors
IRJET - Lie Detector using MATLAB, Arduino and Biomedical Sensors
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdf
 
Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.
 

More from jack60216

Anorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxAnorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxjack60216
 
Annotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxAnnotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxjack60216
 
Annual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxAnnual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxjack60216
 
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxAnnotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxjack60216
 
Annotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxAnnotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxjack60216
 
Annotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxAnnotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxjack60216
 
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxAnalyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxjack60216
 
Andy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxAndy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxjack60216
 
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography  Althaus, F. U.S. Maternal Morta.docxAnnotated Bibliography  Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docxjack60216
 
Ann, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxAnn, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxjack60216
 
Andrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxAndrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxjack60216
 
and emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxand emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxjack60216
 
analyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxanalyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxjack60216
 
Analyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxAnalyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxjack60216
 
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxAnalyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxjack60216
 
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxAnalytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxjack60216
 
Analyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxAnalyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxjack60216
 
Analyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxAnalyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxjack60216
 
Analyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxAnalyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxjack60216
 
Analyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxAnalyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxjack60216
 

More from jack60216 (20)

Anorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docxAnorexia1-Definition2-Epidemiology in united states2.docx
Anorexia1-Definition2-Epidemiology in united states2.docx
 
Annotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docxAnnotated BibliographyIn preparation of next weeks final as.docx
Annotated BibliographyIn preparation of next weeks final as.docx
 
Annual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docxAnnual Report to the Nation on the Status of Cancer,Part I .docx
Annual Report to the Nation on the Status of Cancer,Part I .docx
 
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docxAnnotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
Annotated BibliographyDue 1212019 @ 12pm Eastern Time (Unite.docx
 
Annotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docxAnnotated BibliographyFor this assignment, you will create an .docx
Annotated BibliographyFor this assignment, you will create an .docx
 
Annotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docxAnnotated bibliography due in 36 hours. MLA format Must incl.docx
Annotated bibliography due in 36 hours. MLA format Must incl.docx
 
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docxAnalyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
Analyzing a Short Story- The Necklace by Guy de MaupassantIntro.docx
 
Andy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docxAndy Sylvan was the assistant director of the community developm.docx
Andy Sylvan was the assistant director of the community developm.docx
 
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography  Althaus, F. U.S. Maternal Morta.docxAnnotated Bibliography  Althaus, F. U.S. Maternal Morta.docx
Annotated Bibliography Althaus, F. U.S. Maternal Morta.docx
 
Ann, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docxAnn, a community nurse, made an afternoon home visit with Susan and .docx
Ann, a community nurse, made an afternoon home visit with Susan and .docx
 
Andrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docxAndrea Walters Week 2 Main Post       The key functional area of n.docx
Andrea Walters Week 2 Main Post       The key functional area of n.docx
 
and emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docxand emergency CPR all changed ways of thinking about risk of death.docx
and emergency CPR all changed ways of thinking about risk of death.docx
 
analyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docxanalyze, and discuss emerging ICT tools and technologies present.docx
analyze, and discuss emerging ICT tools and technologies present.docx
 
Analyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docxAnalyzing a Research ArticleNote Please complete this dis.docx
Analyzing a Research ArticleNote Please complete this dis.docx
 
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docxAnalyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
Analyze the Civil Rights Movement of the 1950s and 1960s. What p.docx
 
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docxAnalytical Research Project InstructionsINFA 630 – Intrusion.docx
Analytical Research Project InstructionsINFA 630 – Intrusion.docx
 
Analyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docxAnalyze the performance of the leadership of an organization (Netfli.docx
Analyze the performance of the leadership of an organization (Netfli.docx
 
Analyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docxAnalyze the subjective portion of the note. List additiona.docx
Analyze the subjective portion of the note. List additiona.docx
 
Analyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docxAnalyze the measures your state and local community have in pl.docx
Analyze the measures your state and local community have in pl.docx
 
Analyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docxAnalyze two (2) advantages and two (2) disadvantages of creati.docx
Analyze two (2) advantages and two (2) disadvantages of creati.docx
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

ELE2303 Assign 1 Page 1 ELE2303 Embedded Systems Design.docx

  • 1. ELE2303 Assign 1 Page | 1 ELE2303 Embedded Systems Design Assignment 1 – Gas Monitor Unit Stage 1 Description Marks out of Wtg (%) Due date Gas Monitor Unit – Stage 1 200 20 28/04/14 Purpose This assessment is intended to evaluate the student’s capability in selecting and configuring a microcontroller unit (MCU), designing simple interface hardware and writing subroutines to operate those interfaces. Please note – the purpose of studying a ‘design’ course like this, is that you learn how to design hardware and write programs to solve new problems. This requires you to understand the how individual parts of the microcontroller function and how to control them with a program. You are expected to link together pieces of interface circuitry and combine segments of program you
  • 2. learn about in the course materials, into a structured solution. Do not expect to find a ‘solution’ to this problem on the internet. Expect that you have to create it! Grading of this assessment This task will be assessed against the course objectives 1, 2, 3, 4, 6 and 7. This assessment will be graded (F, C, B, A, HD) using a rubric marking scheme against criteria such as: the appropriate selection and use of microcomputer hardware; the design of I/O hardware to meet a specification; implementation of software to meet a specification; quality of documentation including organisation of ideas and format; spelling, grammar and punctuation. Note - this course is a communications benchmark course, hence marks will be awarded for the quality of documentation. Assignment Requirements This assessment requires students to meet the requirements the specification below. Select a suitable microcontroller from the PIC18 family, design simple interface hardware, write
  • 3. and test some C programs (subroutines) to operate the hardware interface and then document the hardware and software as a proposed design. Software is to be written in C using the MPLAB X IDE. You must create an MPLAB X project which may include one or more C source files. The testing is to be completed using either: the Oshonsoft PIC18 simulator or the MPLAB X simulator. There is NO requirement to assemble any hardware, or layout a PCB for this assignment. The circuit design for the hardware may be drawn using electronics CAD software, OR hand- drawn and scanned, for inclusion in the documentation. The ‘hardware’ can be successfully configured and simulated on the Oshonsoft PIC18 simulator or the MPLAB simulator. A few screen captures of the software under-going testing are to be included in the documentation. ELE2303 Assign 1 Page | 2 Each student is required to submit: 1. A report in PDF format which includes:
  • 4. a brief introduction (100 – 150 words) outlining the design requirements based on the specification. – 300 words) explaining the key elements of the design and how they meet the specification, plus include a single page circuit diagram of the proposed hardware. You must specify all part numbers and the values of any discrete components used (ie. resistors, capacitors, crystals). Show any calculations you make to check the scaling and resolution of analog input values. – 300 words) briefly explaining each of the subroutines and how they meet the specification, plus include a copy of the C source code showing all the subroutines. tware (250 – 300 words) explaining what is working and isn’t working, plus include a few screen captures of the Oshonsoft or MPLAB X simulator showing the software under-going testing. The document should be formatted as a report and must include:
  • 5. -headings captions eader of the document document 2. A copy of the program source file(s) as: (directory) you created for the assignment Notes on plagiarism or collusion This is an individual assessment. Students must write and submit their own hardware design, program and documentation. Students may discuss concepts and methods of implementation with others, but it is forbidden to share circuits and source code or copy another student’s work. Discuss how to do it, but come up with your own work.
  • 6. For this sort of assessment two or more students submitting the same circuit or program may be considered as plagiarism or collusion. There are several ways that each part of a program may be implemented, so two ‘independently’ written programs are highly unlikely to be identical. “Working together on the assignment” should not result in exactly the same design or program. Also re-using assignment work from past years is also not allowable and easy to identify. Plagiarism is very easy to identify! Students are also warned that paying someone else to do your assignment is considered a serious breach of regulations. This too is very easy to identify! ELE2303 Assign 1 Page | 3 The System Specification Outline of the task You have been requested by your Senior Engineer to design a
  • 7. Gas Monitor Unit (GMU) and prepare a report detailing your proposed solution. The client requires a microcontroller based unit to measure the gas concentration from multiple gas sensors, compare each gas concentration against an alarm level and trigger the alarm if any gas concentration exceeds the alarm level set by the user. The alarm level is to be entered into the unit via a set of buttons and a display will be used to provide output to the user. Stage 1 of the project (this assignment) requires you to (a) design the hardware for a PIC18 microcontroller and the input/output circuitry required to interface the sensors, buttons, display and any other specified devices to meet the hardware requirements and (b) write a set of simple input/output subroutines (in C) only to operate each interface according to the input/output requirements. [ Stage 2 (assignment 2) will require you to write a main program to operate the fully functional gas monitoring and alarm system. Some additional hardware
  • 8. may also be required. ] Hardware Requirements Microprocessor support circuitry components necessary to operate a PIC18 processor at a clock speed of 20MHz. equired as the PIC18 includes this. using a 5Volt power supply. (Note that the 5V power supply itself is not part of this design problem.) Microcontroller Interfacing e to be connected to the GMU. Each gas sensor has a single 4 to 20mA current output which indicates a gas concentration from 0 to 1000 ppm (parts per million). [ ie. A continuously variable (analog) output from 4mA = 0ppm to 20mA = 1000ppm ] A current output of less than 4mA is an indication of a fault on that sensor.
  • 9. Figure 1. Sensor and resistor termination. As shown in Figure 1 - the current from each sensor is terminated into a 250ohm resistor to convert it into an analog voltage between 1 and 5 Volts. This analog voltage needs to be converted to digital value inside the processor to represent a gas concentration between 0 and 1000 (ppm), with a minimum resolution of 5ppm. gas sensor 4 to 20mA 0 to 5 V + 0 ELE2303 Assign 1 Page | 4 circuitry are to be provided as inputs from the user to control the software operation and to set the alarm level. They are to be
  • 10. labelled as: Exit, Up, Down, and Enter LED indicators of different colours are to be used to indicate the operational state of the GMU program as: Run, Enter alarm value or Fault detected. -segment display is required to display either the gas concentration of a selected sensor input or the alarm level during the alarm level setting process. The display is not to be multiplexed. indicate a ‘no alarm’ condition and switched to inactive (off) when an alarm condition (including sensor fault) is detected. This relay will thus provide a fail-safe alarm indication if the GMU loses power. -to/out-of the controller must be logically grouped and connect to the GMU circuit board via suitably sized connector each with a 0 Volt (GND) reference signal. (Note that the type or model of connector is not significant to the assignment; just show a connector as a rectangle with a single row of numbered pins.)
  • 11. Input/Output Requirements (8 parts) The following subroutines must be written: (Note you are NOT allowed to use any library functions provided with MPLAB X or XC8. Write directly to the special function registers controlling the ports and the ADC.) Part 1. Write a C subroutine called initports to initialise the I/O ports you have chosen in your hardware design for the button inputs, alarm and LED outputs and the seven segment display. Part 2. Write a C subroutine called initadc to initialise the ADC ready to read any sensor input (as in part 3). Part 3. Write a C function called sensor which accepts a parameter ‘s’, starts a conversion on the analog channel specified by ‘s’, scales that converted value to the range 0 to 1000ppm and returns the scaled sensor value as an integer. This function is to return -1 if a sensor error is detected.
  • 12. Part 4. Write a C function called buttons to read the status of all buttons and return an integer whose value is 0 if no button is pressed, 1 for the Exit button, 2 for the Up button, 3 for the Down button and 4 for the Enter button. Assume only one button is active at any instant. Part 5. Write a C subroutine called leds that accepts a parameter ‘n’, where the value ‘n’ (between 0 and 7) is used to control the 3 LED indicators Run, Enter and Fault. A value of n=4 will turn on the Run LED, n=2 will turn on the Enter LED, n=1 will turn on the Fault LED, n=0 will turn all LEDs off. Assume only one LED is on at any instant. Part 6. Write a C subroutine called alarm that accepts a parameter ‘a’, to control the alarm relay, where a=1 turns the relay off (triggering the alarm) and a=0 turns the relay on (no alarm).
  • 13. ELE2303 Assign 1 Page | 5 Part 7. Write a C subroutine called display that accepts a parameter ‘c’, to display the gas concentration ‘c’ onto the 4 digit seven segment display. The display is not multiplexed. Part 8. Write a main C program calls all the subroutines in some logical sequence so that their functions can be tested on a simulator. The main program should include multiple loops to test each possible sensor input, each button press, each LED output, the control of the relay output and show a range of values on the seven segment display. End of specification If you have any questions on the assignment post them to the assignment discussion forum so a common answer is available to all students at the same time.