A single pin of the 16F84 PIC microcontroller is limited to a maximum output
current of 25 mA. In most cases, this is too feeble a current to power a dc
motor directly. Instead, we use the output of a PIC pin to turn on and off a
transistor that can easily control the current needed to run hobby motors. The
two methods we use incorporate transistors to switch current on and off. The Transistor The transistor of choice ulled in most of these examples is a TlP120 NPN transistor. The TIP120 is a Darlington transistor, medium power, 5-A maximum current, and designed for general-purpose amplification and low-speed switching. The PNP version of this transistor is the TIP125. First Method This is a simple on-off motor switch (see Fig. 11.1). When the PIC pin is brought high, the transistor goes into conduction, thereby turning on the dc motor. The diode across the collector-emitter junction of the transistor protects the transistor from any inductive voltage surge caused by switching the motor off. For added PIC protection, insert a signal diode and current-limiting resistor on the output pin. ' program dc motor pause 1000 ' wait one second high 0 ' turn on dc motor pause 1000 ' wait one second low 0 ' turn off dc motor end In the circuit, notice the 1500-u.F(micro Faraday) capacitor. A large capacitor is needed to smooth the voltage dips caused by the dc motor's turning on and off. Without a large capacitor, the sudden dip in voltage may inadvertently reset the PIC microcontroller. Bidirectional Method
An H-bridge allows bidirectional control of a dc motor. Th achieve this, it uses
four transistors . Consider each transistor as a simple on-off
switch, as shown in the top portion of the drawing. This circuit is called an Hbridge
because the transistors (switches) are arranged in an H pattern.
Sunday, June 22, 2008
16F8X Family
The PIC16F8X family
The PIC16F8X family of devices are CMOS (Complementary Metal Oxide Semiconductor)
microcontrollers consisting of the PIC16F83, PIC16C83, PIC16F84, PIC16C84, PIC16LCR8X
and PIC16LF8X types.
CMOS technology offers a number of advantages over other technologies. For example, CMOS
circuits consume very little power, operate over quite a wide voltage range and are quite forgiving
of bad layout and electrical noise. The PIC16X8X is available in an 18 pin IC package as shown
in Figure 2.1. The IC consists of two pins for the power supply, two pins for the oscillator, OSC1
and OSC2, a pin for the master reset clear line MCLR and 13 pins for input/output (I/O) ports,
RA0 to RA4 and RB0 to RB7.
PIC Microcontrollers
Introduction
Never before has it been so quick and easy to create microprocessor-based circuits. With the
advent of the new PIC range of 8-bit microcontrollers and the high performance, low cost
software available, a project can take literally a morning to progress from initial conception to
final prototype.
Developing a PIC-based project takes only six easy steps:
1. Type in the program
2. Assemble the program into a binary file
3. Simulate the program and debug it
4. Load the binary program into the PIC’s memory
5. Wire up the circuit
6. Switch on and test.
It’s as easy as that!
In the early 1980s, the term PIC stood for Peripheral Interface Controller. These devices were
originally designed for use in applications with 16-bit microprocessors and computer peripherals,
remote control transmitters, domestic products and automotive systems.
While the PIC data sheets are both comprehensive and informative, it is quite difficult and time
consuming for the beginner to wade through the documentation to find out where and how to
start. The objective of this book is to get the reader up and running in hours rather than days.
After reading this book and building the easy projects described, progressing to more advanced
systems with other PIC microcontrollers is quite straightforward.
What makes a microcontroller useful?
A microcontroller (or microprocessor) can be viewed as a set of digital logic circuits integrated
on a single silicon ‘chip’ whose connections and behaviour can be specified and later altered
when required, by the program in its memory. The great advantage of this, is that in order
to change the circuit’s structure and operation, all that is needed is a change in the program -
very little, if any, circuit hardware modifications are necessary. An alternative view is that a
microcontroller is a state machine whose logic states are defined by its program.
A microprocessor is the Central Processing Unit (CPU) of a computer and a microcontroller
can be regarded as a microprocessor designed specifically for use in applications where machines
such as automobile engines or washing machines are to be controlled. Often the distinction
between microprocessors and microcontrollers is quite blurred, as there is considerable overlap
these days in the classification of different types of computing devices.
A typical microprocessor is a device used in workstation computers, whereas a microcontroller
is usually less powerful and has special features such as PWM (pulse width modulation) and
timer devices integrated on the IC specifically for use in the applications mentioned above.
Never before has it been so quick and easy to create microprocessor-based circuits. With the
advent of the new PIC range of 8-bit microcontrollers and the high performance, low cost
software available, a project can take literally a morning to progress from initial conception to
final prototype.
Developing a PIC-based project takes only six easy steps:
1. Type in the program
2. Assemble the program into a binary file
3. Simulate the program and debug it
4. Load the binary program into the PIC’s memory
5. Wire up the circuit
6. Switch on and test.
It’s as easy as that!
In the early 1980s, the term PIC stood for Peripheral Interface Controller. These devices were
originally designed for use in applications with 16-bit microprocessors and computer peripherals,
remote control transmitters, domestic products and automotive systems.
While the PIC data sheets are both comprehensive and informative, it is quite difficult and time
consuming for the beginner to wade through the documentation to find out where and how to
start. The objective of this book is to get the reader up and running in hours rather than days.
After reading this book and building the easy projects described, progressing to more advanced
systems with other PIC microcontrollers is quite straightforward.
What makes a microcontroller useful?
A microcontroller (or microprocessor) can be viewed as a set of digital logic circuits integrated
on a single silicon ‘chip’ whose connections and behaviour can be specified and later altered
when required, by the program in its memory. The great advantage of this, is that in order
to change the circuit’s structure and operation, all that is needed is a change in the program -
very little, if any, circuit hardware modifications are necessary. An alternative view is that a
microcontroller is a state machine whose logic states are defined by its program.
A microprocessor is the Central Processing Unit (CPU) of a computer and a microcontroller
can be regarded as a microprocessor designed specifically for use in applications where machines
such as automobile engines or washing machines are to be controlled. Often the distinction
between microprocessors and microcontrollers is quite blurred, as there is considerable overlap
these days in the classification of different types of computing devices.
A typical microprocessor is a device used in workstation computers, whereas a microcontroller
is usually less powerful and has special features such as PWM (pulse width modulation) and
timer devices integrated on the IC specifically for use in the applications mentioned above.
Subscribe to:
Posts (Atom)