SI2C Slave how to ?

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

SI2C Slave how to ?

Post by octal » Thu Aug 09, 2007 9:47 pm

Hi,
Has anybody (tried or already) developed an SI2C slave mode driver for Swordfish?

Regards

Octal

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Fri Aug 10, 2007 2:06 am

Do any PICS support slave mode in hardware?

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Fri Aug 10, 2007 5:16 am

No not at my knowlege, this is why I asked for a SLAVE SI2C module.
Regards
Octal

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Fri Aug 10, 2007 7:37 am

I just remembered I wrote (Gabi helped me) a i2c slave system, interrupt driven, it was in Proton though.

Gave up on it as it did not suit my requirments and wrote my own protocal.

I will see if I can dig out my code

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Fri Aug 10, 2007 12:48 pm

Octal

I have sent you some pretty good code written in Proton, Gabi wrote it all I just tried to make it work in my application.

It includes master test > Slave code and an ISIS file to sim it in.

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Fri Aug 10, 2007 1:31 pm

Thank you Tim I'll try to see that this WE as I need it for a little application.
I'll keep you informed and I'll post a module if I finalize it.

Regards
Octal

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Fri Aug 10, 2007 1:34 pm

Do any PICS support slave mode in hardware?
yes they do

xor
Posts: 286
Joined: Sun Nov 05, 2006 1:15 pm
Location: NYC
Contact:

Post by xor » Fri Aug 10, 2007 9:43 pm

I believe that most, if not all, PIC18 support I2C Slave mode in hardware. I would like to see a buffered SPI Slave mode in hardware.

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Sat Aug 11, 2007 4:43 am

Yes XOR, it's right.
The code by GABI is based on Microchip AN734 (very nice article) and is well done. But what I was looking for is a Software SI2C slave mode :( I think that I'll have to sacrify my MSSP port :cry:
Regards
Octal

PS. Anyway I'll transform GABI work to a SF module. I have just to check everything in regards to AN734a app note.

TimB
Posts: 262
Joined: Wed Oct 04, 2006 7:25 am
Location: London UK

Post by TimB » Sat Aug 11, 2007 8:31 am

I would like to see a buffered SPI Slave mode in hardware
Really buffered mode is the only sensible method.

One thing I found to remember,

When the command comes in with the required read address you have to load the buffer with that data then before the next read comes in.

In my application I did not have the data yet and was waiting on it to come in from another source, you cannot stall things waiting on it.

User avatar
RangerBob
Posts: 152
Joined: Thu May 31, 2007 8:52 am
Location: Beds, UK

Post by RangerBob » Wed May 06, 2009 7:52 am

Hi guys,

Sorry to resurrect a dead thread, but was there any further progress on this subject?

I require either a hardware or software I2C module and as usual I thought it wise to check the forums & wiki, and I found this thread.

I thought it would be prudent to ask before reinventing the wheel!

Regards,

Nathan

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Wed May 06, 2009 12:00 pm

it may be helpfull...

Since the time I posted this thread first, I wrote a whole module for I2C Slave. I have a fully working I2C Slave module (hardware module) for Swordfish (using interrupts). I'm in a move. I'll post it once I got my sources under hand.

Regards
octal

User avatar
RangerBob
Posts: 152
Joined: Thu May 31, 2007 8:52 am
Location: Beds, UK

Post by RangerBob » Wed May 06, 2009 1:13 pm

Thanks Octal,

That is just what I was after! No hurry, whenever you are ready, it'll save me a load of work!

Regards,

Nathan

User avatar
blueroomelectronics
Posts: 46
Joined: Mon Apr 23, 2007 3:48 pm
Location: Toronto
Contact:

Post by blueroomelectronics » Mon Aug 31, 2009 1:42 pm

octal wrote:it may be helpfull...

Since the time I posted this thread first, I wrote a whole module for I2C Slave. I have a fully working I2C Slave module (hardware module) for Swordfish (using interrupts). I'm in a move. I'll post it once I got my sources under hand.

Regards
octal
Has it been posted somewhere?

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Tue Sep 01, 2009 10:40 am

Sorry I forgot to do it.
I'll be back at home on thursday, I'll post the module I got as is (it works).

Regards
octal

Post Reply