EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

I2C example

Started by km5h January 14, 2008
I am not sure what the version # of IAR I was referring to. Let me put
it this way:

I downloaded the KickStart form TI a while back. The file name was
slac050p.zip and it works with the source code in slaa386.zip

At a later date, I downloaded the KickStart from TI again. The file
name was slac050q.zip and it does not work with the same source code.

Do you have to use the code in slaa386.zip? There are other source
code somewhere else. For me, I would rather write the code myself so
that I do not need to understand what others are thinking and
assuming. I would also use assembly so that I do not need to
understand what version and what brand of the compiler is used. (For
that matter, the Assembler also do me in from time to time. But less
frequent and easier to fight.)

--- In m..., "km5h" wrote:
>
> Yes, I have version 3 of the IAR. However, the file at the link has
> a version of 2. I changed it to 3 so that the compile would work.
> Hope that was not a bad idea. Or should I go back to version 2 of the
> IAR?
>
> Thanks, Tom
>
> --- In m..., "old_cow_yellow"
> wrote:
> >
> > If you use c, you still has to watch out for which revision of which
> > compiler/linker you are using.
> >
> > BTW, are you using version 3 of IAR?
> >
> > --- In m..., "km5h" wrote:
> > >
> > > Thanks for the link. I have not had a time to work with it but
> will
> > > soon. It looks like everything is there. I was doing a copy and
> > > past out of the manual. I somehow missed the that the zip file
> > > existed.
> > > I have the Si570 working on a 16F88, but wanted to use the 430.
> > >
> > > Sorry for the confusion.
> > > Thanks again
> > > Tom
> > >
> > >
> > >
> > > --- In m..., Aaron Greer wrote:
> > > >
> > > > Tom,
> > > > all those things look fine in my code. Do you have an old copy
> or
> > > something? Did you download the code in a zip file?
> > > > Here is where I got mine:
> > > > http://focus.ti.com/general/docs/techdocsabstract.tsp?
> > > abstractName=slaa368
> > > > If you can verify that you've got the same zip file of code as
> me
> > > and if you still don't see those variables defined, can you
> provide
> > > more details of where you're looking?
> > > > -Aaron
> > > >
> > > > ----- Original Message -----
> > > > From: "km5h"
> > > > To: m...
> > > > Sent: Monday, January 14, 2008 9:08:17 PM (GMT-0700)
> America/Denver
> > > > Subject: [msp430] Re: I2C example
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > TxData0, TxData1, RxData, i , j, at least are not defined
> anywhere.
> > > >
> > > > Tom
> > > >
> > > > --- In m... , Aaron Greer
> wrote:
> > > > >
> > > > > What code do you believe is missing? I played around with
> that
> > > for
> > > > a bit a while back and thought it was complete.
> > > > > -Aaron
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "km5h"
> > > > > To: m...
> > > > > Sent: Monday, January 14, 2008 8:01:34 AM (GMT-0700)
> > > America/Denver
> > > > > Subject: [msp430] I2C example
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I am trying to use the example code in "Using the USI I2C
> Code
> > > > Library
> > > > > (SLAA368)".
> > > > > They leave a some essential code necessary out so I am trying
> to
> > > > add
> > > > > the missing code. I am not a very good C programmer (yet).
> > > > > Has anyone successfully used this code to control an I2C
> device?
> > > > >
> > > > > Any comments would be appreciated
> > > > >
> > > > > Thanks,
> > > > > Tom Hoflich
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
>

Beginning Microcontrollers with the MSP430

km5h wrote:
> Yes, I have version 3 of the IAR. However, the file at the link has
> a version of 2. I changed it to 3 so that the compile would work.
> Hope that was not a bad idea. Or should I go back to version 2 of the
> IAR?

The big difference is between version 1.xx and all the rest. Typically,
you don't have to change the source when goint from version 2.xx to
3.xx, or 4.xx for that matter...

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
What is the difference between __rt_version 2 and 3 (aside from
calling convention)?

What are the guide lines for mixing c code and assembly code under
__rt_vesion 3? (Aside from calling convention.)

And what about migrating old assembly code intended to be mixed with c
code under _rt_version 2 into 3?

I think km5h actually has IAR version 4 of IAR which uses __rt_version
3 and he was trying to link with an old assembly code which says:

RTMODEL "__rt_version", "2"

I know you can force IAR version 4 to use the older calling
convention. But is there anything else in the runtime environment that
might cause problems?

--- In m..., Anders Lindgren
wrote:
>
> km5h wrote:
> >
> >
> > Yes, I have version 3 of the IAR. However, the file at the
> > link has a version of 2. I changed it to 3 so that the
> > compile would work.
> > Hope that was not a bad idea. Or should I go back to
> > version 2 of the IAR?
>
> The big difference is between version 1.xx and all the rest.
> Typically, you don't have to change the source when goint
> from version 2.xx to 3.xx, or 4.xx for that matter...
>
> -- Anders Lindgren, IAR Systems
> --
> Disclaimer: Opinions expressed in this posting are strictly
> my own and not necessarily those of my employer.
>

The 2024 Embedded Online Conference