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 CCS Technical Support

i2C comunication reset PIC

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



Joined: 22 Aug 2005
Posts: 275

View user's profile Send private message

i2C comunication reset PIC
PostPosted: Wed Mar 14, 2007 12:22 pm     Reply with quote

Hi,

I have a control pannel connected with main board by a i2c bus. The system work fine but I have a problem when I switch on the power supply of pannel, SCL line goes low just some ms and reset the main board.

I saw it with my oscilloscope and do some test, stopping i2C comunication of main board the problem disappear. I belive the problem is in I2C comunication and low state of SCL by a slave.

Any suggestion to solve the problem ?

Regards,
Fabry
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 14, 2007 12:31 pm     Reply with quote

Quote:
SCL line goes low just some ms and reset the main board.

Do you mean that the PIC actually does a hardware reset ?

See page 37 of the i2c specification:
http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf

On the right side of the page, it says you can use series resistors of
300 ohms on the SDA and SCL pins to protect from high voltage spikes.
Fabri



Joined: 22 Aug 2005
Posts: 275

View user's profile Send private message

PostPosted: Thu Mar 15, 2007 2:12 am     Reply with quote

Hi PCM,

I've that resistors and I solved, with them, EMC problem. Increasing the value it's just a little bit better. The bus is 3 meters long so I don't want have problem of data comunication.

I'll work around !

Regards,
Fabri



Joined: 22 Aug 2005
Posts: 275

View user's profile Send private message

PostPosted: Thu Mar 15, 2007 4:41 am     Reply with quote

Hi,
I've another consideration about:

Some EMC burst don't reset the board but stop the I2C comunication. Other function of board continue to work. I found an continue clock, by master, of SCL line but there's no data on SDA. When I restart bus comunication with reset of SSPEN bit, the comunication restart to work.

I think to solve the problem with a timeout of valid I2C comunication, after some seconds without valid data I restart I2C bus by SSPEN bit.

I'm interest to understand why SCL line toggle and if there are others valid solutions to find the stop of I2C.

Have you got to suggest me ?

Thanks for help.
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