参数资料
型号: DM163001
厂商: Microchip Technology
文件页数: 33/57页
文件大小: 0K
描述: BOARD DEMO PICDEM-1
标准包装: 3
其它名称: DM163001R
DM163001R-ND
PICDEM-1
Chapter 5. EEPROM Demo – PIC16F84
WriteOne is where the actual writing of the EEPROM takes place. EEPROM
writes will not initiate if the proper sequence (write 55h to EECON2, write AAh
to EECON2, then set the WR bit) is not followed with exact timing. In order to
ensure this, interrupts have not been enabled. After the writing of the data,
and initiating the write sequence, the loop, W01 , waits for the WR bit to go low
indicating that the write has completed.
Note:
The timing in WriteOne is critical. Do not single step or do a soft-
ware trace through this routine.
WriteOne
WO1
bsf
movlw
movwf
movlw
movwf
bsf
btfsc
goto
bcf
STATUS,RP0
0x55
EECON2
0xaa
EECON2
EECON1,WR
EECON1,WR
WO1
STATUS,RP0
;page 1
;do write seq.
; /
; /
; /
;initiate write
;write complete?
;no then keep checking
;pg 0
return
Refer to PIC16F8X Data Sheet for EEPROM programming requirements.
CheckAll reads each location of the EEPROM and verifies that it matches
the value displayed on the LEDs plus one. If the value does not match, bit
EEPERROR of file register GPFLAG will be set and the routine will return
without verifying the other locations.
CheckAll
CA1
clrf
incf
EEADR
PORTB,W
;start at addr = 0
;ld. data to inspect
call
btfsc
return
incf
btfss
goto
CheckOne ;check location
GPFLAG,EEPERROR ;any error?
;yes then quit
EEADR, F ;inc address
EEADR,6 ;all 64 checked?
CA1 ;no then do next
return
CheckOne does the actual reading of the EEPROM byte and verifying that it
is correct. Although it is not necessary to check any flag bits during EEPROM
reads, they can be done immediately after setting the address in EEADR and
setting the read control bit ( RD EECON1<0> ), the RD bit will be cleared by the
hardware when the data has been placed in the EEDATA register. If there is a
verification error, the EEPERROR bit is set in the GPFLAG register.
? 1999 Microchip Technology Inc.
DS33015C-page 29
相关PDF资料
PDF描述
DM163004-LT BOARD DEMO PICDEM.NET
DM163005 KIT EVAL PIC16C432/433 LIN BUSS
DM163007 PICDEM CAN-LIN 1 FOR 18C658/858
DM163008 KIT MCP2120/2150 FOR IRDA COMM
DM163010 BOARD DEMO PICDEM USB
相关代理商/技术参数
参数描述
DM163002 制造商:Microchip Technology Inc 功能描述:PIC16C64/74 DEMO BOARD
DM163003 功能描述:开发板和工具包 - PIC / DSPIC PICDEM 3 PIC16C923/4 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 功能描述:开发板和工具包 - PIC / DSPIC USE 579-DM163004-LT RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163004 制造商:Microchip Technology Inc 功能描述:DEMO BOARD W/TCP/IP ((NW))
DM163004-LT 功能描述:开发板和工具包 - PIC / DSPIC PICDEM.net Demo Kit w/o TCP/IP Lean Book RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: