I found some difficulties in trying to compile the example proposed by
TI in the slac080a.zip archive : msp430x20x3_ usi_06.c .
When I try to compile it, IAR returns 'Error[PE020] : identifier
“USIIFGCC” is undifined’.
Well as I’m a (real) newby I first thought it was my fault … but I
had first modify the .c file to choose the right processor I’m working
with : #include <msp430x20x3. h> (I’m learning with a eZ430!), so that
wasn’t the origin of the problem!
The advantage of such a problem (at least for me!) is that you have to
go futher in the ‘architecture’ of the compiler, the c language, the
files associated with the compiler …
I think I’ve ‘discover’ something! but it sure have been noticed
before by an expert (or I’m completely wrong and I’m doing somewhere
something idiot!):
In the software of TI, the interrupt flag in the USICNT control
register is named USIIFGCC, whereas it seems to be called USIFGDC in
the IAR compiler…
Two things : I didn’t understand how things are going and I’m
completely out of the subject or it’s right and I wonder how Z. Albus
from TI managed to compile and test the I2C exemples he proposed! (I
must admit that at that moment I’m trying to understand the exemples
he gave to the community … it could explain a lot of things !!!)
If someone can give me more informations I would be very very pleased
!! (my goal is to use the USI module with I2C to drive I2C LCD, ADC,
DAC … and I’m a little beat lost with the 4 examples of TI… I
would have preferred routines to drive the I2C module with for example
functions written in C with parametters like slave address, read or
write, data to write … I could have used ‘in extenso’ in my own
applications but I think I’ll have to do the job (and it will take a
long time for me I think …))
Didier
Nota : If I’m right, I’ll ask to IAR a reward : my so desired I2C
routines or a complete version of the compiler, or a private course in
C and MSP430 (it’s perhaps the best choice giving my present level
!!!) … OK I’m joking!!
:lol: