参数资料
型号: PIC12F683-E/MD
厂商: Microchip Technology
文件页数: 150/176页
文件大小: 0K
描述: IC PIC MCU FLASH 2KX14 8DFN
产品培训模块: Asynchronous Stimulus
Digi-Key 应用说明: AN0005 PWM Example with Microchip's CCP Module
AN0005 Example Code
标准包装: 91
系列: PIC® 12F
核心处理器: PIC
芯体尺寸: 8-位
速度: 20MHz
外围设备: 欠压检测/复位,POR,PWM,WDT
输入/输出数: 5
程序存储器容量: 3.5KB(2K x 14)
程序存储器类型: 闪存
EEPROM 大小: 256 x 8
RAM 容量: 128 x 8
电压 - 电源 (Vcc/Vdd): 2 V ~ 5.5 V
数据转换器: A/D 4x10b
振荡器型: 内部
工作温度: -40°C ~ 125°C
封装/外壳: 8-VDFN 裸露焊盘
包装: 管件
配用: AC164326-ND - MODULA SKT PM3 20QFN
I3-DB12F683-ND - BOARD DAUGHTER ICEPIC3
2007 Microchip Technology Inc.
DS41211D-page 73
PIC12F683
10.2
Reading the EEPROM Data
Memory
To read a data memory location, the user must write the
address to the EEADR register and then set control bit
RD of the EECON1 register, as shown in Example 10-1.
The data is available, at the very next cycle, in the
EEDAT register. Therefore, it can be read in the next
instruction. EEDAT holds this value until another read, or
until it is written to by the user (during a write operation).
EXAMPLE 10-1:
DATA EEPROM READ
10.3
Writing to the EEPROM Data
Memory
To write an EEPROM data location, the user must first
write the address to the EEADR register and the data
to the EEDAT register. Then the user must follow a
specific sequence to initiate the write for each byte, as
shown in Example 10-2.
EXAMPLE 10-2:
DATA EEPROM WRITE
The write will not initiate if the above sequence is not
exactly followed (write 55h to EECON2, write AAh to
EECON2, then set WR bit) for each byte. We strongly
recommend that interrupts be disabled during this
code segment. A cycle count is executed during the
required sequence. Any number that is not equal to the
required cycles to execute the required sequence will
prevent the data from being written into the EEPROM.
Additionally, the WREN bit in EECON1 must be set to
enable write. This mechanism prevents accidental
writes to data EEPROM due to errant (unexpected)
code execution (i.e., lost programs). The user should
keep the WREN bit clear at all times, except when
updating EEPROM. The WREN bit is not cleared
by hardware.
After a write sequence has been initiated, clearing the
WREN bit will not affect this write cycle. The WR bit will
be inhibited from being set unless the WREN bit is set.
At the completion of the write cycle, the WR bit is
cleared in hardware and the EE Write Complete
Interrupt Flag bit (EEIF) is set. The user can either
enable this interrupt or poll this bit. The EEIF bit of the
PIR1 register must be cleared by software.
10.4
Write Verify
Depending on the application, good programming
practice may dictate that the value written to the data
EEPROM should be verified (see Example 10-3) to the
desired value to be written.
EXAMPLE 10-3:
WRITE VERIFY
10.4.1
USING THE DATA EEPROM
The
data
EEPROM
is
a
high-endurance,
byte
addressable array that has been optimized for the
storage of frequently changing information (e.g.,
program variables or other data that are updated often).
When variables in one section change frequently, while
variables in another section do not change, it is possible
to exceed the total number of write cycles to the
EEPROM (specification D124) without exceeding the
total number of write cycles to a single byte
(specifications D120 and D120A). If this is the case,
then a refresh of the array must be performed. For this
reason, variables that change infrequently (such as
constants, IDs, calibration, etc.) should be stored in
Flash program memory.
BANKSEL
EEADR
;
MOVLW
CONFIG_ADDR ;
MOVWF
EEADR
;Address to read
BSF
EECON1,RD
;EE Read
MOVF
EEDAT,W
;Move data to W
BANKSEL
EECON1
;
BSF
EECON1,WREN
;Enable write
BCF
INTCON,GIE
;Disable INTs
BTFSC
INTCON,GIE
;See AN576
GOTO
$-2
;
MOVLW
55h
;Unlock write
MOVWF
EECON2
;
MOVLW
AAh
;
MOVWF
EECON2
;
BSF
EECON1,WR
;Start the write
BSF
INTCON,GIE
;Enable INTS
R
equ
ir
e
d
S
e
q
uen
ce
BANKSEL EEDAT
;
MOVF
EEDAT,W
;EEDAT not changed
;from previous write
BSF
EECON1,RD
;YES, Read the
;value written
XORWF
EEDAT,W
BTFSS
STATUS,Z
;Is data the same
GOTO
WRITE_ERR
;No, handle error
:
;Yes, continue
相关PDF资料
PDF描述
PIC18LF43K22T-I/MV IC MCU 8BIT 8KB FLASH 40UQFN
V375C48M75BG CONVERTER MOD DC/DC 48V 75W
V375C48M75BF CONVERTER MOD DC/DC 48V 75W
PIC18F43K22T-I/MV IC MCU 8BIT 8KB FLASH 40UQFN
V375C48M75B3 CONVERTER MOD DC/DC 48V 75W
相关代理商/技术参数
参数描述
PIC12F683-I/MD 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 6I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC12F683-I/MDQTP 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
PIC12F683-I/MF 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 6 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC12F683-I/MF 制造商:Microchip Technology Inc 功能描述:8BIT FLASH MCU SMD 12F683 DFN-8
PIC12F683-I/MFQTP 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:8-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology