Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 14, 2005 13:57:22

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

[Mspgcc-users] usart.h / I2C


Hi,

in the TI-UG is mentioned a difference in I2CDRW/I2CDRB as Word/Byte-Registers.
In the msp430/usart.h, I found:


#define I2CDR_ 0x0076 /* I2C data */
sfrb(I2CDR, I2CDR_);


Can we write for compatibility:

#define I2CDRW_ 0x0076 /* I2C data Word*/
sfrb(I2CDRW, I2CDR_W);
#define I2CDRB_ 0x0076 /* I2C data Byte*/
sfrb(I2CDRB, I2CDR_B);

regards,

Steffen Netz


--
--------------------------------------------------------------------
| 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. 14, 2005 14:30:45

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

[Mspgcc-users] usart.h / I2C


Steffen Netz wrote:Hi,

in the TI-UG is mentioned a difference in I2CDRW/I2CDRB as Word/Byte-Registers.
In the msp430/usart.h, I found:


#define I2CDR_ 0x0076 /* I2C data */
sfrb(I2CDR, I2CDR_);


Can we write for compatibility:

#define I2CDRW_ 0x0076 /* I2C data Word*/
sfrb(I2CDRW, I2CDR_W);
#define I2CDRB_ 0x0076 /* I2C data Byte*/
sfrb(I2CDRB, I2CDR_B);Address 0x0076 is on the 8 bit bus. It is most certainly an 8 bitregister. What makes you think it could be treated as a word register?What is in our header file agrees with the current header files from TI.I don't think it would be wise not to follow their way of doing things.Steve

Offline

Board footer

Moderator control

Enjoy the 18th 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