Hi
Can the I2C Master Slave components operate in Multi Master configuration.
And does the Slave initiate and interrupt when data is received.
Thanks
I2C Multi Master
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C Multi Master
Hello,
I'm not sure about Multi master, It likely does work but there are also likely complications. The Slave is likely fine and it's the master that might have problems. If the comms is fairly sparse then the chance of a collision between masters is quite low and it should be fine.
The Slave does require the SSP interrupt which was added to devices fairly recently.
I'm not sure about Multi master, It likely does work but there are also likely complications. The Slave is likely fine and it's the master that might have problems. If the comms is fairly sparse then the chance of a collision between masters is quite low and it should be fine.
The Slave does require the SSP interrupt which was added to devices fairly recently.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: I2C Multi Master
Hi Ben
I see no mention of Interrupt in my V7 I2C Slave component.
Doesn't I2C included (albeit basic) a handshaking mechanism using ACK http://www.esacademy.com/en/library/tec ... shake.html
Thanks
I see no mention of Interrupt in my V7 I2C Slave component.
So what do I do? Can this be implement in a C routine or you sent me a new componentBenj wrote: The Slave does require the SSP interrupt which was added to devices fairly recently.
Doesn't I2C included (albeit basic) a handshaking mechanism using ACK http://www.esacademy.com/en/library/tec ... shake.html
Thanks
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C Multi Master
Hi,
I added the interrupts for v8. What chip are you using and i'll see if I can add the code to the v7 definition.
I added the interrupts for v8. What chip are you using and i'll see if I can add the code to the v7 definition.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: I2C Multi Master
Hi Ben,
AH! Sorry if this has been a PITA for you personally! I thought it would be a simple matter of adding/copying some functionality to the I2C Slave macro and it would 'just' pushed through all the ranges.
I'm SOO temped to say PIC and AVR LOL.
I'm still researching my design, but thanks to China, I am hoping to use the ATMEGA2560, I will probably use both the ATMEGA328P (ATMEGA328PB) and PIC12F1840.
Further to another post I made here requesting the inclusion of a ATMEGA328PB, if this can be sorted out, then the PB variant ofthe ATMega328 would be nice. If that could be included then all my bases are covered.
There will be a number of distributed microcontrollers which will be in a sleep mode for long periods of time, only for them to wake up on an event eg GSM data, data on a bus etc.
I will be using the CAN (MCP2551 & MCP2151) macros , I2C and SPI. Will the component macro implementations for these allow for wakeup events - interrupts.
Thanks again Ben
AH! Sorry if this has been a PITA for you personally! I thought it would be a simple matter of adding/copying some functionality to the I2C Slave macro and it would 'just' pushed through all the ranges.
I'm SOO temped to say PIC and AVR LOL.
I'm still researching my design, but thanks to China, I am hoping to use the ATMEGA2560, I will probably use both the ATMEGA328P (ATMEGA328PB) and PIC12F1840.
Further to another post I made here requesting the inclusion of a ATMEGA328PB, if this can be sorted out, then the PB variant ofthe ATMega328 would be nice. If that could be included then all my bases are covered.
There will be a number of distributed microcontrollers which will be in a sleep mode for long periods of time, only for them to wake up on an event eg GSM data, data on a bus etc.
I will be using the CAN (MCP2551 & MCP2151) macros , I2C and SPI. Will the component macro implementations for these allow for wakeup events - interrupts.
Thanks again Ben
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2C Multi Master
Hello,
I've done the PIC device for you with the new interrupt. The AVR devices do not have SPI or I2C based interrupts available so you may instead have to use pin change interrupts instead.
I've done the PIC device for you with the new interrupt. The AVR devices do not have SPI or I2C based interrupts available so you may instead have to use pin change interrupts instead.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel