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

PIC16F877 SPI and I2C at the same time possible?

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



Joined: 02 Mar 2004
Posts: 49

View user's profile Send private message

PIC16F877 SPI and I2C at the same time possible?
PostPosted: Sat Mar 27, 2004 9:14 am     Reply with quote

I have an application using 16F877 with both I2C component and another PIC on SPI. Both functions are multiplexed on the same pins.

pin/SPI/I2C
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO

Is it possible (electronically) to connect both on the same pin and communicate individually (of course one at a time)?

The reason for SPI to another PIC is that 16F877 UART is connected to modem. Besides using a software async to communicate with the second PIC, is there a better way?

Thanks in advance.

-- DJP
Jos



Joined: 15 Sep 2003
Posts: 4

View user's profile Send private message MSN Messenger

PostPosted: Sat Mar 27, 2004 11:47 am     Reply with quote

Why not use a software SPI-function in your program? It work's fine for me!

Jos
djpark



Joined: 02 Mar 2004
Posts: 49

View user's profile Send private message

PostPosted: Sat Mar 27, 2004 12:56 pm     Reply with quote

Jos wrote:
Why not use a software SPI-function in your program? It work's fine for me!

Jos


Thanks for the suggestion.

Do you mean s/w-SPI on the master PIC to communicate with slave PIC?

How stable is it? Is there a sample from CCS or example to point to?

Thanks.

-- DJP
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Sat Mar 27, 2004 1:38 pm     Reply with quote

You can dynamicaly reconfigure the port. I don't know what problems you will have but it can be multiplexed.
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Sat Mar 27, 2004 5:32 pm     Reply with quote

This may be helpful:
http://www.ccsinfo.com/forum/viewtopic.php?t=18731&highlight=
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