1.Dr - Mohamed Abdel Motelb - Introduction To Computer
1.Dr - Mohamed Abdel Motelb - Introduction To Computer
Department
| Page1
Table of contents
Titles Page
introduction 3
Microcontroller Architecture 6
Microcontroller features 7
Types of microcontrollers 8
Microcontroller applications 9
conclusion 11
reference 12
| Page2
introduction
| Page3
How do microcontrollers work?
| Page4
programmed to execute. A microcontroller has two key types of
memory:
the CPU carries out over the long term. Program memory is non-volatile
memory, meaning that it retains information over time without a power
source being required.
| Page5
.System bus — The system bus is the connective wire which connects all
microcontroller components together.
Microcontroller Architecture
| Page6
I / O ports: A microcontroller has multiple parallel input / output ports.
They are used to connect different peripherals to the microcontroller,
including printers, external memories, LEDs and LCDs. In addition to
parallel ports, there are serial ports to serially connected microcontroller
interface peripherals.
Microcontroller features
A processor for a microcontroller can differ according to application.
Options vary from basic 4-bit, 8-bit, or 16-bit processors to more
complex 32-bit processors, or 64-bit. Microcontrollers can use volatile
memory types such as random access memory ( RAM) and non-volatile
memory types — which includes flash memory, erasable read-only
programmable memory (EPROM) and programmable read-only memory
(EEPROM) that can be erased electrically. Typically speaking,
microcontrollers are built to be user-friendly without external computing
hardware, as they are equipped with ample onboard memory and
provide pins for general I / O operations so that they can communicate
| Page7
directly with sensors and other hardware. The architecture of
microcontrollers can be based on Harvard architecture or von Neumann
architecture, both providing different methods of data exchange
between processor and memory. The data bus and instruction are
separate with a Harvard architecture, allowing for simultaneous
transfers. One bus is used with a Von Neumann architecture for both
data and instructions. Microcontroller processors may be based on
complex computing instruction set (CISC) or reduced computing
instruction set (RISC). CISC usually has about 80 instructions while RISC
has about 30, as well as more modes of addressing, 12-24 compared to
RISC's 3-5 instructions. Although CISC can be simpler to implement and
have more efficient memory use, performance degradation can occur
due to the increased number of clock cycles needed to execute
instructions. RISC, which places more emphasis on software, often
delivers better performance than CISC processors, which put more
emphasis on hardware because of its simplified set of instructions and
hence greater simplicity in design, but because of its emphasis Places on
the software can be more complicated. Every ISC will be used differs
according to application. When they got available for the first time,
microcontrollers used assembly language only. Today a common
alternative is the C programming language. Other common languages for
the microprocessor include Python and JavaScript. MCUs use input and
output pins for peripheral function implementations. Such functions
include analog to digital converters, LCD controls, real-time clock (RTC),
universal synchronous / asynchronous receiver (USART), timers,
universal asynchronous receiver (UART) and universal serial bus ( USB)
communication. Sensors that collect data relating to humidity and
temperature are most often connected to microcontrollers, among
others.
Types of microcontrollers
Microcontroller applications
| Page9
as well as in robots in aircraft , spacecraft, ocean-going vessels, vehicles ,
medical and life-support systems. Microcontrollers may regulate the
functions of an artificial heart , kidney, or other organs in medical
scenarios. We can also participate Be instrumental in making prosthetic
devices work.
• Peripheral controller of a PC
• Robotics
• In bio-medical equipment
• In communication system
• In automobiles
• In fire detection devices
• In light and temperature sensing and controlling devices
• Process control and industrial automation devices
• In measuring devices such as volt and current meters
.This has within just the CPU; i.e. computing powers like Intel's Pentium
1,2,3,4 core 2 duos, i3, i5 etc.
.Do not have RAM, ROM, and other chip peripherals. To render them
usable the machine designer needs to add them externally.
.Since microprocessors can not be used alone as RAM, ROM and other
peripherals are required, the device using microprocessors is more
expensive than a microcontroller.
Microcontroller
| P a g e 10
.Embedded in a single chip is a microcontroller CPU, RAM, ROM, and
other peripherals.
.Since the applications are very specific, small resources such as RAM ,
ROM, I / O ports are needed and thus can be embedded on a single chip.
conclusion
Once all that has been said and done, creating an instrument or a
controller is a matter of putting together a set of components and
software parts, each of which has a particular purpose not unlike what
we've done in almost all the projects in this tutorial. In do so, we
addressed the most basic techniques. Certain methods which are more
| P a g e 11
complex should not be more difficult to examine and install. It should
not be difficult to write a short program to examine what needs to be
done for every part of your project, with the skills you now have. When
timer constraints get in the way, it can get complicated to integrate the
code into a larger programme. Typically the toughest challenge would be
to get the programs to run quickly enough to get the job done within the
time available. We've seen this in the programs that had to upgrade the
displays in seven segments. We did run all the programs at 4 MHz,
however, and you will find that there can be considerably more Failed
at20 MHz. Most PICs can run at 20 MHz whereas some of the newer can
run at 40 MHz. Repeated measurements and comparisons are time
consuming, even as the LCD is being prepared. Iterations can be very
time consuming and should be avoided. Evite or minimize the number of
times a calculation is performed and the LCD is written to. If you can do
a calculation right up front, do it and store the result. Stop performing
the same calculation in a loop again and again. Knowing how to use the
timers and counters really is worth your while. We are the secret to
getting a lot of stuff done properly, easily and at the right time. Create a
line of code in your programs at a time , and make sure you understand
exactly what every line of code does. The 16F877A has memory in 8K.
Most of the programs we wrote were within the range of 400-to 800-
word, so far more sophisticated programs can be written without adding
any memory. On the other hand, it is neither difficult to add one-wire
memory, nor expensive.
Reference
1=https://internetofthingsagenda.techtarget.com/definition/microcontr
oller
2- https://openlabpro.com/guide/basics-of-microcontroller\
| P a g e 12