0% found this document useful (0 votes)
13 views7 pages

Micro Controller

This document is an assignment submission by Sarthak Pradhan for the module CET137, focusing on micro-controllers and their programming. It discusses the definition, functionality, and programming process of micro-controllers, comparing it with console application programming. The document also emphasizes the importance of academic integrity and the use of artificial intelligence tools in the completion of the assignment.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Micro Controller

This document is an assignment submission by Sarthak Pradhan for the module CET137, focusing on micro-controllers and their programming. It discusses the definition, functionality, and programming process of micro-controllers, comparing it with console application programming. The document also emphasizes the importance of academic integrity and the use of artificial intelligence tools in the completion of the assignment.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Faculty: Faculty of Business and Technology

Programme of Study: [Link]


NAME: Sarthak Pradhan

STUDENT NUMBER: 240704263

MODULE CODE: CET137

MODULE TITLE: Introduction to Programming

MODULE LEADER: David Grey

SUBMISSION DATE AND TIME: 07/04/2025, 12:59:59

ASSIGNMENT:2

Academic Misconduct is an offence under university regulations, and this involves:

 Plagiarism – where you use information from another information source (including your previously
submitted work) and pass it off as your own. This can be through direct copying, poor paraphrasing
and/or absence of citations.
 Collusion – where you work too closely, intentionally, or unintentionally, with others to produce work
that is similar in nature. This can be through loaning of materials, drafts or through unauthorised use
of a fellow student’s work.
 Asking another person to write your assignment – where you ask another individual or company to
complete your work for you, be that paid or unpaid, and submit it as if it were your own.
 Unauthorised use of artificial intelligence – where you use artificial intelligence tools to generate
your assignment instead of completing it yourself and/or where you have not been given permission
to use artificial intelligence tools by your module leader. Please complete the following declaration
around you use of artificial intelligence tools in your assignment.

STATEMENT ON USE OF ARTIFICIAL INTELLIGENCE TOOLS:

 I have used artificial intelligence tools to generate an idea for my assignment: YES
 I have used artificial intelligence tools to write my assignment for me: NO
 I have used artificial intelligence tools to brainstorm ideas for my assignment: YES
 I have used artificial intelligence tools to correct my original assignment: NO

DECLARATION

 I understand that by submitting this piece of work I am declaring it to be my own work and in
compliance with the university regulations on Academic Integrity.
 I confirm that I have done this work myself without external support or inappropriate use of
resources.
 I understand that I am only permitted to use artificial intelligence tools in line with guidance provided
by my Module Leader, and I have not used artificial intelligence tools outside this remit.
 I confirm that this piece of work has not been submitted for any other assignment at this or another
institution prior to this point in time.
 I can confirm that all sources of information, including quotations, have been acknowledged by citing
the source in the text, along with producing a full list of the sources used at the end of the assignment.
 I understand that academic misconduct is an offence and can result in formal disciplinary proceedings.
 I understand that by submitting this assignment, I declare myself fit to be able to complete the
assignment and I accept the outcome of the assessment as valid and appropriate.

ANY OTHER COMMENTS FROM STUDENT:


Introduction

As a Junior Software Developer, I recently had the opportunity to explore micro-


controllers as part of a project requiring the use of Arduino. This report outlines my
experience and understanding of how micro-controllers work, how they are
programmed, and how this compares to developing traditional console applications.
Drawing on practical examples, I am here to highlight both the similarities and
differences based on hands-on development and problem-solving.

What is a Micro Controller?

A micro-controller is a single integrated circuit that comprises various elements,


including a microprocessor, timers, counters, input/output (I/O) ports, random access
memory (RAM), read-only memory (ROM), and some other components. These parts
work together to execute a pre-programmed set of specific tasks. Thus, a micro-
controller is like a little computer that processes and even executes control in an
electronic device.

Many people incorrectly label development boards such as those developed by


Arduino as micro-controllers. However, Arduino is more accurately described as a
development platform that centers around easily programmable boards with micro-
controllers at their core. The “Arduino” itself is just an elaborate board that houses
all the components of the micro-controller, along with some extra ports and other
features. This enables you to program and re-program the micro-controller for various
tasks.

How Does a Micro-controller Work?

To understand why micro-controllers form an important part of our modern


electronics world, just look at any electronic device accessible to you. micro-
controllers are at the heart of any embedded system today. So, let’s start with your car.

Suppose your car has the functionality for automatic windshield wipers. These wipers
are to turn on when there are rain showers and turn off automatically once the rains
end. But how does it execute a function that’s so specific and repetitive?

In such a system, a micro-controller is responsible, pre-programmed for exactly this


scenario. Input from the sensors that are connected to your windshield is provided to
and processed by the CPU, which then matches the signals with the program already
inscribed in the memory of the micro-controller.

If the logic of the micro-controller deduces that, yes, it’s raining, it gives the
command to the corresponding output (in this case, the windshield wiper motor). This
way, the micro-controller not only processes the input but also controls the output in
the system. And all these elements are built into a single chip that’s sometimes
smaller than your thumbnail.

So, basically it follows a simple steps: Input, Processing , Output & Continuous
Operations.

Input: The micro-controller receives signals from external devices (like sensors or
buttons) through its input pins.

Processing: Its central processor (CPU) accesses instructions stored in program


memory (usually flash or ROM) and temporary data in RAM. It decodes and executes
these instructions, performing calculations or logic operations as needed.

Outputs: Based on the processed data, the micro-controller sends signals to output
devices (like LEDs, motors, or displays) via its output pins.

Continuous Operation: This process repeats continuously, allowing the micro-


controller to monitor and control its environment in real time.

How do you program a micro-controller?


Programs for micro-controllers can be provided by the manufacturer,
like Arduino's IDE.

Well-built hardware is just one side of the story. micro-controllers would be of no use
if they couldn’t be programmed. Programming a micro-controller means feeding in
the logic and sets of instructions that the micro-controller will require while executing
the task. Overall, the programming aspect of the micro-controller is a three-step
procedure.

1. Programming

Here, we write the actual code for the micro-controller, usually in higher-level
languages such as C, C++, or Java. Typically, a software platform called an
Integrated Development Environment (IDE) is used to write the program, and in
many cases, this is provided by the manufacturer of the micro-controller itself. An
IDE comprises all the tools that you might need to successfully program your micro-
controller. So, for example, the Arduino IDE is used for programming Arduino
boards with AVR-based micro-controllers.

2. Compiling

In the compiling step, the written code is translated in such a way that the micro-
controller can interpret it. A compiler assembles the code in such a way that the
micro-controller understands which operations to perform to match the input code.
Once this output code is successfully compiled, it’s then ready for uploading.

3. Uploading

This is where you write the program to the micro-controller’s memory. Most micro-
controller boards allow for a USB interface, so you can directly upload the code from
your computer. If all goes well, your micro-controller is now ready for the
programmed task.
Comparison of Microprocessor Programming & Console Application
Programming

 Similarities

1. Both Microprocessor & Console Application Programming use a programming


language like C, C++ & many more.

2. In both cases, you write code on a computer, compile it, and then execute it—
though the execution environment differs.

3. Both environments use variables, operators, and control flow statements (like if,
for, while) to manage logic and data in the program.

4. Both types of programming use comments to document code, making it easier to


understand and maintain for yourself or others.

 Differences

1. For eg: Code comparison between Microprocessor & Console Application


programming.

I. Microprocessor
II. Console Application Programming

2. Console applications usually run on a computer with an operating system, which


manages resources and provides services. Micro-controller programs usually runs
without an operating system, meaning the program must handle everything itself and
usually runs in a continuous loop without ending.

3. Micro-controller programming often requires direct interaction with hardware


(such as registers and peripherals), whereas, console applications interact with
hardware through higher-level concept provided by the OS.

Conclusion

Now that we understand what a micro-controller is, we can look at some micro-
controller based applications and projects. You might not even realize how widely
used micro-controllers are today. Some very common applications of micro-
controllers are automated teller machines (ATM), calculators, robots, measuring
instruments, microwaves, cars, fire systems, and even implantable medical devices.
The list goes on and on. Everywhere you look, anything that you think is controlled
electronically, chances are you’re looking at one of the micro-controllers that we’ve
looked at today.

Reference links

1. [Link]
2. [Link]
3. [Link]

You might also like