Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 26th November 2007, 10:02 AM   (permalink)
Default 16F877 and 24LC256 I2C eeprom

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
spectrum is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 02:56 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker