0% found this document useful (0 votes)
51 views20 pages

Microcontrollers - Chapter 02

The document discusses Microchip's PIC microcontrollers, focusing on the PIC architecture and development process. It describes the main PIC families, including the baseline, mid-range, and high-performance groups. It also covers the tools needed for PIC programming, such as compilers, programmers, and development boards, as well as techniques for prototyping PIC circuits using breadboards and printed circuit boards. The lecture is presented by Dr. Mohammad Aqel for the first semester of 2021-2022 at Al-AZHAR University.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views20 pages

Microcontrollers - Chapter 02

The document discusses Microchip's PIC microcontrollers, focusing on the PIC architecture and development process. It describes the main PIC families, including the baseline, mid-range, and high-performance groups. It also covers the tools needed for PIC programming, such as compilers, programmers, and development boards, as well as techniques for prototyping PIC circuits using breadboards and printed circuit boards. The lecture is presented by Dr. Mohammad Aqel for the first semester of 2021-2022 at Al-AZHAR University.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Faculty of Engineering & Information Technology

Al-AZHAR UNIVERSITY

Microcontrollers:
Programming and Applications
(ITME 4336 )

Chapter 2
The Microchip PIC
Lecturer: Dr. Eng. Mohammad Aqel
First Semester 2021/2022

Alazhar University Dr. Mohammad Aqel 1


GAZA First Semester 2021/2022
The Microchip PIC
• Microcontrollers are embedded in many control,
monitoring, and processing systems.

• Most microcontrollers are used in specialized systems


such as washing machines, telephones, microwave
ovens, automobiles, and weapons of many kinds.

• A microcontroller usually includes a central processor,


input and output ports, memory for program and data
storage, an internal clock, and one or more peripheral
devices such as timers, counters, analog-to-digital
converters, and serial communication facilities.

Alazhar University Dr. Mohammad Aqel 2


GAZA First Semester 2021/2022
• More than two dozen companies in the world
manufacture and market microcontrollers.

• They range from 8- to 32-bit devices. The most


popular ones include several from Intel (such as
the 8051), Zilog (derivatives of their famous Z-80
microprocessor), Motorola (such as the
68HC05), Atmel (the AVR), Parallax (the BASIC
Stamp), and Microchip.

Alazhar University Dr. Mohammad Aqel 3


GAZA First Semester 2021/2022
The PICMicro Microcontroller
• PIC is a family of microcontrollers made by
Microchip Technology.

• This device was called PIC for “Programmable


Intelligent Computer” although it is now
associated with “Programmable Interface
Controller.”

Alazhar University Dr. Mohammad Aqel 4


GAZA First Semester 2021/2022
• One of the reasons for the success of the PIC
is the support provided by Microchip:

– a professional-quality development environment


called MPLAB which can be downloaded free from
the company’s website.

• The MPLAB package includes an assembler, a linker, a


debugger, and a simulator.

– The Microchip website provides hundreds of free


support documents, including data sheets,
application notes, and sample code.

Alazhar University Dr. Mohammad Aqel 5


GAZA First Semester 2021/2022
• PICs use an instruction set that varies in length
from about 35 instructions for the low-end PICs
to more than 70 for the high-end devices.

• The PICs are programmable in their native


Assembly language, which is straightforward
and not difficult to learn. In addition, C language
and BASIC compilers have been developed for
the PIC [PICBasic, PICC, MikroC, and
MikroBasic compilers]

Alazhar University Dr. Mohammad Aqel 6


GAZA First Semester 2021/2022
Programming the PIC
• Programming a PIC microcontroller requires the following
tools and components:

1. An Assembler or high-level language compiler. The software package usually includes


a debugger, simulator, and other support programs.

2. A computer (usually a PC) in which to run the development software.

3. A hardware device called a programmer that connects to the computer through the
serial, parallel, or USB port.

– The PIC is inserted in the programmer and “blown” by downloading the executable
code generated by the development system.

– The hardware programmer usually includes the support software.

4. A cable or connector for connecting the programmer to the computer.

5. A PIC microcontroller.

Alazhar University Dr. Mohammad Aqel 7


GAZA First Semester 2021/2022
PIC Programmers
• The development system (assembler or
compiler) and the programmer driver are the
software components.

• The computer, programmer, and connectors


are the hardware elements.

• The figure shows a commercial programmer


that connects to the USB port of a PC. The one
in the illustration is made by MicroPro. USB PIC Programmer by MicroPro

Microchip offers several high-end models with In Circuit Serial


Programming (ICSP) and Low Voltage Programming (LVP) capabilities.
These devices allow the PIC to be programmed in the target circuit.

Alazhar University Dr. Mohammad Aqel 8


GAZA First Semester 2021/2022
Development Boards
• A development board is a demonstration
circuit that usually contains an array of
connected and connectable components.

• Their main purpose is as a learning and


experimental tool.

• Most boards target a specific PIC


microcontroller or a PIC family of related
devices.

•The Figure shows the LAB-X1 development board for the


16F87x PIC family.
Alazhar University Dr. Mohammad Aqel 9
GAZA First Semester 2021/2022
Prototyping the PIC Circuit
• Very few of us are satisfied with
writing a PIC program and assuming
that it works correctly.

• Testing software is a simple matter if


there happens to be a development
board at hand, if the board is
compatible with the PIC, and if it
provides the hardware that we need to
test.

• But often one of these elements is


missing and it becomes necessary to
build the circuit for which the program
was designed. Breadboarding a
prototype circuit is one of the options.
Alazhar University Dr. Mohammad Aqel 10
GAZA First Semester 2021/2022
• Using a breadboard to prototype the
circuit.

• A breadboard is a reusable, solderless


device that allows building a prototype
circuit, usually for temporary use.

• Breadboards have strips down one or


both sides that are used as power rails.
One strip carries the circuit’s positive
voltage and the other one is wired to the
ground of the power supply.

• The Figure shows two interconnected breadboards used to test


one of the programs developed.

Alazhar University Dr. Mohammad Aqel 11


GAZA First Semester 2021/2022
• Once a circuit and the software have been
tested, there are several available technologies
for building a more permanent prototype.

• These include wire wrap, stripboards, and


several other circuit board building tools and
techniques, including prototyping boards
Wire wrap circuit board
specially designed for PIC circuits.

Prototyping boards for PIC 16F84/ 16F628

Strip Boards

Alazhar University Dr. Mohammad Aqel 12


GAZA First Semester 2021/2022
• Finally, one can build a printed circuit board (PCB) and solder
the components to it.

• A PCB is used to mechanically support the electronic


components and provides conductive pathways, called traces,
that implement the circuit.

• The components are soldered to the PCB board using either


surface mount or through-the-board technology.

• Once the board has been populated with electronic


components it becomes a printed circuit assembly, or PCA.

Alazhar University Dr. Mohammad Aqel 13


GAZA First Semester 2021/2022
Building one’s own PCB is
quite possible and requires few
tools and resources. The Figure
shows a drawing of both sides
of a simple PCB board.
Drawing for Etching a PCB Board

The PCB in the Figure is intended for a copper-plated single-


sided blank. The left-side image shows the actual circuit that is
etched on the copper side of the board. The text and diagrams on
the right-hand image are engraved (usually by silk screening) on
the back side of the board and serve as a guide for welding the
components.
Alazhar University Dr. Mohammad Aqel 14
GAZA First Semester 2021/2022
PIC Architecture
• PIC controllers are roughly classified by Microchip into
three groups: baseline, mid-range, and high-performance.

• Within each of the groups the PICs are classified based


on the first two digits of the PIC’s family type. However,
the sub-classification is not very strict, since there is some
overlap.

• For this reason we find PICs with 16X designations that


belong to the baseline family and others that belong to the
mid-range group.

• In the following subsections we describe the basic


characteristics of the various subgroups of the three major
PIC families with 8-bit architectures.
Alazhar University Dr. Mohammad Aqel 15
GAZA First Semester 2021/2022
Baseline PIC Family
• This group includes members of the PIC10, PIC12, and
PIC16 families. Examples: 10F200, 12C518, 16F506.

• The devices in the baseline group have 12-bit program


words and are supplied in 6- to 28-pin packages.

• The microcontrollers in the baseline group are described


as being suited for battery- operated applications since
they have low power requirements.

• The typical member of the Baseline group has a low pin


count, flash program memory, and low power
requirements.

Alazhar University Dr. Mohammad Aqel 16


GAZA First Semester 2021/2022
Mid-range PIC Family
• The mid-range PIC family includes members of the PIC12
and PIC16 groups.

• According to Microchip, the mid-range PICs all have 14-


bit program words with either flash or OTP program
memory.

• Those with flash program memory have EEPROM data


memory and support interrupts.

• Some members of the mid-range group have USB, I2C,


LCD, USART, and A/D converters.

• Implementations range from 8 to 64 pins.


Alazhar University Dr. Mohammad Aqel 17
GAZA First Semester 2021/2022
PIC16 Devices
• Currently, over 80 versions of the PIC16 are listed in production by Microchip.

• This course study the architecture of two of these PICs: 16F84A and the 16F877A.

• A few of the most prominent members of the PIC16 family and their most important
features are listed below.

Alazhar University Dr. Mohammad Aqel 18


GAZA First Semester 2021/2022
High-Performance PIC Family
• The high-performance PICs belong to the PIC18 group.

• They have 16-bit program words, flash program


memory, a linear memory space of up to two Mbytes,
and protocol-based communications facilities.

• They all support internal and external interrupts and


have a much larger instruction set than members of the
baseline and mid-range families.

Alazhar University Dr. Mohammad Aqel 19


GAZA First Semester 2021/2022
PIC18 Devices
• Currently, over 80 versions of PIC18 family are listed in production.

• The PIC18 family uses 16-bit program words and is furnished in 18


to 80 pin packages.

• Microchip describes the PICs in this family as high-performance


with integrated A/D converters.

• The instruction set is much larger and starts at 79 instructions.

• The PICs in this family have flash program memory, a linear


memory space of up to 2 Mbytes, 8-by-8 bit hardware multiplier, and
communications peripherals and protocols.

Alazhar University Dr. Mohammad Aqel 20


GAZA First Semester 2021/2022

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy