CT 318 Microprocessor Systems
This course provides understanding the architecture of microprocessor-based systems: registers, study of microprocessor operation, assembly language, arithmetic operations, and interfacing.
INTENDED LEARNING OUTCOMES
1. Explain the principles of LEDs which use in a broad range of LED devices with using digital and analog outputs.
2. Distinguish functions and parameters use in digital and analog outputs.
3. Apply skills in electrical, electronics and programming, to develop various LED devices.
At the end of the course, the students are able to:
1. Perform modern electronic systems with microprocessor/microcontroller, digital logic, and digital interfaces.
2. Recognize usefulness of microprocessor/microcontroller platform to develop AI, IoT and Embedded Systems. (PO1, PO6, PO7, PO8) CLO 3. Develop knowledge, skills and techniques necessary in Industry-based professional practice.
4. Apply automation by means of microprocessor/microcontroller platforms.
2. z
Previous Topics
Basic structures of Arduino Programming
setup()
loop()
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
2
3. z
Previous Topics
{} curly braces
; semicolon
/*… */ block comments
// line comments
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
3
5. z
Set the pin 10 into redLED as global variable
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
5
6. z
Read the following terms….
Arithmetic operators
compound assignments
comparison operators
Boolean constants
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
6
7. z
Read the following terms….
If statements
if… else statements
For loop
While loop
Do .. While loop
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
7
9. z
Read the following terms….
arithmetic
compound assignments
comparison operators
logical operators
constants values
if statements
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
9
10. z
Read the following terms….
if… else statement
for statement
while loop statement
do… while statement
pinMode(pin, mode)
digitalRead(pin)
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
10
11. z
Read the following terms….
digitalWrite(pin, value)
analogRead(pin)
analogWrite(pin, value)
delay(ms)
millis()
min(x, y)
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
11
12. z
Read the following terms….
max(x, y)
randomSeed(seed)
random(max)
random(min, max)
Serial.begin(rate)
Serial.println(data)
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
12
13. z
OBJECTIVES
At the end of this lesson, learners will be able to;
summarize the arithmetic operators, compound assignments,
comparison operators, logical operators, and constant values;
recognize the use of if statements, if… else statement, for statement ,
while loop statement, and do… while statement;
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
13
14. z
OBJECTIVES
At the end of this lesson, learners will be able to;
sketch the constant values like pinMode(pin, mode), digitalRead(pin),
digitalWrite(pin, value), analogRead(pin), analogWrite(pin, value),
delay(ms), millis(), min(x, y), max(x, y), randomSeed(seed), random(max),
random(min, max), Serial.begin(rate), and Serial.println(data);
analyze and design code structure, and;
develop their problem-solving skills and use them in their future Arduino
projects to show innovativeness.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
14
15. z
arithmetic
Arithmetic operators include addition,
subtraction, multiplication, and division.
They return the sum, difference, product,
or quotient (respectively) of two operands.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
15
29. z
Write the code on the board.
Logical AND
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
29
30. z
Write the code on the board.
Logical OR
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
30
31. z
Write the code on the board.
Logical NOT
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
31
32. z
constants
The Arduino language has a few
predefined values, which are called
constants. They are used to make the
programs easier to read. Constants are
classified in groups.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
32
44. z
if statements
The given example compares someVariable to
another value, which can be either a variable or
constant. If the comparison, or condition in
parentheses is true, the statements inside the
brackets are run. If not, the program skips over
them and continues on after the brackets.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
44
57. z
What will happen if the expression
inside the parentheses becomes
false?
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
57
63. z
Write a code on the board.
In void setup, set the pin 3 as an
output and in the void loop turn the
LED “on” using digital write.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
63
84. z
Activity
On a ¼ clean yellow pad paper, write a code based
on this diagram. Please use a global variable.
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
84
86. z
MIDTERM HANDS-ON EXAM using
Serial Input from 0-5.
Type 1 to turn on the yellow LED
Type 2 to turn on the green LED
Type 3 to turn on the red LED
Type 4 to sequential blink LEDs
Type 5 to turn on all LEDs
Type 0 to turn off LEDs
11/23/2022
Lesson
3
-
LED
Display
PART
2
|
MIDTERM
|
Mark
John
P.
Lado,
MITc
86