Home     Projects     Micro     Tools     Delphi     Developer     Site map
HOME  
 
 
       
PIC EEPROM Read

DOWNLOAD    MAIN
PIC_EEPROM_Data_Read	macro
; by Randy Gamage
; Reads a byte from the PIC's 
; on-board EEPROM space (256 bytes available)
; INPUT: FlashAddr0 = address to read from
; OUTPUT: FlashData and W both 
; contain the value that was read from the EEPROM
;	  ALSO: Auto-Increments FlashAddr0 for 
;               easy sequential reads
	movf FlashAddr0,W
	bank2
	movwf EEADR^0x100
	bank3
	bcf EECON1^0x180,EEPGD
	bsf EECON1^0x180,RD
	bank2
	movf EEDATA^0x100,W
	bank0
	movwf FlashData
	incf FlashAddr0
	endm
		  

Copyright(c) 2005-2008 sixca.com, All right reserved.
Best view @ 800X600, IE 6.0 up   
Terms of Use  Privacy Policy