1
votes

I will use PIC18F26K83 as a master and I will have 4 different slaves that will be communicating with my master. In the datasheet for pps mapping only I2C1 Data input and I2C2 Data input pins are given as default. So I started to think that, this MCUonly support 2 different I2C communication (probably I'm wrong). Is there a limit for this MCU such as how many SDA and SCL pins can I assign? Can I have 4 different slaves which means can I have 4 in and 4 output pins?

2

2 Answers

1
votes

The PIC18F26K83 support only one I2C, as written in datasheet. With PPS (Peripheral Pin Select) registers I2C1SCLPPS and I2C1SDAPPS you can select any I/O pin of MCPu. By default is Pin14 defined as SCL1 and Pin15 as SDA1.

If you want to communicate with 4 I2C slaves than any slave need EN (enable) pin. With this EN pin you should select the slave at communication time. Normally is single I2C master able to communicate with up to 10 slaves.

0
votes

There are 4 pins which means 2 for SDA and 2 for SCL. Your best bet to use multiplexer.