Microprocessors and Microcontrollers Design
Microprocessors and Microcontrollers Design
a clock
a reset circuit
Power Supply
As with every electrical circuit, we need a reliable power supply. You must
create a power supply circuit that accepts the range of expected input
voltages and provides all supply voltages that the microcontroller needs.
Please don't forget to include a decoupling (aka bypass) capacitor for each
V pin—this applies to the microcontroller as well as all other integrated
CC
circuits on the board. The typical value is 100 nF, but always check the
device's datasheet just in case it provides specific decoupling
recommendations.
Clock
The clock is the heartbeat of the microcontroller. Without a heartbeat, a
microcontroller can't do anything. It simply won't run.
Many microcontrollers include an internal clock source, and this is usually
the best option if you don't need a highly stable or highly precise clock
frequency. When high stability or precision is needed, a common choice is a
crystal-based oscillator.
Consider the following factors as you carefully choose the right clock
source:
the desired frequency
the frequency tolerance from part to part
package
An example of 10-pin and 6-pin pinouts for in-system programming (ISP) headers. Image courtesy of osiixy (own work) [CC BY
3.0]
Integrated development environment (IDE) software allows you to create a program and load it into the microcontroller's flash
memory. Image courtesy of ARM Inc.
Programming Tool
You need a programming software tool in order to load your program file
into your microcontroller's flash memory. Usually you will use the
programming functionality that is incorporated into the integrated
development environment (IDE) that you use to write your firmware.
Microprocessors and microcontrollers can be used to design some tools or systems to perform some special tasks.
Using microcontrollers, we can make different types of modules or systems. Here is a list of some systems that can be
designed by using microcontrollers −
We can divide this circuit into some several parts. In the first part we will see how the circuit is taking information
physically. There are two components Q4 and D4. The Q4 is a photo transistor (2N5777), and D4 is one Red LED. If
light comes into this photo transistor, it collector current turns drops towards 0. At first we have to attach some rotating
disc on the shaft, and there will be one punch hole. When the disc is rotating, at the upper portion of the disc the LED is
attached, and at the lower portion the photo transistor is set. When the disc comes in the same line, the light hits the
photo transistor, and the collector current drops down to zero. This following figure is showing how it will be looking if
we see that using an oscilloscope.
In the next part we can see there is an OPAMP (Operational Amplifier) in the circuit. For the OPAMP, we have used
LM234 Chip. This chip is holding four OPAMPs, but here we have used one of them. In this circuit the OPAMP is
connected as a voltage comparator. Here the reference voltage is 3.5V. So if the output voltage of the photo transistor
is greater than 3.5V, then it will generate high pulse, otherwise it will generate 0 level signal. From this comparator we
will get the square wave pulses of the previous output.
From this falling edge we can understand that hole has come, so there is one revolution. This clock pulse is fed into the
microcontroller. This signal can be used to count the number of revolutions.
At the third part the microcontroller is working. This microcontroller is performing two tasks together. These two tasks
are −
Counting the number of negative edges from the output of the comparator.
Do necessary mathematics, and display the count on the seven segment display array.
To count the revolutions, we have used both the timers (Timer0 and Timer1) of 8085. Here Timer1 is configured as
auto-reload 8-bit counter, and for registering the number of incoming zeros are stored into Timer0. The Timer0 is set as
16-bit timer, and it generates the necessary one second time span for the Timer1 to count.