Documente Academic
Documente Profesional
Documente Cultură
Introduction
PIC Microcontroller
Development
Architecture
PIC18
PIC 18 Architecture
Features & Peripherals
ARM Microcontroller
Introduction to ARM Ltd
Programmers Model
RCT (Reverse Conducting Thyristor)
Thyristor)..
Although the CP
CP1600
1600 was a good CPU but it had low I/O
performance..
performance
The PIC controller was used to offload the I/O the tasks
from CPU to improve the overall performance of the system.
system.
In 1985,
1985, General Instruments converted their
Microelectronics Division to Microchip Technology
Technology..
16-05-2013 Mahesh J. vadhavaniya 7
PIC microcontrollers
PIC stands for Peripheral Interface Controller.
Controller.
In 1993,
1993, Microchip Technology launched the 8-bit
PIC16
PIC16C
C84 with EEPROM which could be programmed using
serial programming method
method..
Since 1998,
1998, Microchip Technology continuously developed
new high performance microcontrollers with new complex
architecture and enhanced in-
in-built peripherals
peripherals..
PIC microcontroller is based on Harvard architecture
architecture..
At present PIC microcontrollers are widely used for
industrial purpose due to its high performance ability at low
power consumption
consumption..
The small size and low cost of Base Line PIC replaced the
traditional ICs like 555
555,, logic gates etc.
etc. in industries.
industries.
The PIC18
PIC18 range is integrated with new age
communication protocols like USB, CAN, LIN, Ethernet
(TCP/IP protocol) to communicate with local and/or internet
based networks.
networks.
Instruction
12-bit 14-bit 14-bit 16-bit
Length
No. of
33 35 49 83
instruction set
Memory variations
Harvard Architecture
Architecture::
• Uses two separate memory
spaces for program instructions
and data
• Improved operating bandwidth
• Allows for different bus widths
PIC18
PIC18F
F4550 consists of three different memory sections
sections..
16-05-2013 Mahesh J. vadhavaniya 27
PIC microcontrollers
Peripherals
1. Flash Memory:
Memory:
Flash memory is used to store the program downloaded by
a user on to the microcontroller.
microcontroller.
Flash memory is non
non--volatile, i.e., it retains the program
even after the power is cut
cut--off
off..
PIC18
PIC18F
F4550 has 32
32KB
KB of Flash Memory.
Memory.
2. EEPROM:
EEPROM:
This is also a nonvolatile memory which is used to store
data like values of certain variables.
variables.
PIC18
PIC18F
F4550 has 256 Bytes of EEPROM.
EEPROM.
16-05-2013 Mahesh J. vadhavaniya 28
PIC microcontrollers
Peripherals
3. SRAM:
SRAM:
Static Random Access Memory is the volatile memory of the
microcontroller, i.e., it loses its data as soon as the power is
cut off
PIC18
PIC18F
F4550 is equipped with 2 KB of internal SRAM
SRAM.. .
Oscillator :
The PIC18
PIC18F
F series has flexible clock options.
options.
An external clock of up to 48 MHz can be applied to this
series..
series
These controllers also consist of an internal oscillator which
provides eight selectable frequency options varying from 31
KHz to 8 MHz
MHz..
16-05-2013 Mahesh J. vadhavaniya 29
PIC microcontrollers
Peripherals
8 x 8 Multiplier :
The PIC18
PIC18F
F4550 includes an 8 x 8 multiplier hardware
hardware..
This hardware performs the multiplications in single
machine cycle
cycle..
This gives higher computational throughput and reduces
operation cycle & code length.
length.
ADC Interface :
PIC18F
PIC18 F4550 is equipped with 13 ADC (Analog to Digital
Converter) channels of 10
10--bits resolution
resolution..
Timers / Counters :
PIC18
PIC18F
F4550 has four timer/counters
timer/counters..
There is one 8-bit timer and the remaining timers have
option to select 8 or 16 bit mode
mode..
Interrupts :
PIC18
PIC18F
F4550 consists of three external interrupts sources
sources..
12 Vss Ground
Internal USB 3.3V voltage regulator output, positive supply for the USB
18 VUSB
transceiver.
19 RD0/SPP0
20 RD1/SPP1 SPP0-SPP4
Port D I/O Pins 1-4
21 RD2/SPP2 Streaming Parallel Port data
22 RD3/SPP3
16-05-2013 Mahesh J. vadhavaniya 35
PIC microcontrollers
PIN Description
Pin
Name Description Alternate Function
No.
D-: USB differential minus line (input/output)
23 RC3/D-/VM
VM: External USB transceiver VM input.
Port C I/O Pins 4-5
D+: USB differential plus line (input/output).
24 RC4/D+/VP
VP: External USB transceiver VP input.
TX: EUSART asynchronous transmit.
25 RC6/TX/CK
CK: EUSART synchronous clock (see RX/DT).
Port C I/O Pins 7-8 RX: EUSART asynchronous receive.
26 RC7/RX/DT/SDO DT: EUSART synchronous data (see TX/CK).
SDO: SPI data out.
27 RD4/SPP4 SPP4:Streaming Parallel Port data
SPP5:Streaming Parallel Port data
28 RD5/SPP5/P1B
P1B: Enhanced CCP1 PWM output, channel B
Port D I/O Pins 5-8 SPP6:Streaming Parallel Port data
29 RD6/SPP6/P1C
P1C: Enhanced CCP1 PWM output, channel C
SPP7:Streaming Parallel Port data
30 RD7/SPP7/P1D
P1D: Enhanced CCP1 PWM output, channel D
16-05-2013 Mahesh J. vadhavaniya 36
PIC microcontrollers
PIN Description
Pin
Name Description Alternate Function
No.
31 Vss Ground
32 VDD Positive supply
AN12: Analog input 12.
INT0: External interrupt 0.
RB0/AN12/INT0/FLT0/SDI/S FLT0: Enhanced PWM Fault input (ECCP1
33
DA module).
SDI: SPI data in.
SDA: I2C data I/O.
Sleep mode
Microprocessor Unit
Power--down mode
Power
Code protection
EEPROM can be protected through SFR
In
In--circuit serial programming
In
In--circuit debugger
16-05-2013 Mahesh J. vadhavaniya 42
PIC18F
PIC18 F4X2
Architecture
Block
Diagram
T H E A R C H I T E C T U R E F O R T H E D I G I T A L W O R
TM
48L D
ARM
Solutions for
Embedded real
real--time systems for mass storage,
automotive, industrial and networking applications
applications..
Secure applications - smartcards and SIMs
Open platforms running complex operating systems
Low system cost
Improved
Halfword ARM/Thumb 5TE Jazelle
4
and signed Interworking 5TEJ
1 Java bytecode
halfword / execution
CLZ
byte support
System SA-110 Saturated maths ARM9EJ-S ARM926EJ-S
2 mode
DSP multiply-
SA-1110 ARM7EJ-S ARM1026EJ-S
accumulate
instructions
3
ARM1020E SIMD Instructions
Thumb 4T 6
instruction Multi-processing
set XScale
Early ARM V6 Memory
architectures architecture (VMSA)
ARM7TDMI ARM9TDMI ARM9E-S
Unaligned data
ARM720T ARM940T ARM966E-S support ARM1136EJ-S
TDMI
T: Thumb, 1616--bit instruction set
D: on
on--chip Debug support, enabling the processor to
halt in response to a debug request
M: enhanced Multiplier, yield a full 64
64--bit result, high
performance
I: Embedded ICE hardware
3-stage pipeline
ARM Characteristics
Process 0.35 um Transistors 74,209 M IPS 60
2
M etal layers 3 Core area 2.1 mm Power 87 mW
Vdd 3.3 V Clock 0 to 66 M Hz M IPS/W 690
CPU Core
virtual address
Consists of the ARM
processor core and some
tightly coupled function MMU
instruction &
data cache
ARM7TDMI
blocks EmbeddedICE
& JTAG
address
physical
instructions & data
E.g.: ARM710
ARM710T,
T, write
buffer CP15
ARM720
ARM 720T,
T, ARM74
ARM74T,
T,
AMBA interface
ARM920
ARM 920T,
T, ARM922
ARM922T,T,
ARM940
ARM 940T,
T, ARM946
ARM946E E-S,
and ARM966
ARM966E E-S AMBA AMBA
address data
ARM710T
GDSII layout
to protect ARM IP
16-05-2013 Mahesh J. vadhavaniya 66
Data Sizes and Instruction Sets
The ARM is a 32
32--bit architecture
architecture..
32
32--bit ARM Instruction Set
16
16--bit Thumb Instruction Set
cpsr
spsr spsr spsr spsr spsr spsr
cpsr
spsr spsr spsr spsr spsr
instant boot
boot--up for users
and access to select
applications, with multi
multi--day
battery lifetimes.
lifetimes.
16-05-2013 Mahesh J. vadhavaniya 75
ARM Cortex A applications
NXP
LPC2148
A two
two--stage instruction pipeline that speeds up execution
execution..
Up to 10
10--MHz clock operation.
operation.
Wide variety of on
on--chip peripherals,
peripherals, including digital I/O,
ADC, EEPROM, Timer, UART, RTC timer, PWM etc
etc..
Available in 8-pin to 64
64--pin size to suit wide variety of
applications..
applications
Atmel AVR :
Many Types, tinyAT,
tinyAT, megaAT,
megaAT, automotive
Lighting, LCD
Share unified platform
Different #s of I/O control
Built--in Pull
Built Pull--up resistors
Ethernet, Serial Data, Auxiliary Power, USB
Analog I/O, Packaging, Interrupts, Math, JTAG
Get the right amount of memory for the job
1-Kbyte SRAM
6 or 8 Channel 10
10--bit A/D
A/D--
converter..
converter
Up to 16 MIPS throughput
at 16 Mhz.
Mhz.
131 Instructions
32 8-bit GP registers
Throughput up to 16 MIPS
16
16K
K programmable flash (instructions)
512Bytes
512 Bytes EEPROM
1K internal SRAM
PC : address of next
instruction
IR: pre-
pre-fetched
instruction
GPR: R0-
R0-R31
ALU
Harvard Architecture
It is possible to use this storage area for constant
data as well as instructions, violating the true spirit
of this architecture
The ATMega16
ATMega16 can use an internal or external clock
signal
fast wake-
wake-up from sleep modes
8 to 100 pins
Internal oscillators
The C51 would have to run at 296 MHz to match the 16 MHz
AVR.