o 3laekom alsalam
to write to eeprom u just must do this steps
1- movlw 00h ;(this is the address of eeprom register so when u store the data u will store it here in this address ok u know that pic16f84a has 64 registers so u can choose any one and here i choose 00h)
2-movwf 09h ,(this is the addres of SFR its name EEADR)
3- movlw 0a ;( 0a is the data which u want to store at 00h address in EEPROM and if ur data in RAM REGISTER register u can use this instruction MOVF ram address,0 after that ur data became in W register)
4- movwf 08 ;(this is the addres of SFR its name is EEDATA)
AFTER THIS STEPS UR DATA IS REDAY TO STORE AT 00H ADRRESS AT EEPROM
and now there is also some other steps this following steps just copy and paste to ur program
ok
5-bsf 03,5 ; (goto bank 1 to do some setting in SFR which belong to eeprom)
6-bsf 08,2 ; (this for write enable)
7-movlw 0x55
8-movwf 09
9-movlw0xaa
10-movwf 09
11- bsf 08,1 ;(when this instruction exeute the writing to EEPROM star u must know that writing to EEPROM take 10 ms
steps7 8 9 10
from micrchip u must write this instruction without think why
there is flag bit in EECON1 register let u know when the writing end
this bit is EEIF (the furth bit 08,4) it become 1 when the writing end
the last note is u r now at bank 1 dont forget that
do u know that i was decide to do this project when i have time
i hope u succed doing it
and i hope this reply helped u