EmbeddedRelated.com
Forums

implementing I2C on regular I/O pins msp430f147

Started by Liz May 20, 2008
Hello
I would like to implement I2C on standard I/O pins on msp430f147.
is there any code with remarks and explanations that can be suitable? i
want to connect to three different devices on the same SDA, SCL nets.

connecting to :
MICROCHIP eeprom 24AA256 AND analog DAC-AD5301

Thank you very much

Beginning Microcontrollers with the MSP430

http://focus.ti.com/analog/docs/techdocsabstract.tsp?familyId53&abstractName=slaa151

Liz:
> Hello
> I would like to implement I2C on standard I/O pins on msp430f147.
> is there any code with remarks and explanations that can be suitable? i
> want to connect to three different devices on the same SDA, SCL nets.
>
> connecting to :
> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>
> Thank you very much
>

----- Original Message -----
From: "Liz"
To:
Sent: Tuesday, May 20, 2008 9:42 AM
Subject: [msp430] implementing I2C on regular I/O pins msp430f147
> Hello
> I would like to implement I2C on standard I/O pins on msp430f147.
> is there any code with remarks and explanations that can be suitable? i
> want to connect to three different devices on the same SDA, SCL nets.
>
> connecting to :
> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301

TI has an app note and software dealing with that for the smaller chips.

Leon
--
Leon Heller
Amateur radio call-sign G1HSM
Yaesu FT-817ND transceiver
Suzuki SV1000S motorcycle
l...@btinternet.com
http://webspace.webring.com/people/jl/leon_heller/

Hello,

Could you tell any reference code in C for I2C on I/O pins?

--

Dipti

________________________________

From: m... [mailto:m...] On Behalf
Of Leon
Sent: Tuesday, May 20, 2008 8:27 PM
To: m...
Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147

----- Original Message -----
From: "Liz" >
Sent: Tuesday, May 20, 2008 9:42 AM
Subject: [msp430] implementing I2C on regular I/O pins msp430f147

> Hello
> I would like to implement I2C on standard I/O pins on msp430f147.
> is there any code with remarks and explanations that can be suitable?
i
> want to connect to three different devices on the same SDA, SCL nets.
>
> connecting to :
> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301

TI has an app note and software dealing with that for the smaller chips.

Leon
--
Leon Heller
Amateur radio call-sign G1HSM
Yaesu FT-817ND transceiver
Suzuki SV1000S motorcycle
l...@btinternet.com
http://webspace.webring.com/people/jl/leon_heller/



U can connect many slaves to msp430 on the same I2C pins. need not go
for GPIOs for this.

regards,
Shareef

On Wed, May 21, 2008 at 9:49 AM, wrote:
> Hello,
>
> Could you tell any reference code in C for I2C on I/O pins?
>
> --
>
> Dipti
>
> ________________________________
>
> From: m... [mailto:m...] On Behalf
> Of Leon
> Sent: Tuesday, May 20, 2008 8:27 PM
> To: m...
> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>
> ----- Original Message -----
> From: "Liz"
>>
> To: >
> Sent: Tuesday, May 20, 2008 9:42 AM
> Subject: [msp430] implementing I2C on regular I/O pins msp430f147
>
>> Hello
>> I would like to implement I2C on standard I/O pins on msp430f147.
>> is there any code with remarks and explanations that can be suitable?
> i
>> want to connect to three different devices on the same SDA, SCL nets.
>>
>> connecting to :
>> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>
> TI has an app note and software dealing with that for the smaller chips.
>
> Leon
> --
> Leon Heller
> Amateur radio call-sign G1HSM
> Yaesu FT-817ND transceiver
> Suzuki SV1000S motorcycle
> l...@btinternet.com
> http://webspace.webring.com/people/jl/leon_heller/
>

I know that we can connect multiple devices on the same I2C bus.

I am looking for reference code in C for interfacing MSP430 to EEPROM.

The link provided by Andreas Koepke, code is given in assembly & I am
not conversant with assembly language to modify the code.

Thanks & Regards,

Dipti

________________________________

From: m... [mailto:m...] On Behalf
Of mohammed shareef
Sent: Wednesday, May 21, 2008 10:13 AM
To: m...
Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147

U can connect many slaves to msp430 on the same I2C pins. need not go
for GPIOs for this.

regards,
Shareef

On Wed, May 21, 2008 at 9:49 AM, > wrote:
> Hello,
>
> Could you tell any reference code in C for I2C on I/O pins?
>
> --
>
> Dipti
>
> ________________________________
>
> From: m...
[mailto:m... ] On
Behalf
> Of Leon
> Sent: Tuesday, May 20, 2008 8:27 PM
> To: m...
> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>
> ----- Original Message -----
> From: "Liz"

>>
> To:
>
> Sent: Tuesday, May 20, 2008 9:42 AM
> Subject: [msp430] implementing I2C on regular I/O pins msp430f147
>
>> Hello
>> I would like to implement I2C on standard I/O pins on msp430f147.
>> is there any code with remarks and explanations that can be suitable?
> i
>> want to connect to three different devices on the same SDA, SCL nets.
>>
>> connecting to :
>> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>
> TI has an app note and software dealing with that for the smaller
chips.
>
> Leon
> --
> Leon Heller
> Amateur radio call-sign G1HSM
> Yaesu FT-817ND transceiver
> Suzuki SV1000S motorcycle
> l...@btinternet.com

> http://webspace.webring.com/people/jl/leon_heller/

> >


there are a set of c codes for I2C on ti's website..
MSP430F241x, MSP430F261x C Examples (IAR and CCE) (Rev. A)
(slac151a.zip, 120 KB )
http://focus.ti.com/docs/prod/folders/print/msp430f2618.html#toolssoftware

look for ur particular processor

regards,
Shareef

On Wed, May 21, 2008 at 10:27 AM, wrote:
> I know that we can connect multiple devices on the same I2C bus.
>
> I am looking for reference code in C for interfacing MSP430 to EEPROM.
>
> The link provided by Andreas Koepke, code is given in assembly & I am
> not conversant with assembly language to modify the code.
>
> Thanks & Regards,
>
> Dipti
>
> ________________________________
>
> From: m... [mailto:m...] On Behalf
> Of mohammed shareef
> Sent: Wednesday, May 21, 2008 10:13 AM
> To: m...
> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>
> U can connect many slaves to msp430 on the same I2C pins. need not go
> for GPIOs for this.
>
> regards,
> Shareef
>
> On Wed, May 21, 2008 at 9:49 AM, > > wrote:
>> Hello,
>>
>> Could you tell any reference code in C for I2C on I/O pins?
>>
>> --
>>
>> Dipti
>>
>> ________________________________
>>
>> From: m...
> [mailto:m... ] On
> Behalf
>> Of Leon
>> Sent: Tuesday, May 20, 2008 8:27 PM
>> To: m...
>> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>>
>> ----- Original Message -----
>> From: "Liz" >
>>>
>> To:
> >
>> Sent: Tuesday, May 20, 2008 9:42 AM
>> Subject: [msp430] implementing I2C on regular I/O pins msp430f147
>>
>>> Hello
>>> I would like to implement I2C on standard I/O pins on msp430f147.
>>> is there any code with remarks and explanations that can be suitable?
>> i
>>> want to connect to three different devices on the same SDA, SCL nets.
>>>
>>> connecting to :
>>> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>>
>> TI has an app note and software dealing with that for the smaller
> chips.
>>
>> Leon
>> --
>> Leon Heller
>> Amateur radio call-sign G1HSM
>> Yaesu FT-817ND transceiver
>> Suzuki SV1000S motorcycle
>> l...@btinternet.com
>
>> http://webspace.webring.com/people/jl/leon_heller/
>
>> > >
>>
>>
>>
>>

The assembly is very simple. All this code does is to define some sub
routines, call them in the right order and fiddle a little with the port
IO and direction bits. I think it is more difficult to understand how
the ports of the MSP430 work than this well documented code.

Best, Andreas

d...@mt.com:
> I know that we can connect multiple devices on the same I2C bus.
>
>
>
> I am looking for reference code in C for interfacing MSP430 to EEPROM.
>
> The link provided by Andreas Koepke, code is given in assembly & I am
> not conversant with assembly language to modify the code.
>
>
>
> Thanks & Regards,
>
> Dipti
>
>
> ________________________________
>
> From: m... [mailto:m...] On Behalf
> Of mohammed shareef
> Sent: Wednesday, May 21, 2008 10:13 AM
> To: m...
> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>
>
>
> U can connect many slaves to msp430 on the same I2C pins. need not go
> for GPIOs for this.
>
> regards,
> Shareef
>
> On Wed, May 21, 2008 at 9:49 AM, > > wrote:
>> Hello,
>>
>> Could you tell any reference code in C for I2C on I/O pins?
>>
>> --
>>
>> Dipti
>>
>> ________________________________
>>
>> From: m...
> [mailto:m... ] On
> Behalf
>> Of Leon
>> Sent: Tuesday, May 20, 2008 8:27 PM
>> To: m...
>> Subject: Re: [msp430] implementing I2C on regular I/O pins msp430f147
>>
>> ----- Original Message -----
>> From: "Liz" >
>> To:
> >
>> Sent: Tuesday, May 20, 2008 9:42 AM
>> Subject: [msp430] implementing I2C on regular I/O pins msp430f147
>>
>>> Hello
>>> I would like to implement I2C on standard I/O pins on msp430f147.
>>> is there any code with remarks and explanations that can be suitable?
>> i
>>> want to connect to three different devices on the same SDA, SCL nets.
>>>
>>> connecting to :
>>> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>> TI has an app note and software dealing with that for the smaller
> chips.
>> Leon
>> --
>> Leon Heller
>> Amateur radio call-sign G1HSM
>> Yaesu FT-817ND transceiver
>> Suzuki SV1000S motorcycle
>> l...@btinternet.com
>
>> http://webspace.webring.com/people/jl/leon_heller/
>
>> > >
>>
>>
>>
>
>

I guess you haven't checked the 'Files' section of this forum. I could
quickly find 2 software i2c implementations, one for a sensor the
other one for an eeprom.
True, comments are not in english (one in portuguese, one in spanish),
but it's a starting point. Take a deeper look into that section.

Michael K.

--- In m..., "Liz" wrote:
>
> Hello
> I would like to implement I2C on standard I/O pins on msp430f147.
> is there any code with remarks and explanations that can be suitable? i
> want to connect to three different devices on the same SDA, SCL nets.
>
> connecting to :
> MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
>
> Thank you very much
>

Oh, what the hell. I just uploaded a file called 'Soft_I2C.c'. It's an
old file I once found on the net. I remember it took a couple of days
to find. I used it with the Olimex 'Easy Web 3' connecting an external
EEPROM and it worked. I think I had to modify it to use 2 address
bytes instead of one, or was it 1 instead of 2? one external pull-up
resistor was also necessary.

Anyway, the link on top of the file doesn't work, so I have no idea
who wrote it. It claims to be: "Written in accordance with PHILIPS i2c
specification: 'The i2c-bus specification, version 2.1, january 2000'"

Hope it helps (this one has comments in english).

Michael K.

--- In m..., "tintronic" wrote:
>
> I guess you haven't checked the 'Files' section of this forum. I could
> quickly find 2 software i2c implementations, one for a sensor the
> other one for an eeprom.
> True, comments are not in english (one in portuguese, one in spanish),
> but it's a starting point. Take a deeper look into that section.
>
> Michael K.
>
> --- In m..., "Liz" wrote:
> >
> > Hello
> > I would like to implement I2C on standard I/O pins on msp430f147.
> > is there any code with remarks and explanations that can be
suitable? i
> > want to connect to three different devices on the same SDA, SCL nets.
> >
> > connecting to :
> > MICROCHIP eeprom 24AA256 AND analog DAC-AD5301
> >
> > Thank you very much
>