Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 15, 2005 08:04:52

Steffen N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Re: usart.h / I2C


Hi,

>> in the TI-UG is mentioned a difference in I2CDRW/I2CDRB as
>> Word/Byte-Registers.

in the IAR-File msp430x16x.h, there are the following lines:

------cite--------------------------------------
//#define I2CDRB U0RXBUF_ /* I2C Data for Byte access */
#define I2CDRB_ U0RXBUF_ /* I2C Data for Byte access */
//#define I2CDRW U0RXBUF_ /* I2C Data for Word access */
#define I2CDRW_ U0RXBUF_ /* I2C Data for Word access */

#ifdef __IAR_SYSTEMS_ICC__
__no_init union
{
union
{
/* USART 0 Receive Buffer */
volatile READ_ONLY unsigned char U0RXBUF;
volatile unsigned char I2CDRB;
volatile unsigned short I2CDRW;
};
struct
{
/* USART 0 Transmit Buffer */
unsigned char dummy;
volatile unsigned char U0TXBUF;
};
} @ 0x0076;
#else
DEFC( U0RXBUF , U0RXBUF_)
DEFC( I2CDRB , U0RXBUF_)
DEFW( I2CDRW , U0RXBUF_)
#endif
------cite--------------------------------------

I agree with Steve, as the size depends on the Bit I2CWORD.

BTW, is there a way to follow the group on a News-Server?

regards,

Steffen
--------------------------------------------------------------------
| Fraunhofer Institut Photonische Microsysteme |
| |
| Fraunhofer Institute for Photonic Microsystems ( Germany ) |
| |
| Steffen Netz | phone : ( +49 ) (0)351/8823-212 |
| Maria-Reiche-Str. 2 | fax : ( +49 ) (0)351/8823-266 |
| 01109 Dresden | email : steffen.n...@ipms.fraunhofer.de |
--------------------------------------------------------------------

Offline

#2 Nov. 17, 2005 01:02:21

Steve U.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Re: usart.h / I2C


I checked the latest headers from TI, and they have indeed changed. Theoriginal I2CDR definition has been removed completely. That sounds likeit might have compatibility implications. However, I changed our headerfile to reflect TI's latest. There are now definitions for I2CDRB andI2CDRW. There is no definition for I2CDR.Steve

Steffen Netz wrote:Hi,in the TI-UG is mentioned a difference in I2CDRW/I2CDRB asWord/Byte-Registers.in the IAR-File msp430x16x.h, there are the following lines:

------cite--------------------------------------
//#define I2CDRB U0RXBUF_ /* I2C Data for Byte access */
#define I2CDRB_ U0RXBUF_ /* I2C Data for Byte access */
//#define I2CDRW U0RXBUF_ /* I2C Data for Word access */
#define I2CDRW_ U0RXBUF_ /* I2C Data for Word access */

#ifdef __IAR_SYSTEMS_ICC__
__no_init union
{
union
{
/* USART 0 Receive Buffer */
volatile READ_ONLY unsigned char U0RXBUF;
volatile unsigned char I2CDRB;
volatile unsigned short I2CDRW;
};
struct
{
/* USART 0 Transmit Buffer */
unsigned char dummy;
volatile unsigned char U0TXBUF;
};
} @ 0x0076;
#else
DEFC( U0RXBUF , U0RXBUF_)
DEFC( I2CDRB , U0RXBUF_)
DEFW( I2CDRW , U0RXBUF_)
#endif

Offline

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support