I had to make the some changes to use AN734 (I2C slave example) on a 16F690. For more information, including an idea for testing I2C, see my blog. (http://vivara.net/blog/?p=53) Here's the patch --- an734.orig.asm 2006-03-09 15:09:16.000000000 -0600 +++ an734.asm 2007-01-14 11:36:07.000000000 -0600 @@ -58,14 +58,14 @@ ; Include Files ;--------------------------------------------------------------------- -#include ; Change to device that you are using. +#include ; Change to device that you are using. ;--------------------------------------------------------------------- ;Constant Definitions ;--------------------------------------------------------------------- -#define NODE_ADDR 0x02 ; I2C address of this node +#define NODE_ADDR 0x06 ; I2C address of this node ; Change this value to address that ; you wish to use. ;--------------------------------------------------------------------- @@ -80,6 +80,8 @@ udata_shr WREGsave res 1 + + udata STATUSsave res 1 FSRsave res 1 PCLATHsave res 1 @@ -182,14 +184,18 @@ bsf PCON,NOT_POR bsf PCON,NOT_BOR + banksel ANSELH ; I2C lines cannot be on ADC duty + bcf ANSELH, ANS10 ; AN10 is multiplexed with RB4/SDA + banksel Index ; Clear various program variables clrf Index clrf PORTB clrf PIR1 banksel TRISB - clrf TRISB - + bsf TRISB,4 ; I2C clock + bsf TRISB,6 ; I2C data + movlw 0x36 ; Setup SSP module for 7-bit banksel SSPCON movwf SSPCON ; address, slave mode -- You think that it is a secret, but it never has been one. - fortune cookie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist