I'm looking for the i2c slave code example to run it on C51 compatible chip. My target is to make some device that can be externally configured by i2c bus. We are going to use dimax u2c-11 as i2c master http://www.xdimax.com/u2c/u2c11.html This device has a nice feature to select different i2c clock speed so I'm going to addjust it to my cpu slave module speed. Once again I need slave not master example. Thank you.
the easy way: use a P89LPC... or a P89C66x or a SILabs f12x, they all have hardware IIC. For those the code can be generated by CodeArchitect free from http://www.esacademy.com. The code works "out of the can" for the LPC, for the P89C66x it takes 10min to make it fit, for the SILabs a bit longer. IF you insist in bitbanging there are several samples with code in the Philips appnotes: http://www.semiconductors.philips.com/buses/i2c/support/index.html Erik
Thanks Eric. I will need bitbanging as I'm intended to use low end C51 without i2c HW module.
The P89LPC9xx chips are "low end" and DO have HW IIC Erik