i2c eeprom cant read a page

Status
Not open for further replies.

spuffock

Member
having great trouble trying to read a 16 byte page from a 24aa512 eeprom using 16f887. The memory accepts the control byte, the address bytes, and the read control byte. It then produces the first byte, and that's it. The ACK looks good on the scope, but theres no more. I can read any of the other bytes one at a time, all correct, proving that the page write routine worked .
Hope someone can look at this bit of code and spot my ridiculous mistake.
 

Attachments

  • I2C PROBLEM.ASM
    6.4 KB · Views: 119

hi,
Trying your asm on Oshonsoft Sim, two subr are missing SEND and FAIL, it will not assemble.

EDIT:
On the SIM it goes into a continuous loop here [SETUP]
Code:
BSF    SSPCON2,SEN    ;START CONDITION
    BTFSC    SSPCON2,SEN
    GOTO    $-1

Inserted a dummy SEND & FAIL
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…