I want to connect 2 PIC's (18F452) via I2C bus, but i need opto-electrical isolation between them.
I've found some info on: http://www.embedded.com/shared/printabl ... D=49901764
Is there another way connecting two(or more PIC's) with opto-electrical isolation between them?
Best regards!!
Opto-electrical isolation of the I2C-Bus
Opto-isolation
What you want to do is physically possible, but is much easier with SPI, because the connections in SPI are all unidirectional. Also, mikroPascal doesn't currently support I2C slave mode, so you can't use I2C for PIC to PIC communication, until this feature is added.
USART is another option which uses unidirectional lines. In fact, they have an IRDA board which works with this.
USART is another option which uses unidirectional lines. In fact, they have an IRDA board which works with this.
USART sounds interesting. I've planned something like this:
Would this kind of communication beetween PIC's work?
What is max baud rate that I can achieve?
I was thinking about IRDA but I need to isolate comm. between two PIC's on the same board (different GNDs).
Is there any info on opto-isolated CAN?
Thnx,
Would this kind of communication beetween PIC's work?
What is max baud rate that I can achieve?
I was thinking about IRDA but I need to isolate comm. between two PIC's on the same board (different GNDs).
Is there any info on opto-isolated CAN?
Thnx,
Opto-isolation
That should work with the USART routines, I would think that max baud would depend on the optoisolators used, but you should be able to easily do 115K. You would have to experiment. I don't know for sure, but I think that SPI would be able to be faster with a given optoisolator, just because syncronous is more robust.
CAN should also work, if you use the RX and TX pins on the chip, and don't connect to a transciever. It may also be able to run faster, because you can adjust a lot of timing parameters (bit sample point, etc.) that you can't adjust with USART. It is a lot of work to set up, though.
I still think that SPI is the best choice, overall.
CAN should also work, if you use the RX and TX pins on the chip, and don't connect to a transciever. It may also be able to run faster, because you can adjust a lot of timing parameters (bit sample point, etc.) that you can't adjust with USART. It is a lot of work to set up, though.
I still think that SPI is the best choice, overall.