For more classes visit
www.snaptutorial.com
ECET 365 Lab 1 Using the Serial Communication Interface in a Microcontroller
ECET 365 Lab 2 Temperature Measuring System using a Microcontroller
1. ECET 365 Entire Course (All Labs and Quizzes)
For more classes visit
www.snaptutorial.com
ECET 365 Lab 1 Using the Serial Communication Interface in a
Microcontroller
ECET 365 Lab 2 Temperature Measuring System using a
Microcontroller
ECET 365 Lab 3 Traffic Light Control Using Finite State Machines
(FSM)
ECET 365 Lab 4 Servo Control Using Pulse Width Modulation
(PWM)
ECET 365 Lab 5 Servo Motor Interfaces-Closed-Loop Motor Speed
Control
ECET 365 Lab 6 Servo Motor Interfaces-Closed-Loop Motor Speed
Control
ECET 365 Weeks 2-6 Quizzes
*****************************************
ECET 365 Lab 1 Using the Serial
Communication Interface in a Microcontroller
For more classes visit
www.snaptutorial.com
2. Lab 1 of 6: Using the Serial Communication Interface in a
Microcontroller
Submit your assignment to the Dropbox located on the silver tab at
the top of this page.
(See Syllabus section Due Dates for Assignments & Exams for due
dates.)
L A B O V E R V I E W
Scenario/Summary
1. To use the built-in COM port and understand how it sends and
receives serial data using the RS-232 communication standard
2. To learn how to program the HC12 Serial Communication Interface
in C language to transfer data between sender and receiver and
display it
Deliverables
Answer all parts, and submit completed lab document.
L A B S T E P S
3. STEP 1: Download the lab
Download Lab 1 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 1 Lab. Be sure
to complete each part.
STEP 3: Submit
Submit the completed lab document in a Word file.
*****************************************
ECET 365 Lab 2 Temperature Measuring
System using a Microcontroller
For more classes visit
www.snaptutorial.com
Lab 2 of 6: Temperature Measuring System using a Microcontroller
Submit your assignment to the Dropbox located under the silver tab at
the top of this page.
(See Syllabus section Due Dates for Assignments & Exams for due
dates.)
L A B O V E R V I E W
4. Scenario/Summary
1. To know how to design and use signal conditioners to interface
analog sensors or transducers to the HC12
2. To learn how to use A-to-D Converters to input and digitize signals
coming to the microprocessor from analog input devices
3. To learn how to write a C language program to sample, process,
and output the data from an analog device on an LCD
Deliverables
Answer all parts, and submit completed lab document.
L A B S T E P S
STEP 1: Download the lab
Download Lab 2 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 2 Lab. Be sure
to complete each part.
STEP 3: Submit
Submit the completed lab document in a Word file
*****************************************
ECET 365 Lab 3 Traffic Light Control Using
Finite State Machines (FSM)
For more classes visit
www.snaptutorial.com
Lab 3 of 6: Traffic Light Control Using Finite State Machines (FSM)
Submit your assignment to the Dropbox located under the silver tab at
the top of this page.
5. See Syllabus section Due Dates for Assignments & Exams for due
dates.
L A B O V E R V I E W
Scenario/Summary
1. To understand how a relatively simple finite state machine
abstraction can be used to implement a complex set of equivalent
relay actions in hardware
2. To analyze a familiar real-world problem in terms of how system
inputs and the present state determine the next output state using a
state diagram
3. To acquire proficiency in the use of statically allocated linked list
data structures to define a sequence of states involving multiple
variables
Deliverables
Answer all parts, and submit completed lab document.
L A B S T E P S
STEP 1: Open lab document
Download Lab 3 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 3 Lab. Be sure
to complete each part.
STEP 3: Submit
Submit the completed lab document in a Word file
*****************************************
ECET 365 Lab 4 Servo Control Using Pulse
Width Modulation (PWM)
For more classes visit
www.snaptutorial.com
6. Lab 4 of 6: Servo Control Using Pulse Width Modulation (PWM)
Submit your assignment to the Dropbox located under the silver tab at
the top of this page.
(See Syllabus section Due Dates for Assignments & Exams for due
dates.)
L A B O V E R V I E W
Scenario/Summary
1. To become familiar with the PWM interface using the Dragon 12
Plus with serial monitor
2. To learn how to use input and output subroutines in C language
3. To learn how to compose projects containing several modules
Deliverables
Answer all parts and submit completed lab document.
L A B S T E P S
STEP 1: Download the lab
Download Lab 4 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 4 Lab. Be sure
to complete each part.
STEP 3: Submit
Submit the completed lab document in a Word file.
*****************************************
ECET 365 Lab 5 Servo Motor Interfaces-
Closed-Loop Motor Speed Control
For more classes visit
www.snaptutorial.com
7. Lab 5 of 6: Servo Motor Interfaces-Closed-Loop Motor Speed
Control
Submit your assignment to the Dropbox located under the silver tab at
the top of this page.
(See Syllabus section Due Dates for Assignments & Exams for due
dates.)
L A B O V E R V I E W
Scenario/Summary
1. To understand the operation of servo motors and optical interrupter
switches
2. To analyze the interface requirements for connecting an optical
interrupter to an HC12 and implementing the interface
3. To learn how to write a C language program that controls the speed
and direction of a dc motor and displays motor speed in RPM to the
PC monitor
4. To learn how to program a continuous feedback control loop that
stabilizes the speed of a servo motor under varying load using the
HC12 input capture timer.
Deliverables
Answer all parts and submit completed lab document.
L A B S T E P S
STEP 1: Download the lab
Download Lab 5 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 5 Lab. Be sure
to complete each part.
STEP 3: Submit
Submit the completed lab document in a Word file.
*****************************************
ECET 365 Lab 6 Servo Motor Interfaces-
Closed-Loop Motor Speed Control
8. For more classes visit
www.snaptutorial.com
Lab 6 of 6: Servo Motor Interfaces-Closed-Loop Motor Speed
Control
Submit your assignment to the Dropbox located under the silver tab at
the top of this page.
See Syllabus section Due Dates for Assignments & Exams for due
dates.
L A B O V E R V I E W
Scenario/Summary
The course project involves the design, debugging, and building of
hardware and software for a wireless servo driven robot.
Deliverables
Report
A complete report detailing construction, test, and validation of the
project should be written. The report format should follow the format
for course labs in general.
Presentation
In addition to a written report, a complete PowerPoint presentation
must be written. A final presentation of the project using the
presentation must be given to your class peers and the instructor. It is
considered toward a part of your grade.
L A B S T E P S
STEP 1: Download the lab
Download Lab 6 located in Doc Sharing, and save it to your PC.
STEP 2: Complete the lab instructions
Follow the directions and steps to complete the Week 6 Lab. Be sure
to complete each part.
STEP 3: Submit
1. Submit the written report.
2. Give presentation.
1. Question : (TCO #5) Identify the step size for an 8-bit analog-to-
digital converter with Vref= 2.5 VDC?
9. Student Answer: 10 millivolts
25 millivolts
4.9 millivolts
5 volts
Comments:
2. Question : (TCO # 5) How many steps are available with a 10-bit
ADC?
Student Answer: 10
1024
512
256
Comments:
3. Question : (TCO #5) What is the cutoff frequency for a low-pass
filter with a resistor R = 3000 and a capacitor C = .01 µf?
Student Answer: f = 5.3 KHz
f = 3300 Hz
f = 120 KHz
f = 6 KHz
Comments:
4. Question : (TCO #5)A band-stop filter is a filter that _____
frequencies below low-limit and above high-limit frequencies and
_____ frequencies between the limits.
Student Answer: blocks; blocks
passes; blocks
10. blocks; passes
has; blocks
Comments:
5. Question : (TCO #5) A bridge with R1= 5.1 K, R2= 2 K, and R3=
15 K can be at null if R4is _____.
Student Answer: 10.5 K
5.88 K
588
1 K
Comments:
6. Question : (TCO #5) An instrumentation amplifier with two
buffers has a feedback resistor of 100 K. The two resistors from the
buffer's output to the input of the last stage OP-Amp are 1 K resistors.
Voltage levels to the non-inverting buffer inputs. Voltage levels to the
non-inverting buffer inputs are V1= .06 volt and V2= .02 volts. What
is Voutof the instrumentation amplifier?
Student Answer: 4 Volts
20.4 Volts
3.3 Volts
15.3 Volts
Comments:
7. Question : (TCO #5) An embedded system with an 8-bit analog-
to-digital converter is connected to a transducer with an output
voltage of 10 millivolts. This signal is amplified by an amplifier with
a gain of 25. Assume that this signal level is appropriate for the ADC
11. input. If the reference voltage of the ADC converter is 5 volts, what
will be the output of the ADC in binary form?
Student Answer: 01100110
00110011
00001101
01111011
Comments:
8. Question : (TCO #5) An 8-bit analog-to-digital converter has
maximum output voltage of 2.5 VDC. What is the reference voltage
to this ADC?
Student Answer: 2.5 VDC
5 VDC
1.25 VDC
None of the above
Comments:
9. Question : (TCO #5) A well-behaved analog signal with a
frequency of 20 kHz is being sampled. What is the sampling
frequency if frequency aliasing occurs?
Student Answer: 90 kHz
40 kHz
85 kHz
60 khz
Comments:
10. Question : (TCO #5) To model a nonlinear transducer, one can
_____.
12. Student Answer: use empirically determined nonlinear equation
use a piecewise linear system
use a lookup table located in memory
All of the above
*****************************************
ECET 365 Week 2 Quiz
For more classes visit
www.snaptutorial.com
1. Question : (TCO #5) Identify the step size for an 8-bit analog-to-
digital converter with Vref= 2.5 VDC?
Student Answer: 10 millivolts
25 millivolts
4.9 millivolts
5 volts
Comments:
2. Question : (TCO # 5) How many steps are available with a 10-bit
ADC?
Student Answer: 10
1024
512
256
13. Comments:
3. Question : (TCO #5) What is the cutoff frequency for a low-pass
filter with a resistor R = 3000 and a capacitor C = .01 µf?
Student Answer: f = 5.3 KHz
f = 3300 Hz
f = 120 KHz
f = 6 KHz
Comments:
4. Question : (TCO #5)A band-stop filter is a filter that _____
frequencies below low-limit and above high-limit frequencies and
_____ frequencies between the limits.
Student Answer: blocks; blocks
passes; blocks
blocks; passes
has; blocks
Comments:
5. Question : (TCO #5) A bridge with R1= 5.1 K, R2= 2 K, and R3=
15 K can be at null if R4is _____.
Student Answer: 10.5 K
5.88 K
588
1 K
Comments:
14. 6. Question : (TCO #5) An instrumentation amplifier with two
buffers has a feedback resistor of 100 K. The two resistors from the
buffer's output to the input of the last stage OP-Amp are 1 K resistors.
Voltage levels to the non-inverting buffer inputs. Voltage levels to the
non-inverting buffer inputs are V1= .06 volt and V2= .02 volts. What
is Voutof the instrumentation amplifier?
Student Answer: 4 Volts
20.4 Volts
3.3 Volts
15.3 Volts
Comments:
7. Question : (TCO #5) An embedded system with an 8-bit analog-
to-digital converter is connected to a transducer with an output
voltage of 10 millivolts. This signal is amplified by an amplifier with
a gain of 25. Assume that this signal level is appropriate for the ADC
input. If the reference voltage of the ADC converter is 5 volts, what
will be the output of the ADC in binary form?
Student Answer: 01100110
00110011
00001101
01111011
Comments:
8. Question : (TCO #5) An 8-bit analog-to-digital converter has
maximum output voltage of 2.5 VDC. What is the reference voltage
to this ADC?
Student Answer: 2.5 VDC
5 VDC
1.25 VDC
15. None of the above
Comments:
9. Question : (TCO #5) A well-behaved analog signal with a
frequency of 20 kHz is being sampled. What is the sampling
frequency if frequency aliasing occurs?
Student Answer: 90 kHz
40 kHz
85 kHz
60 khz
Comments:
10. Question : (TCO #5) To model a nonlinear transducer, one can
_____.
Student Answer: use empirically determined nonlinear equation
use a piecewise linear system
use a lookup table located in memory
All of the above
*****************************************
ECET 365 Week 3 Quiz
For more classes visit
www.snaptutorial.com
16. 1. Question : (TCO #3) Which interrupt is non-maskable?
Student Answer: Software interrupt (SWI)
Interrupt from a device connected to IRQ pin of HCS12
microcontroller
Both A and B
Interrupt by multiple devices connected to IRQ pin of HCS12
microcontroller
Comments:
2. Question : (TCO #3) Which of the following interrupts has the
highest priority?
Student Answer: TCNT timer overflow
SCI0
ATD0
ATD1
Comments:
3. Question : (TCO #3) Which selection is connected to the reset
module in the HCS12 microcontroller?
Student Answer: Reset pin
ADC0
ADC1
None of the above
Comments:
4. Question : (TCO #3) Which bit can mask a maskable interrupt?
Student Answer: S bit
17. Z bit
N bit
None of the above
Comments:
5. Question : (TCO #3) In the HCS12 microcontroller, the address
range 0xFFFE – 0xFFFF in the interrupt vector table is assigned to
which of the following?
Student Answer: Clock monitor fail reset
ATD0
Reset
COP failure reset
Comments:
6. Question : (TCO #3) Freescale utilizes BDM to _____.
Student Answer: check each instruction of a program individually
reset CPU by setting IRQ pin to high-level logic
check changes in memory and CPU register for each instruction
execution
Both A and C
Comments:
7. Question : (TCO #3) Watch dog timer is a utility that _____.
Student Answer: can reset the microcontroller whenever a program
locks up.
can catch errors due to memory corruption
makes sure that a program does go to an unintentional infinite loop
sequence
18. Both A and B
Comments:
8. Question : (TCO #3) When an interrupt occurs, _____.
Student Answer: in one stage, the contents of the CPU move to RAM
memory
the CPU finishes executing its current instruction before it starts
running an interrupt thread
all interrrupts will be ignored if the I bit is zero
Both A and B
Comments:
9. Question : (TCO #3) Which combination is an appropriate way of
setting up the PORTJ interrupt to enabled?
Student Answer: Pin I of CCR = 0
Pin I of CCR = 1
Pin I of CCR = 1 and PIEJ7 = 1
Pin I of CCR = 0 and PIEJ6 = 0
Comments:
10. Question : (TCO #3) Which of the following interrupts has the
highest priority immediately after a microcontroller reset?
Student Answer: Reset
XIRQ
COP
All have the same level of priority.
*****************************************
19. ECET 365 Week 4 Quiz
For more classes visit
www.snaptutorial.com
1. Question : (TCO #1, 2, and 7) Select the header file in
CodeWarrior for the Freescale MC9s12DG256.
Student Answer: mc9s12dg256.h
mc9s12dg256.header
mc9s12dg256.asm
mc9s12dg256
Comments:
2. Question : (TCO #1, 2, and 7) _____ is part of the UNIX OS user
layer.
Student Answer: API
Device driver
Shell
Core
Comments:
3. Question : (TCO #1, 2, and 7) A multitask operating system is
more feasible in _____.
Student Answer: an embedded system
20. a computer with multiple processors
a processor with two accumulators
a computer with multiple hard disks
Comments:
4. Question : (TCO #1, 2, and 7) In layered software architecture, the
main module is usually found within _____.
Student Answer: the last (lowest) layer
the API
the first (top) layer
a module inside a thread
Comments:
5. Question : (TCO #1, 2, and 7) The user of a module may be
interested in _____.
Student Answer: passing values to the module
the output format of the module
who wrote the module
Both A and B
Comments:
6. Question : (TCO #1, 2, and 7) Identify the computer language
commonly used for embedded programming.
Student Answer: C
Assembly
Both A and B
Pascal
21. Comments:
7. Question : (TCO #1, 2, and 7) Which of the following commands
loads hexadecimal number 44 to accumulator A?
Student Answer: LDAA #$44
LDAA #44
LDA #44
LDAA 44$
Comments:
8. Question : (TCO #1, 2, and 7) C ++ encapsulation is _____.
Student Answer: grouping functions and variables into one class
grouping only functions in one class
grouping only variables in one class
grouping functions and variables in multiple classes
Comments:
9. Question : (TCO #1, 2, and 7) Information shared by multiple
program modules is known as _____.
Student Answer: a static int
a global variable
a local variable
a function
Comments:
10. Question : (TCO #1, 2, and 7) A multichannel digital storage
scope is known as _____.
22. Student Answer: an ICE
a logic analyzer
a spectrum analyzer
a network analyzer
*****************************************
ECET 365 Week 5 Quiz
For more classes visit
www.snaptutorial.com
Question : (TCO #5) In an asynchronous data transfer _____.
Student Answer: the transmitter and receiver clock must be exactly
the same all the time
the receiver clock must be exactly the same or multiple times the
transmitter clock
it is not necessary to have a clock in the receiver
None of the above
Comments:
2. Question : (TCO #5) Synchronization between data transmitter
and receiver _____ data transfer.
Student Answer: is necessary in asynchronous
is necessary in synchronous
is necessary in both asynchronous and synchronous data transfer
23. is not necessary in both an asynchronous and synchronous
Comments:
3. Question : (TCO #5) Which register is utilized in setting the baud
rate in a SCI interface?
Student Answer: SCIBDH
SCI0CR2
SCI0BDL
Both A and C
Comments:
4. Question : (TCO #5) To sample data at the falling edge of the
clock when using SPI, _____.
Student Answer: CPA in SPICR1 must be 0
MSTR in SPICR1 must be 0
CPA in SPICR1 must be 1
MSTR in SPICR1 must be 1
Comments:
5. Question : (TCO #5) A SPI master IC connects to slave IC with
_____.
Student Answer: five wires
one wire
four wires
wireless
Comments:
24. 6. Question : (TCO #5) Communication between two modems
through telephone lines is _____.
Student Answer: serial
parallel
digitalall the time
Both A and C
Comments:
7. Question : (TCO #5) SPI implements a/an _____ protocol.
Student Answer: asynchronous
synchronous
parallel
TCP
Comments:
8. Question : (TCO #5) In full-duplex data transfer, _____.
Student Answer: data transfer from the transmitter only
data bits transfer simultaneously in both directions
data bits transfer in both directions but not simultaneously
data bits transfer in a parallel bus
Comments:
9. Question : (TCO #5) High voltage level in a TTL chip is _____.
Student Answer: 12 volts
5 volts
-5 volts
25. -12 volts
Comments:
10. Question : (TCO #5) USB utilizes _____.
Student Answer: a serial data transfer
a parallel data transfer
a mixed parallel/serial data transfer
a daisy chain to connect maximum of 10 devices
********************************************************
ECET 365 Week 6 Quiz
For more classes visit
www.snaptutorial.com
1. Question : (TCO #6) How many 16-bit PWM channels are
available in the Freescale 9S12DG256 microcontroller?
Student Answer: Two
Four
Seven
Eight
Comments:
26. 2. Question : (TCO #6) When concatenating the two 8-bit PWM
Channels 3 and 2 to get a 16-bit PWM channel, _____ becomes the
low-order byte.
Student Answer: Channel 7
Channel 2
Channel 5
Channel 3
Comments:
3. Question : (TCO #6) To enable Channel 7 of the PWM to
9S12DG256, which of the following must be done?
Student Answer: Set PWME7 = 1
Set PWME7 = 0
Set CAE7 = 1
Set CAE7 = 0
Comments:
4. Question : (TCO #6) What is Clock SA when PWMSCLA = 0x01
and Clock A = 4MHz?
Student Answer: 5MHz
4MHz
8MHz
2MHz
Comments:
5. Question : (TCO #6) What is Clock SA when PWMSCLA = 0x00
and Clock A = 8MHz?
27. Student Answer: 8MHz
15625Hz
8MHz
31250Hz
Comments:
6. Question : (TCO #6) A bus clock is set to 4000 kHz. What is the
Clock A’s value if PWMPRCLK = 0x02?
Student Answer: 1MHz
3MHz
2MHz
8MHz
Comments:
7. Question : (TCO #6) In case of center-aligned PWM, which
formula can be used for the duty cycle of the output waveform?
Student Answer: Duty Cycle = [(PWMPERx - PWMDTYx) /
PWMPERx] * 100%
Duty Cycle = [PWMDTYx / PWMPERx] * 100%
Duty Cycle = PWMDTYx 100%
Both A or B (depends on PPOLx)
Comments:
8. Question : (TCO #6) In case of center-aligned PWM, which
formula can be used for the PWM frequency?
Student Answer: PWMx frequency = Clock (A, B, SA, or SB) /
PWMPERx
PWMx frequency = Clock (A, B, SA, or SB) / (2 * PWMPERx)
28. PWMx frequency = Clock (A, B, SA, or SB) / (4 * PWMPERx)
PWMx frequency = Clock (A, B, SA, or SB) / (3 * PWMPERx)
Comments:
9. Question : (TCO #6) Current passing through a wire creates an
electromagnetic field that _____.
Student Answer: loops around the wire
is directly proportional to the amount of the current flowing inside the
wire
is strongest closer to the wire
satisfies all of the above answers
Comments:
10. Question : (TCO #6) PWM channels of a microcontroller are
designed for control of a _____.
Student Answer: servo motor
AC motor
stepper motor
None of the above
*********************************************************************************