Searching \ for 'SSP Module Lockup used as I2C' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'SSP Module Lockup used as I2C'.

Truncated match.
PICList Thread
'SSP Module Lockup used as I2C'
1998\04\30@220707 by Craig Lee

flavicon
face
I'm using the I2C modules on the 16CXX in slave mode.

I have written a slave driver to work with it in PICC.

The problem is that after the first string transfer, the bus
locks up and my clock and data lines are held low by the
slave module.

Would anyone be willing to look at my code and offer
some suggestions?  I had it working yesterday morning
reliably, but now that I've added the error routines it's buggered.
I must be missing some implementation detail.

Also, suggestions on error checking from the master side would
be appreciated.

Craig


'SSP Module Lockup used as I2C'
1998\05\01@043920 by Keith Howell
flavicon
face
Hi Craig.

The SSP gave me a lot of headaches too.
You can check my postings on the PIClist archive,
which should show how they were solved.

Tell us what it is trying to do, and exactly how it fails,
and we may be able to make a more accurate diagnosis.

What errors do you expect to detect?

You wrote:

> The problem is that after the first string transfer,
> the bus locks up and my clock and data lines are
> held low by the slave module.

Hmm, looks like the CKP bit is not being operated
to allow the I2C bus to continue after a transfer.
Is this incoming or outgoing bytes, or both?

If you do not NACK the last byte of a string read
from your PIC, the SSP assumes you will be wanting
another and interrupts the CPU to get  another.
If there are no more to be sent, what do you do?

My PIC has had to reply to such naughty masters.
You can't clear CKP to un-wait the bus until SSPBUF
is loaded. What I do is load a dummy byte.
The MS bit always manages to get onto SDA, so the
master cannot produce a stop condition if SDA is low.
So D7 of the dummy byte has to be high.

That took some finding out I can tell you!

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...