Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Assembly code to read and write EEPROM (24LC32) from PIC16F877 using I2C

Status
Not open for further replies.

Baherathan

Newbie level 1
Joined
Mar 26, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
I wrote an Assembly code to read and write EEPROM (24LC32) from PIC16F877 using I2C protocol. It works when reading or writing is done alone. But when I combine the codes and try to write and read it stops after writing. If anyone has a code for I2C please help me. [/code]
 

Re: I2C

Try
**broken link removed**
and
**broken link removed**

Gomez
 

Re: I2C

hi
I faced the same problem before. It was due to bus collosion that was happeneing
Try to poll on the SSPIF after each step in the protocol and it will work

Code:
BTFSS	PIR1,SSPIF
GOTO	$-1

Kindly try and tell me

thanks
Haytham
 

Re: I2C

Hi,

I search functioanl source code for 16f8xx in asm. I have a same problem

BTFSS PIR1,SSPIF
GOTO $-1

never SSPIF set this bit.

pleas excuse my very bad english
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top