News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

2 I2c

Started by tolyan249, Today at 05:52 PM

Previous topic - Next topic

tolyan249

Question: how can I create 2 I2C ports?
Since the speeds are very different, one hardware port works with an OLED display, and I need a second software port for the equipment. For the second port, I want to use the I2C_software.inc file for PIC12F1840.

Thank you.

Frizie

You can opt for the software variant using the I2CIn and I2COut instructions.
Ohm sweet Ohm | www.picbasic.nl

trastikata

You can still use the same hardware I2C port, just change the speed before accessing the devices. Use the SSP1ADD to set the new speed, you can calculate it as shown on page 259, equation 25-1.

▲