View previous topic :: View next topic |
Author |
Message |
ritchie
Joined: 13 Sep 2003 Posts: 87
|
I2C Master-Slave Inquiry |
Posted: Mon Jun 06, 2005 7:49 am |
|
|
I understand there are mnay information about I2C in this forum. Anyway, my question: Is it possible to communicate two PIC one master and one slave using software based I2C implmentation?
Wud the code provided by Mark can be a gud source of information in doing a software based I2C for Master/Slave communication.
Any suggestion is appreciated.
Thank you. |
|
|
valemike Guest
|
Re: I2C Master-Slave Inquiry |
Posted: Mon Jun 06, 2005 8:35 am |
|
|
ritchie wrote: | I understand there are mnay information about I2C in this forum. Anyway, my question: Is it possible to communicate two PIC one master and one slave using software based I2C implmentation? |
The master can use the software-based i2c implementation or the MSSP module implementation. However, the slave must use the MSSP module based implementation.
Quote: |
Wud the code provided by Mark can be a gud source of information in doing a software based I2C for Master/Slave communication.
Any suggestion is appreciated.
|
When Mark posted code for i2c a while back, it is robust in that it handles errors.
Thank you.[/quote] |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Mon Jun 06, 2005 10:20 am |
|
|
valemike,
Where to look for Mark's code? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Jun 06, 2005 10:56 am |
|
|
That would be in the code library. It is written for multi-master. It was not designed to read data back from slaves but rather send a command to the slave and have the slave turn around and transmit data (if required) back. If you are just sending commands then it will work for you. |
|
|
ritchie
Joined: 13 Sep 2003 Posts: 87
|
|
Posted: Mon Jun 06, 2005 4:29 pm |
|
|
Mark wrote: | That would be in the code library. It is written for multi-master. It was not designed to read data back from slaves but rather send a command to the slave and have the slave turn around and transmit data (if required) back. If you are just sending commands then it will work for you. |
I plan that my slave device will only accept data and never to transmit back.
Accdg, to Valemike I need to have an MSSP module for my slave device since it is is not possible to have a software based I2C on the slave.
The master device is possible to use software based I2C.
Thanks. |
|
|
ritchie
Joined: 13 Sep 2003 Posts: 87
|
|
Posted: Mon Jun 06, 2005 4:30 pm |
|
|
Mark wrote: | That would be in the code library. It is written for multi-master. It was not designed to read data back from slaves but rather send a command to the slave and have the slave turn around and transmit data (if required) back. If you are just sending commands then it will work for you. |
I plan that my slave device will only accept data and never to transmit back.
Accdg, to Valemike I need to have an MSSP module for my slave device since it is is not possible to have a software based I2C on the slave.
The master device is possible to use software based I2C.
Thanks. |
|
|
|