PIC16F882-E/ML Microchip Technology, PIC16F882-E/ML Datasheet - Page 32

IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,LLCC,28PIN,PLASTIC

PIC16F882-E/ML

Manufacturer Part Number
PIC16F882-E/ML
Description
IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,LLCC,28PIN,PLASTIC
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F882-E/ML

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
24
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
FLASH
Eeprom Size
128 x 8
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 11x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
28-VQFN Exposed Pad, 28-HVQFN, 28-SQFN, 28-DHVQFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PIC16F88X
TABLE 5-1:
5.3.2
The programmer should be able to read data memory
information from a hex file and conversely (as an
option), write data memory contents to a hex file along
with program memory information and Configuration
Words (0x2007-0x2008) and user ID (0x2000-0x2003)
information.
The physical address range of the 256 data memory is
0x0000-0x00FF. However, these
logically mapped to address 0x2100-0x21FF for use in
writing assembly code. This provides a way of
differentiating between the data and program memory
locations in this range. The format for data memory
storage is one data byte per address location, LSb
aligned. A simple example of data memory is given
below:
DS41287D-page 32
PIC16F882
PIC16F883
PIC16F884
PIC16F886
PIC16F887
Legend: CFG = Configuration Word. Example calculations assume Configuration Word is erased (all ‘1’s).
Device
org 0x2100
de “My Program, v1.0”, 0
SUM[a:b] = [Sum of locations a to b inclusive]
SUM_ID = User ID locations masked by 0xF then made into a 16-bit value with ID0 as the Most Significant
nibble.
*Checksum = [Sum of all the individual expressions] MODULO [0xFFFF]
+ = Addition
& = Bitwise AND
EMBEDDING DATA MEMORY
CONTENTS IN HEX FILE
For example, ID0 = 0x1, ID1 = 0x2, ID3 = 0x3, ID4 = 0x4, then SUM_ID = 0x1234.
The 4 LSbs of the unprotected checksum is used for the example calculations.
Protect
CP = 1
CP = 0
CP = 1
CP = 0
CP = 1
CP = 0
CP = 1
CP = 0
CP = 1
CP = 0
Code
CHECKSUM COMPUTATIONS
SUM[0x0000:0x07FF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700)
(CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID
SUM[0x0000:0x0FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700)
(CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID
SUM[0x0000:0x0FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700)
(CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID
SUM[0x0000:0x1FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700)
(CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID
SUM[0x0000:0x1FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700)
(CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID
addresses are
Checksum*
 2009 Microchip Technology Inc.
0x7DBE
0x7DBE
0x6DBE
0x6DBE
0x3EFF
0x85BE
0x36FF
0x36FF
0x26FF
0x26FF
Blank
Value
0x25E6 at 0
and Max
Address
0x0ACD
0xF2CD
0xF2CD
0x02CD
0x02CD
0x518C
0x498C
0x498C
0x398C
0x398C

Related parts for PIC16F882-E/ML