View previous topic :: View next topic |
Author |
Message |
aletavola
Joined: 11 Jun 2007 Posts: 4
|
Comunication pic to pic with two 16f628 chips |
Posted: Mon Jun 11, 2007 2:45 pm |
|
|
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
|
|
Posted: Mon Jun 11, 2007 3:02 pm |
|
|
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
|
|
Posted: Mon Jun 11, 2007 3:07 pm |
|
|
Any sugestion? I just need to send a message to another pic. |
|
|
aletavola
Joined: 11 Jun 2007 Posts: 4
|
|
Posted: Mon Jun 11, 2007 3:13 pm |
|
|
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
|
RE: |
Posted: Mon Jun 11, 2007 3:56 pm |
|
|
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
|
|
Posted: Mon Jun 11, 2007 5:02 pm |
|
|
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
|
|
|
|