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

Conflict I2C and SPI

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



Joined: 14 Dec 2007
Posts: 1

View user's profile Send private message

Conflict I2C and SPI
PostPosted: Fri Dec 14, 2007 9:46 am     Reply with quote

I use spi_setup in main.c and #use i2c in at24.c. They share the same pin RC3,RC4. The chip i use is pic18f452.
In main.c i use read/write spi normaly without using i2c,but when i call i2c function it doesn't work and spi doesn't work too.
Can anyone help me to solve this problem?
Thanks very much!
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Fri Dec 14, 2007 9:52 am     Reply with quote

You cannot use them at the same time. They use the same hardware. I've read, on this forum, that you can switch between them but I've never done it and I can't remember how. Search this forum and you should find your answer.

Ronald
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