Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help Requested for Read&Write Operations onEEPROM in 16F

Status
Not open for further replies.

cogumlu

New Member
Hi Friends, I can write a data to EEPROM in PIC 16F877 but I can't read this data from EEPROM using similiar routine who can help me about this subject?
The Code As Follows.
REEPROM ;EEPROMDAN OKU
BSF STATUS,6
BCF STATUS,5 ;BANK2
MOVLW d'250'
MOVWF EEADR
BSF STATUS,5 ;BANK3
BCF EECON1,7
BSF EECON1,0 ;
BCF STATUS,5 ;BANK2
MOVF EEDATA,0
BCF STATUS,6
BCF STATUS,5 ;BANK0
BCF PCLATH,4
BCF PCLATH,3
RETURN
I have a similiar routine which provide writing to EEPROM
Urgent Answer Please :shock:
 

Nigel Goodwin

Super Moderator
Most Helpful Member
Re: Help Requested for Read&Write Operations onEEPROM in

cogumlu said:
Hi Friends, I can write a data to EEPROM in PIC 16F877 but I can't read this data from EEPROM using similiar routine who can help me about this subject?
The Code As Follows.
REEPROM ;EEPROMDAN OKU
BSF STATUS,6
BCF STATUS,5 ;BANK2
MOVLW d'250'
MOVWF EEADR
BSF STATUS,5 ;BANK3
BCF EECON1,7
BSF EECON1,0 ;
BCF STATUS,5 ;BANK2
MOVF EEDATA,0
BCF STATUS,6
BCF STATUS,5 ;BANK0
BCF PCLATH,4
BCF PCLATH,3
RETURN
I have a similiar routine which provide writing to EEPROM
Urgent Answer Please :shock:

Check my pic tutorial on IR communication, one of them uses routines to read and write data to the EEPROM, the code is well tested and reliable - look at https://www.winpicprog.co.uk
 

cogumlu

New Member
About WEERR bit for PIC16F877

Hi again,
I have writtinen a code at the begining of the software as follows;
WAIT8 BTFSC EECON1,3 ;check related bit from EECON1 (WEERR)
GOTO WAIT8
and software didn't go on after these lines. Because WEERR bit at the high level in the beginning of the software after the lines as follows ;
LIST P=16F877
ORG 0
BSF STATUS,6
BsF STATUS,5
I guessed, Chip have been destroyed. But When I have changed the chip the solution was the same...
Do you have any comment of this situation? Please send us your comments.
Take Care
Gürhan
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top