Continue to Site

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.

16F877 and 24LC256 I2C eeprom

Status
Not open for further replies.

spectrum

Member
Hi all,

i'm trying to get some suggestion on a really hard problem, i'm debugging a quite complex application for 16f877, that do many tasks based on some commands received on serial port.

In particular, on a specific command received from rs232 by the pc, the PIC send to the pc about 10Kbytes of data, reading every byte from 24LC256, sending it to the pc in a byte per byte loop, for all the 10K times. Every byte is added on a checksum that is sent at the end. Serial communication is bitbanging 2400 baud, and is working fine.

Doing this download process many times, about one every 10 or 20K, or even often, just randomly, a byte value received is wrong.

A serial port issue is excluded, checksum is fine on pc side, so the problem should be before the crc calculation on the PIC side.

My suspects are in a bad address/byte i2c reading.

I'm investigating on the i2c (bitbanging) readings from the eeprom. I will check by oscilloscope all the timings af the protocol, to be sure of it.

Btw, the bit 1 writing on SDA is done just putting TRISA as input on that pin, releasing it so the pull up resistor keep it to 5V.

I've seen that the pull up resistor on SDA is 10K, could this value be too soft to keep up the bit in a fast fashon ?

Every help or suggestion of any kind will be very precious,
thanks,

spectrum
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top