View previous topic :: View next topic |
Author |
Message |
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
Software I2C |
Posted: Fri Oct 02, 2009 9:02 am |
|
|
Hi Sorry cause I originally post in the code library forum;
my question is : Is it possible to built a software I2C slave on a chip that doesn't have any hardware I2C; From the forum, the slave code that read data uses the hardware interrupt to detect that the master is sending data or requesting data.
Am I clear ? |
|
|
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
|
Posted: Fri Oct 02, 2009 9:22 am |
|
|
to complete : Is it possible to establish I2C communication between 2 non equipped I2C devices such as the 12F629 ? one master and one (may be more but at least one ) slave that would be able to respond to master questions ? |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri Oct 02, 2009 9:34 am |
|
|
I've never tried it but I do know that it would be EXTREMELY difficult to do. Most of the PICs time would be dedicated to just looking for the correct bus signals.
Ronald |
|
|
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
|
|
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
|
Posted: Fri Oct 02, 2009 11:35 am |
|
|
In fact none of these are able to act as a slave on a device without hardware!I ve got to take another PIC |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Oct 02, 2009 11:35 am |
|
|
Why would you convert I2C to RS232?
You haven't told us enough about the project -- but in any case consider this:
You need to research I2C and RS232 to learn the pros and cons of both.
Can you talk I2C to a pic that doesn't understand it? I think you can answer this question already (think: can you [spam] in a language to someone else who doesn't understand it? No.)
So once the receiving (slave) PIC understands I2C, is it better to run RS232 -- well that depends! (see above)
There are companies that make I2C -> RS232 "adapters" -- but if you want to control more than one device from a single master, I2C lends itself more to this kind of operation than RS232.
Again -- do your homework.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
|
Posted: Fri Oct 02, 2009 11:56 am |
|
|
I was in fact thinking of an interface I2C/ RS 232 because my project uses already an I2C bus and I'd like to add a HF transceiver, but the one I'd like to use uses TTL RS232. It would be simplier to add another RS232/RS 232 but would use 2 other pins. |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Oct 02, 2009 12:08 pm |
|
|
In that case, use a PIC with multiple UARTS.
The 18FxxJ11 is very nice.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|