CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

I2C question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
xpercad



Joined: 27 Jun 2004
Posts: 12
Location: MÉXICO

View user's profile Send private message

I2C question
PostPosted: Tue Jul 13, 2004 8:24 am     Reply with quote

I am using PIC18F252 PCWH 3.205 and I2C FAST software generated bus for FRAM memories. I have 2 2.2k pull-up resistors and using pin RA2 for SDA signal and pin RA3 for SCL signal.

From time to time the FRAM memory gets corrupted and I wonder if there is some electrical limitation in using RA2 and RA3 for the I2C bus.

Your help will be most appreciated.

Best Wishes,

Aaron
xpercad



Joined: 27 Jun 2004
Posts: 12
Location: MÉXICO

View user's profile Send private message

Question re-phrased
PostPosted: Wed Jul 14, 2004 8:09 am     Reply with quote

What I meant to ask is: the dedicated pins of the PIC18F452 for I2C (RC3 & RC4) have both Schmitt Trigger buffers, and the pins I am using (RA2 & RA3) do not.

Has anybody had any experience using pins (RA2 & RA3) for I2C and had memory corruption problems ???

Regards,

Aaron
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Jul 14, 2004 9:02 am     Reply with quote

Most likely, if nobody answers then nobody has experienced this phenomenon. Maybe you could try using the hardware I/O to see if it stabilizes. Then, use a different pair of pins to see if it gets flakey again. If you keep having problems with the non-hardware pins try setting the Slow parameter in your #use declaration. Who knows, it could help.

Good luck

Ronald
valemike
Guest







PostPosted: Wed Jul 14, 2004 1:47 pm     Reply with quote

I have not had any problems myself.

However, I do know of cases where a noisy environment can corrupt your i2c data. That is why the hardware guy put a few small caps on the SDA/SCL lines. Try lowering your i2c speeds as well.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Jul 14, 2004 3:25 pm     Reply with quote

Caps on I2C bus lines is not a good idea. The I2C protocol states a maximum of 400pf on the bus lines.
xpercad



Joined: 27 Jun 2004
Posts: 12
Location: MÉXICO

View user's profile Send private message

PostPosted: Thu Jul 15, 2004 8:22 am     Reply with quote

Thanks guys. I will try the SLOW option and I'll report back....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group