I2C problem

Started by Rivan Rivaldy March 20, 2009
Hi all,
Currently I'm facing problem with using I2C in my project.
I'm using M68HC912B32 connected to a pressure transducer CSDX2000A2R from SensorTechnics. The transducer requires I2C for communicating with the controller. I'm using bit banging method for I2C interface.

The problem is, after sending the slave address to the sensor, the controller didn't read any acknowledgement from the slave. I've checked using a simple code that the voltage during High and Low states of the SDA & SCL pins are within the acceptable range.

Did anyone have any experience with I2C using bit banging method? I do hope that you could help me solving this problem.

Your help is greatly appreciated.
Thank you very much.

Best regards,
Rivan

Hi !

What is bit banging method ?
For I2C access (memory and clock), I don't understand how run I2C Interrupt,
so I developed soft (C) driver... For me, it runs... Is this "bit banging" ?

Joel
-----Message d'origine-----
De: 6... [mailto:6...] De la part de
Rivan Rivaldy
Envoy vendredi 20 mars 2009 06:38
: 6...
Objet: [68HC12] I2C problem

Hi all,
Currently I'm facing problem with using I2C in my project.
I'm using M68HC912B32 connected to a pressure transducer CSDX2000A2R from
SensorTechnics. The transducer requires I2C for communicating with the
controller. I'm using bit banging method for I2C interface.

The problem is, after sending the slave address to the sensor, the
controller didn't read any acknowledgement from the slave. I've checked
using a simple code that the voltage during High and Low states of the SDA &
SCL pins are within the acceptable range.

Did anyone have any experience with I2C using bit banging method? I do hope
that you could help me solving this problem.

Your help is greatly appreciated.
Thank you very much.

Best regards,
Rivan

Hi Joel,
For communicating with the sensor, I didn't use I2C driver. Instead, I connected the SDA and SCL lines of the sensor to 2 pins on the microcontroller. These 2 pins will then act as the SDA and SCL line. For example, if I want to send a start sequence to the sensor, I will keep the controller pin connected to the SCL to be High, while the controller pin which is connected to SDA will have a High to Low transition and thus simulate the Start sequence for I2C slave.

What kind of driver did you develop for your I2C?

Thank you.

Rivan
--- In 6..., "jpdi" wrote:
>
> Hi !
>
> What is bit banging method ?
> For I2C access (memory and clock), I don't understand how run I2C Interrupt,
> so I developed soft (C) driver... For me, it runs... Is this "bit banging" ?
>
> Joel
>
>
> -----Message d'origine-----
> De: 6... [mailto:6...] De la part de
> Rivan Rivaldy
> Envoy vendredi 20 mars 2009 06:38
> : 6...
> Objet: [68HC12] I2C problem
>
> Hi all,
> Currently I'm facing problem with using I2C in my project.
> I'm using M68HC912B32 connected to a pressure transducer CSDX2000A2R from
> SensorTechnics. The transducer requires I2C for communicating with the
> controller. I'm using bit banging method for I2C interface.
>
> The problem is, after sending the slave address to the sensor, the
> controller didn't read any acknowledgement from the slave. I've checked
> using a simple code that the voltage during High and Low states of the SDA &
> SCL pins are within the acceptable range.
>
> Did anyone have any experience with I2C using bit banging method? I do hope
> that you could help me solving this problem.
>
> Your help is greatly appreciated.
> Thank you very much.
>
> Best regards,
> Rivan
>
>
>
>
>
>
OK, Rivan.

This is the system I use for a couple of years.
I can send you of list the C source file I use for that.
This is the "driver" I spoke in my precedent mail.

Sorry, comments are in French.

Joel

-----Message d'origine-----
De: 6... [mailto:6...] De la part de
Rivan Rivaldy
Envoy vendredi 20 mars 2009 09:53
: 6...
Objet: [68HC12] Re: I2C problem

Hi Joel,
For communicating with the sensor, I didn't use I2C driver. Instead, I
connected the SDA and SCL lines of the sensor to 2 pins on the
microcontroller. These 2 pins will then act as the SDA and SCL line. For
example, if I want to send a start sequence to the sensor, I will keep the
controller pin connected to the SCL to be High, while the controller pin
which is connected to SDA will have a High to Low transition and thus
simulate the Start sequence for I2C slave.

What kind of driver did you develop for your I2C?

Thank you.

Rivan

Hi Joel,
Where is the driver that you spoke of?
Do you mind to send it to my email at r...@ntu.edu.sg?
Thank you very much.

Rivan
--- In 6..., "jpdi" wrote:
>
> OK, Rivan.
>
> This is the system I use for a couple of years.
> I can send you of list the C source file I use for that.
> This is the "driver" I spoke in my precedent mail.
>
> Sorry, comments are in French.
>
> Joel
>
> -----Message d'origine-----
> De: 6... [mailto:6...] De la part de
> Rivan Rivaldy
> Envoy vendredi 20 mars 2009 09:53
> : 6...
> Objet: [68HC12] Re: I2C problem
>
> Hi Joel,
> For communicating with the sensor, I didn't use I2C driver. Instead, I
> connected the SDA and SCL lines of the sensor to 2 pins on the
> microcontroller. These 2 pins will then act as the SDA and SCL line. For
> example, if I want to send a start sequence to the sensor, I will keep the
> controller pin connected to the SCL to be High, while the controller pin
> which is connected to SDA will have a High to Low transition and thus
> simulate the Start sequence for I2C slave.
>
> What kind of driver did you develop for your I2C?
>
> Thank you.
>
> Rivan
>