0% found this document useful (0 votes)
170 views

Nunez Activity 3 Setting Up and Programming Controllers

1. This activity aimed to demonstrate programming a microprocessor system and introduce debugging procedures. 2. Students were asked to write programs to control LEDs on an Arduino board to perform tasks like turning on odd-numbered LEDs or blinking them in sequences. 3. The document discussed using C/C++ languages and Arduino boards to create microprocessor systems and provided examples of coding and simulations that blinked LEDs in different patterns.

Uploaded by

RUEL ALEJANDRO
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views

Nunez Activity 3 Setting Up and Programming Controllers

1. This activity aimed to demonstrate programming a microprocessor system and introduce debugging procedures. 2. Students were asked to write programs to control LEDs on an Arduino board to perform tasks like turning on odd-numbered LEDs or blinking them in sequences. 3. The document discussed using C/C++ languages and Arduino boards to create microprocessor systems and provided examples of coding and simulations that blinked LEDs in different patterns.

Uploaded by

RUEL ALEJANDRO
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Activity No.

3
Setting up and Programming Controllers
Course Code: CPE006 Program: BSCPE
Course Title: Microprocessor Systems Date Performed: 9/10/20
Section: Date Submitted: 9/10/20
Name: Nunez, Nathaniel J. Instructor: Engr. Arriane D.
Cabreros

1. Objective:
This activity aims to demonstrate the concept of programming a microprocessor-based
system. Another aim of this activity is to introduce procedures in testing and identification
of errors in a program.

2. Intended Learning Outcomes (ILOs):


After completion of this activity the students should be able to:
2.1 Write a functional program for a microprocessor-based system
2.2 Compile and Upload a processor source code
2.3 Identify errors and Debug issues in a source code for LED control.

3. Discussion:

C is a high-level programming language that was developed in the mid-1970s. It was originally used
for writing Unix programs, but is now used to write applications for nearly every available platform.
Compared to most previous languages, C is easier to read, more flexible (can be used for a wide
variety of purposes), and more efficient at using memory.

C++, pronounced "C plus plus," is a programming language that was built off the C language. The
syntax of C++ is nearly identical to C, but it has object-oriented features, which allow the programmer
to create objects within the code. This makes programming easier, more efficient, and some would
even say, more fun. Because of the power and flexibility of the language, most software programs
today are written in C++.

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
1. Configure and connect the circuit to the microcomputer device. Each of the individual
LED’s are connected to a unique output pin as seen in the following block diagram. Draw
the circuit diagram on the results section.

Figure 1. Block Diagram

2. Test the function of each digital pin by turning ON all the LED’s in the system.
3. Write a flowchart and program that controls the activity of LED bulbs. The program
should be able to perform the following separately.
a. Turn on only the bits at the ODD position.

b. Blink one bulb at a time, and then repeat when finished.

c. Alternately blink odd and even bulbs with a 100 millisecond interval on a continuous
loop.

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
Circuit Diagram in TickerCAD

Simulation #1 : Turn ON ODD position.

https://www.tinkercad.com/things/fcNUIBztsLT-copy-of-activity-
3/editel?tenant=circuits?sharecode=fpHAvtf7CSrEn2355KSeRU95QG-Mm0ZrEsTv5ZOa5J4

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
Simulation #2: Blink one bulb at a time.

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
https://www.tinkercad.com/things/dGnUWIay8iC-activity-3/editel?sharecode=5F2n-
wC4xtMbuIzCju6ZMDo6agGpgAi1x7P7ZGufEgg

Simulation #3: Alternate blink ODD / EVEN.

https://www.tinkercad.com/things/gk9j7FCGdrl-copy-of-activity-
3/editel?tenant=circuits?sharecode=nL-pWZG20rS-hoqZIa1UphoJ2QzQzlWXlZuQ69YDPiU

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
Test Results

Pin Number Voltage HIGH Voltage LOW Remarks


1 4.85V 0V N/A
2 4.85V 0V N/A
3 4.85V 0V N/A
4 4.85V 0V N/A
5 4.85V 0V N/A
6 4.85V 0V N/A
7 4.85V 0V N/A
8 4.85V 0V N/A

Observations
As I performed this activity in TinkerCAD using that codes I learned. I can manipulate each LED
to perform in ODD positions, blink one at a time and alternate blink ODD/EVEN. For the first time
I used Arduino, this open-source electronic prototyping platform is so interesting, creating a
beautiful lights LED running a different positions. Video tutorials is very helpful, I made my own
codes that I can input and run to my simulation projects.
Conclusion
I therefore conclude that, using high-level language (C/C++ Language) and Arduino are the best
tools to create a microprocessor-based system. Aside from that, Arduino is a great choice for
beginners. The Arduino does not need a separate piece of hardware in order to load new code
onto the board. The user can simply use a USB cable. Additionally, the Arduino IDE uses a
simplified version of C++, making it easier to learn to program. Finally, Arduino provides a
standard form factor that breaks out the functions of the micro-controller into a more accessible
package.

This study source was downloaded by 100000851009397 from CourseHero.com on 08-22-2022 01:15:12 GMT -05:00

https://www.coursehero.com/file/87380055/Nunez-Activity-3-Setting-up-and-Programming-Controllerspdf/
Powered by TCPDF (www.tcpdf.org)

You might also like