You are on page 1of 14

Introduction to the PIC18

Microcontroller

Hsiao-Lung
H i L Chan
Ch
Dept Electrical Engineering
Chang Gung University, Taiwan
chanhl@mail cgu edu tw
chanhl@mail.cgu.edu.tw
Outline

Introduction to the PIC18 microcontroller


PIC18 assembly language programming
Interrupts, resets, and configuration
Parallel ports
Timers and CCP modules
Serial interface
Analog-to-digital
Analog to digital converter

2
Grading
g policy
p y

Midterm examinations + final test 60%


Attendance + efforts 20%
Reports 20% (No plagiarism)

3
PIC microcontroller vs. Intel MCS-51 (8051)
( )

"Peripheral
Peripheral Interface Controller"
Controller made by Microchip
Technology

8-bit ALU
Intel's original
g in the 1980s.
Several companies offer MCS-51 as IP cores in FPGAs or
ASICs.
68HC MCU and AVR

68HC microcontroller
8-bit microcontroller family introduced by Motorola in 1985.
Now produced by Freescale Semiconductor
CISC (complex instruction set computer) design

AVR
8-bit RISC MCU was sold to Atmel from Nordic VLSI

5
Inside the computer
p
Internal organization
g of a computer
p

7
Internal block diagram
g of a CPU

8
Microprocessor
p vs. microcontroller (MCU)
( )

9
Microprocessor
p vs. microcontroller (MCU)
( )

Microprocessor
A processor implemented on a very large scale

integration
g (VLSI)
( ) chip
p
Peripheral chips are needed to construct a product

Microcontroller
The processor and peripheral functions implemented on

one VLSI chip

10
Simplified
p view of a PIC microcontroller

11
Features of PIC18 MCU

8-bit
8 bit CPU
Program ROM (read-only memory)
UV-EROM (erasable programmable ROM): need 20 minutes to erase
Flash (Electrical EPROM, EEPROM)
OTP (one-time-programmable) version: mass production
Masked version: burning program during IC fabrication
Data RAM (random access memory)
A maximum of 4096 bytes
Some PIC18s use EEPROM to store critical data that are not changed not
often.

12
Features of PIC18 MCU

Timers
Pulse-width modulation (PWM)
Parallel I/O ports
SPI, I2C, controller area network (CAN) serial interface
Universal asynchronous receiver transmitter (UART)
10-bit A/D converter

13
Reference

M.A. Mazidi, R.D. Mckinlay, D Causey, PIC Microcontroller


and Embedded Systems Using Assembly and C for PIC18,
Pearson Education Inc., 2008.
Wikipedia

14

You might also like