Searching \ for '[PIC] SSP I2C Problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'SSP I2C Problems'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] SSP I2C Problems'
2000\06\04@184141 by Les

picon face
part 0 324 bytes content-type:application/octet-stream;                                        Thanks guys


Content-Type: application/octet-stream;
Content-Disposition: attachment;

Attachment converted: creation:SSP_I2C.Asm (????/----) (00016122)

2000\06\05@113406 by Achim Vollhardt

Hi Les,
it seems that your I2C-sending routine lacks of polling of the BusyFlag
which will be cleared, when the transmission of the 8 bits is complete.

I2C_in and I2Cout are small subroutines that only change the direction
of the SDA Pin as acknowledging won't work with SDA configured as
The byte supposed for transmission has to be delivered in W.

;************************* Send routine I2C-Bus : send_I2C
       banksel PIR1
       bcf     PIR1,SSPIF

       banksel SSPBUF
       movwf   SSPBUF

       banksel SSPSTAT
i2ctx                           ; I2C send in process
       btfsc   SSPSTAT,BF
       goto    i2ctx

       call    I2C_in

       banksel PIR1
i2cnoack                        ; I2C frame complete
       btfss   PIR1,SSPIF
       goto    i2cnoack

       call    I2C_out

       banksel SSPCON2
       btfss   SSPCON2,ACKSTAT
       retlw   0               ; ACK
       retlw   1               ; no ACK

Les wrote:
{Quote hidden}

   Achim Vollhardt
   Universitaet Zuerich
   Physik Institut, 36J36
   Winterthurerstrasse 190
   CH-8057 Zuerich

   tel: 0041-1-6355771


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