You could trigger a timer watchdog subroutine, that starts when the slave sees data coming...then sets a flag 'no more data' when the data line goes idle longer than the pulse width of the data bits.
As you know the I2C bus rate in KHz, figure out the bit rate, set WDT for 1.5 to 2 bit widths. Try it and 'fine tune' as required.
It's a simple, effective way to do what you want and I've done it for almost 3 decades with up to 255 slaves per master so I know it does work!
xlh1460
Joined: 28 Jul 2010 Posts: 10
Posted: Thu Dec 30, 2010 4:19 pm
I was thinking more along the lines of solving this just using the MSSP module.
I have made some progress but I am starting to think your approach may end up being simpler.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum