Lecture 02 PIC Microcontrollers Updated
Lecture 02 PIC Microcontrollers Updated
Lecture 02 PIC Microcontrollers Updated
Low cost.
Wide availability.
Easy to program
Better online documentation.
Extensive collection of application notes.
free development tools.
This IC can be reprogrammed and erased up to 10,000 times.
Therefore it is very good for new product development phase.
PIC Microcontroller product family
Depending on the bus width, there are 8-, 16- and 32-bit microcontrollers.
Clock Resolution
ROM RAM A/D Compar- 8/16 – bit Serial PWM
Family Pins Freq. of A/D Others
[Kbytes] [bytes] Inputs ators Timers Comm. Outputs
[MHz] Converter
USB2.0
1024 - 0-2x8 USART
PIC18FXXJXX 8 – 128 28 - 100 40 - 48 10 - 16 10 2 2-5 -
3936 2 - 3 x 16 Ethernet
I2C SPI
USART
PIC18FXXKXX 8 – 64 768 - 3936 28 - 44 64 10 - 13 10 2 1 x 8 3 x 16 2 -
I2C SPI
All PIC microcontrollers use Harvard architecture,
if you use assembly language for programming you expected to cope with
that most work has been already done by somebody else. You just have to
IC Package Types:
Hermeticity:
•Ceramic packages are fully hermetic and provide better gas and moisture protection.
•Plastic packages are not hermetic, allowing some gas and moisture diffusion over time.
Plastic packages are smaller and lighter than ceramic packages, which can be advantageous for portable devices.
Cost:
•Plastic packages are generally more cost-effective due to their automated manufacturing processes and lower material costs.
•Ceramic packages are more expensive due to their specialized manufacturing and hermetic sealing requirements.
Environmental Suitability:
•Ceramic is suitable for extreme conditions, such as space and military applications, due to its reliability and hermeticity.
•Plastic is suitable for commercial electronics and controlled environments but may not be ideal for harsh conditions.
Thermal Performance:
•Ceramic packages offer better heat transfer properties, making them suitable for high-temperature applications.
•Plastic packages can be sensitive to heat and may require additional measures for heat dissipation.
Design Flexibility:
•Plastic packages offer more design flexibility in terms of shapes and forms.
•Ceramic packages are relatively standardized due to their manufacturing processes.
Packaging
RISC architecture
Only 35 instructions to learn
All single-cycle instructions except branches
Operating frequency 0-20 MHz
PIC16F887 Internal Block Diagram
Precision internal oscillator
Factory calibrated
Software selectable frequency range of 8MHz to 31KHz
Power supply voltage 2.0-5.5V
Consumption: 220uA (2.0V, 4MHz), 11uA (2.0 V, 32 KHz) 50nA (stand-by mode)
Power-Saving Sleep Mode
35 input/output pins
High current source/sink for direct LED drive
software and individually programmable pull-up resistor
Interrupt-on-Change pin
PIC16F887 Internal Block Diagram
The basic architecture of PIC16F887 consists of Program memory, file registers and
RAM and CPU registers.C
• 8K ROM memory in FLASH technology
Chip can be reprogrammed up to 100.000 times
• In-Circuit Serial Programming Option
Chip can be programmed even embedded in the target device
• 256 bytes EEPROM memory
Data can be written more than 1.000.000 times
• 368 bytes RAM memory
• A/D converter:
14-channels
10-bit resolution
• 3 independent timers/counters
• Watch-dog timer
• Analogue comparator module with
Two analogue comparators
PWM output steering control
Enhanced USART module
• Supports RS-485, RS-232, …
• Auto-Baud Detect
• etc
PIC16F887 Internal Block Diagram
PIC16F877 Internal Block Diagram
SFR (General
(Special Function
GPR
DATA Memory is alsoRegister)
Purpose known asused
Register). toto
used control
Registera File peripherals
normal and storage
temporary
: It is a RAM PIC behaviors,
Memoryspace their
(samebits
partitioned as are
into
physically connected to particular circuits on the chip (A/D converter, serial communication
RAM)
4 banks which contains:
module, etc.), any change of their contents directly affects the operation of the microcontroller
or some of its circuits. For example, by changing the TRISA register, the function of each port
A pin can be changed in a way it acts as input or output.
PIC16F877 Internal Block Diagram