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

Comunication pic to pic with two 16f628 chips

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



Joined: 11 Jun 2007
Posts: 4

View user's profile Send private message

Comunication pic to pic with two 16f628 chips
PostPosted: Mon Jun 11, 2007 2:45 pm     Reply with quote

Hi friends;
I have two 16f628, one need to talk to PC by rs232, do delta sigma AD and send a messages the other 16f628.

I2C is a good idea? How can i implement i2c slave mode in 16f628?

Thanks

Alexandre Tavola
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 11, 2007 3:02 pm     Reply with quote

The 16F628 doesn't have an SSP module, so there's no easy way to
do an i2c slave.
aletavola



Joined: 11 Jun 2007
Posts: 4

View user's profile Send private message

PostPosted: Mon Jun 11, 2007 3:07 pm     Reply with quote

Any sugestion? I just need to send a message to another pic.
aletavola



Joined: 11 Jun 2007
Posts: 4

View user's profile Send private message

PostPosted: Mon Jun 11, 2007 3:13 pm     Reply with quote

Can i use another two pins of first chip to send serial data to the second pin?
i have two pins available.
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Mon Jun 11, 2007 3:56 pm     Reply with quote

Yes you can use serial method, but you may need to use interrupts on the receive pins, for better efficiency.

thanks
arunb
aletavola



Joined: 11 Jun 2007
Posts: 4

View user's profile Send private message

PostPosted: Mon Jun 11, 2007 5:02 pm     Reply with quote

i have no ideia how to implement this... but... i think is is not so difficult.

i belive that i can use two streams, one for pc and other for pic intercom.
i just need to write a value to second pic.

I belive that i just need to implement a software uart in first pic and write data to it. (the second pic is watting the info with gets()) and use the hard uart to comm with pc.

Thanks

Alexandre
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Tue Jun 12, 2007 7:03 am     Reply with quote

Just FYI, There is a simple PIC-to-PIC comm setup in the CCS FAQ:

http://www.ccsinfo.com/faq.php?page=connect_pics
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