參數(shù)資料
型號(hào): PIC16F870-I/SO
廠商: Microchip Technology
文件頁數(shù): 69/143頁
文件大小: 0K
描述: IC MCU FLASH 2KX14 EE 28SOIC
產(chǎn)品培訓(xùn)模塊: Asynchronous Stimulus
8-bit PIC® Microcontroller Portfolio
標(biāo)準(zhǔn)包裝: 27
系列: PIC® 16F
核心處理器: PIC
芯體尺寸: 8-位
速度: 20MHz
連通性: UART/USART
外圍設(shè)備: 欠壓檢測(cè)/復(fù)位,POR,PWM,WDT
輸入/輸出數(shù): 22
程序存儲(chǔ)器容量: 3.5KB(2K x 14)
程序存儲(chǔ)器類型: 閃存
EEPROM 大?。?/td> 64 x 8
RAM 容量: 128 x 8
電壓 - 電源 (Vcc/Vdd): 4 V ~ 5.5 V
數(shù)據(jù)轉(zhuǎn)換器: A/D 5x10b
振蕩器型: 外部
工作溫度: -40°C ~ 85°C
封裝/外殼: 28-SOIC(0.295",7.50mm 寬)
包裝: 管件
產(chǎn)品目錄頁面: 639 (CN2011-ZH PDF)
配用: XLT28SO-1-ND - SOCKET TRANSITION 28SOIC 300MIL
I3-DB16F871-ND - BOARD DAUGHTER ICEPIC3
2003 Microchip Technology Inc.
DS30569B-page 29
PIC16F870/871
3.3
Reading the EEPROM Data
Memory
Reading EEPROM data memory only requires that the
desired address to access be written to the EEADR
register and clear the EEPGD bit. After the RD bit is set,
data will be available in the EEDATA register on the
very next instruction cycle. EEDATA will hold this value
until another read operation is initiated or until it is
written by firmware.
The steps to reading the EEPROM data memory are:
1.
Write the address to EEDATA. Make sure that
the address is not larger than the memory size
of the PIC16F870/871 devices.
2.
Clear the EEPGD bit to point to EEPROM data
memory.
3.
Set the RD bit to start the read operation.
4.
Read the data from the EEDATA register.
EXAMPLE 3-1:
EEPROM DATA READ
3.4
Writing to the EEPROM Data
Memory
There are many steps in writing to the EEPROM data
memory. Both address and data values must be written
to the SFRs. The EEPGD bit must be cleared, and the
WREN bit must be set, to enable writes. The WREN bit
should be kept clear at all times, except when writing to
the EEPROM data. The WR bit can only be set if the
WREN bit was set in a previous operation (i.e., they
both cannot be set in the same operation). The WREN
bit should then be cleared by firmware after the write.
Clearing the WREN bit before the write actually
completes will not terminate the write in progress.
Writes to EEPROM data memory must also be pref-
aced with a special sequence of instructions that pre-
vent inadvertent write operations. This is a sequence of
five instructions that must be executed without interrup-
tions. The firmware should verify that a write is not in
progress before starting another cycle.
The steps to write to EEPROM data memory are:
1.
If step 10 is not implemented, check the WR bit
to see if a write is in progress.
2.
Write the address to EEADR. Make sure that the
address is not larger than the memory size of
the PIC16F870/871 devices.
3.
Write the 8-bit data value to be programmed in
the EEDATA register.
4.
Clear the EEPGD bit to point to EEPROM data
memory.
5.
Set the WREN bit to enable program operations.
6.
Disable interrupts (if enabled).
7.
Execute the special five instruction sequence:
Write 55h to EECON2 in two steps (first to W,
then to EECON2)
Write AAh to EECON2 in two steps (first to
W, then to EECON2)
Set the WR bit
8.
Enable interrupts (if using interrupts).
9.
Clear the WREN bit to disable program
operations.
10. At the completion of the write cycle, the WR bit
is cleared and the EEIF interrupt flag bit is set.
(EEIF must be cleared by firmware.) If step 1 is
not implemented, then firmware should check
for EEIF to be set, or WR to clear, to indicate the
end of the program cycle.
EXAMPLE 3-2:
EEPROM DATA WRITE
BSF
STATUS, RP1
;
BCF
STATUS, RP0
;Bank 2
MOVF
ADDR, W
;Write address
MOVWF
EEADR
;to read from
BSF
STATUS, RP0
;Bank 3
BCF
EECON1, EEPGD
;Point to Data memory
BSF
EECON1, RD
;Start read operation
BCF
STATUS, RP0
;Bank 2
MOVF
EEDATA, W
;W = EEDATA
BSF
STATUS, RP1
;
BSF
STATUS, RP0
;Bank 3
BTFSC EECON1, WR
;Wait for
GOTO
$-1
;write to finish
BCF
STATUS, RP0
;Bank 2
MOVF
ADDR, W
;Address to
MOVWF EEADR
;write to
MOVF
VALUE, W
;Data to
MOVWF EEDATA
;write
BSF
STATUS, RP0
;Bank 3
BCF
EECON1, EEPGD ;Point to Data memory
BSF
EECON1, WREN
;Enable writes
;Only disable interrupts
BCF
INTCON, GIE
;if already enabled,
;otherwise discard
MOVLW 0x55
;Write 55h to
MOVWF EECON2
;EECON2
MOVLW 0xAA
;Write AAh to
MOVWF EECON2
;EECON2
BSF
EECON1, WR
;Start write operation
;Only enable interrupts
BSF
INTCON, GIE
;if using interrupts,
;otherwise discard
BCF
EECON1, WREN
;Disable writes
相關(guān)PDF資料
PDF描述
AT90S8515-8PC IC MCU 8K FLSH 8MHZ 40DIP
PIC18LF45J50-I/PT IC PIC MCU FLASH 32K 2V 44-TQFP
PIC18LF1230-I/P IC PIC MCU FLASH 2KX16 18DIP
PIC18F45J50-I/PT IC PIC MCU FLASH 32K 2V 44-TQFP
PIC24FJ64GA004-I/PT IC PIC MCU FLASH 64KB 44TQFP
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC16F870T-E/SO 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F870T-E/SS 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F870T-I/SO 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F870T-I/SS 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT
PIC16F871-E/L 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時(shí)鐘頻率:50 MHz 程序存儲(chǔ)器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風(fēng)格:SMD/SMT