useful ccts-converted
useful ccts-converted
02/01/2021
Power supply circuit for micro-
controller
using Ac power
Using DC power
Input ac power with out put 5VDC &
12VDC
With high current 5VDC
Interfacing LED to microcontroller
Interfacing Pushbuttons to micro
controller
Push button
interfacing –
Microcontrolle
r sourcing the
current
Here, the switch is directly connected to the
microcontroller through a resistor to limit the
sourcing current. Sourcing current is the current
which passes to the microcontroller when the
switch is closed (ON state). There is maximum
sourcing current defined for different
microcontrollers. Use the datasheet to find it out.
The current passing through this circuit should
be less than the maximum current.
In pull-down mode,
the current flows to
the current when the
switch is pressed. In
open state, the pin is
connected to the
ground via a resistor.
In this mode, the
output acts as an
active high.
Key de-bouncing – Hardware filters
We can filter the bounces using filter circuits. The
most basic circuit is given below, in this debounce
filter is connected in pull-down mode. The capacitor
filters spikes and smoothens mechanical switch
bounce.
The circuit is not a perfect replacement to the
software de-bouncing because it provides filtering
only in open to closed transition. It will still bounce
during closed to open transition because the
capacitor shows a short across it. Using the de-
bouncing circuit with software will be a better
option.
Interfacing a rely
Interfacing a relay to operate ac bulb
Opto-coupler interface
To operate AC bulb
Interfacing a Dc motor to
microcontroller
Relay with dc motor
Using a relay operate ac motor
H-bridge cct
Using BJTs
How to operate PNP &NPN
Operating of MOSFETS
Operate as switch
To operate lamp
Interfacing Servomotor
Multiple servo-motors
Interfacing with servo driver
Make Your Own PIC12F683
Microcontroller Development Board
Microcontroller Development Board
In order to enable the microcontroller to
operate properly it is necessary to provide:
• Power supply;
• Reset signal; and
• Clock signal
POWER SUPPLY
Even though the PIC16F887 can operate at different power supply
voltages, why test ‘Murphy’s law’?! A 5V DC power supply voltage is
the most suitable. The circuit, shown on the previous page, uses a
cheap integrated three-terminal positive regulator LM7805 and
provides a highquality voltage stability and quite enough current to
enable the microcontroller and peripheral modules to operate
normally (enough means 1A).
RESET SIGNAL
In order for the microcontroller to operate properly, a logic one (VCC)
must be applied on the reset pin. A push button connecting the MCLR
reset pin to GND is not necessary, but is almost always provided as it
enables the microcontroller to recover fast if something goes wrong.
By pressing this button, the MCLR pin is supplied with 0V, the
microcontroller reset occurs and the program execution starts from
the beginning. A 10K resistor is used to prevent shortening the 5V DC
rail to earth from occuring when the RESET button is pressed.
CLOCK SIGNAL
• Even though the microcontroller has a built-in
oscillator, it cannot operate without external
components which make its operation stable and
determine its operating frequency. Depending
on components in use and their operating
frequencies, the oscillator can be run in four
different modes:
• LP - Low Power Crystal;
• XT - Crystal / Resonator;
• HS - High speed Crystal / Resonator; and
Ceramic Resonator