Date: 06/11/2013 (Wednesday)
Title: Research and Findings (PIC 16F877A)
ANALYSIS
Moving up the Microchip PIC16F Microcontroller
family, we have the PIC16F877A. This is a very common MCU and it’s always
mentioned in DIY projects. It’s popular among students, hobbyist and even
engineers because it’s cheap. It is cheaper than its little brother which is
the PIC16F84A. Another reason is the sheer amount of input and output pins
available on this MCU. Among other things, this MCU also has Analog to Digital
conversion capability without the need of an external chip.
PIC (Peripheral Interface Controller) is the IC
which was developed to control peripheral devices, alleviating the load from
the main CPU (Control Processing Unit). Compared to a human being, PIC is
equivalent to the autonomic nervous system. The PIC, like the CPU, has
calculation functions and memory, and is controlled by the software. However,
the throughput and the memory capacity are low. Depending on the kind of PIC,
the maximum clock operating frequency is about 20 MHz and the memory capacity
to write the program is about 1000 to 4000 words. The clock frequency
determines the speed at which a program is read and an instruction is executed.
The throughput cannot be judged with the clock frequency alone. It changes with
the processor architecture. However within the same architecture, the one with
the highest clock frequency has the highest throughput.
The PIC is convenient for making calculations.
The memory, the input or output ports and so on are incorporated into the IC
(Integrated Circuit). The efficiency and the functions are limited, but the PIC
can do the job of many IC's with software. Therefore, the circuit can be
compact. Among all the PIC MCU families, the popular PIC16F877A was chosen
because of its variety of hardware modules needed for most applications.
PIC 16F877A |
Device Programmers
Devices called "programmers" are
traditionally used to get program code into the target PIC. Most PICs that
Microchip currently sells feature ICSP (In Circuit Serial Programming) and/or
LVP (Low Voltage Programming) capabilities, allowing the PIC to be programmed
while it is sitting in the target circuit. ICSP programming is performed using
two pins, clock and data, while a high voltage (12V) is present on the Vpp/MCLR
pin. Low voltage programming dispenses with the high voltage, but reserves exclusive
use of an I/O pin and can therefore be disabled to recover the pin for other
uses (once disabled it can only be re-enabled using high voltage programming).
There are many programmers for PIC
microcontrollers, ranging from the extremely simple designs which rely on ICSP
to allow direct download of code from a host computer, to intelligent
programmers that can verify the device at several supply voltages. Many of
these complex programmers use a pre-programmed PIC themselves to send the
programming commands to the PIC that is to be programmed. The intelligent type
of programmer is needed to program earlier PIC models (mostly EPROM type) which
do not support in-circuit programming.
Many of the higher ends flash based PICs can
also self-program (write to their own program memory). Demo boards are
available with a small boot loader factory programmed that can be used to load
user programs over an interface such as RS-232 or USB, thus obviating the need
for a programmer device. Alternatively there is boot loader firmware available
that the user can load onto the PIC using ICSP. The advantages of a boot loader
over ICSP is the far superior programming speeds, immediate program execution
following programming, and the ability to both debug and program using the same
cable.
Programmers/debuggers are available directly
from Microchip. Third party programmers range from plans to build your own, to
self-assembly kits and fully tested ready-to-go units. Some are simple designs
which require a PC to do the low-level programming signalling (these typically
connect to the serial or parallel port and consist of a few simple components),
while others have the programming logic built into them (these typically use a
serial or USB connection, are usually faster, and are often built using PICs
themselves for control).
PIC Programmer (Program Burner) |
Crystal Oscillator
(20MHz)
PIC
16F877A has an on-chip RC oscillator but it is used for ADC operation. But the
external oscillators (usually 4 - 20MHz) are required for operating the PIC.
No comments:
Post a Comment