Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4922

pic24fv32ka302 I2C clock stretch not working

$
0
0
Hello all.

I just started messing around some pic24s and ran into a little problem. I am trying to use the I2C in slave mode and so far it will acknowledge the address, but it does not hold the clock line low to peform clock stretching.

Here's what I'm working with now...
Code (Text):
  1.  
  2.  
  3. __i2c_slave_init:
  4.   mov #0, w0
  5.   mov.b WREG, i2c_len
  6.   mov.b WREG, i2c_flags
  7.   bset I2C1CON, #I2CSIDL
  8.   bset I2C1CON, #DISSLW
  9.   bset I2C1CON, #STREN
  10.   movlf #0xff, I2C1BRG
  11.   movlf #0x22, I2C1ADD  
  12.   bclr IFS1,...
pic24fv32ka302 I2C clock stretch not working

Viewing all articles
Browse latest Browse all 4922

Trending Articles