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 speed

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







I2C speed
PostPosted: Thu Apr 21, 2005 1:34 pm     Reply with quote

Hello,

When reading compiler updates, I see that since v3.215, the speed of I2C bus could be specified using FAST=xxxxx
"3.215 #USE I2C now allows the speed to be set in BPS using FAST=xxxxxxx"

Are there limits on the BPS value ?
Is this also available when using the hardware I2C ?

In my application, I have 2 I2C bus from the same chip:
-1 for accessing serial EEPROM, needs to be as fast as possible (max EEPROM clock frequency is 1MHz )
-1 for accessing expanded I/O, which are located 50cm away from the PIC, and needs to be slower (less data to transmit, minimize EMI/EMC problems)

Has anybody already try this feature and has some advices for me ?

Thanks for your answers.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Apr 21, 2005 1:44 pm     Reply with quote

Quote:
Are there limits on the BPS value ?

Of course silly!

Read the datasheet on the PIC and you can see those limits. It is just an address that is loaded (SSPADD I believe). I believe this is probably just for the hardware. I will be surprise if CCS went through the trouble to have delays built into the software routine.
JPA
Guest







I2C Speed
PostPosted: Thu Apr 21, 2005 2:51 pm     Reply with quote

With I2C hardware, I have to analyse the code in LST to see what they are doing. For the software implementation, I compiled the same code with several speed from 1000 BPS to 100 000 BPS and I have seen differences in the generated ASM code (low speed -> loop with different values, high speed -> a lot of nop). I suspect that these are relatives to delays changing and it seems they did it in software.

To be sure I need to look at the signals on the bus using my scope.

Anybody else tried this feature ?
Fabri



Joined: 22 Aug 2005
Posts: 275

View user's profile Send private message

PostPosted: Sun Feb 25, 2007 3:35 am     Reply with quote

Hi,

I'm also using I2C bus to comunicate with a control pannel. I have some problem with EMC with burst +- 2KV on power ac line. Especially when I connect the controll pannel with a cable of at least 50 cm. I use the same 6 wire cable to supply the pannel.

The main board do some reset but control pannel stop to work. I use watchdog to reset all if there's no any valid comunication but it work only in some case. I do some test on power supply of control pannel and it work fine also with burst.
Have you got to suggest me to solve the problem ?

Regards,
Fabri
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