EmbeddedRelated.com
Forums
Memfault Beyond the Launch

IAR msp430x22x4.h Ambiguous #defines

Started by abufadel April 8, 2008
Greetings,
I am confused about some defines in the given msp430x22x4.h with IAR.

There is #define INCH3 for example and it explicitly says ADC10 input
channel selection (did not work for me).
There is also INCH_3 with no explanation but actually worked.

The same issue for the OA inputs (eg. OAP0 and OAP_0).

Can someone shed some light on this?

Thank you,

A

Beginning Microcontrollers with the MSP430

The most significant 4 bits of ADC10CTL1 is defined as INCH3, INCH2,
INCH1, and INCH0.

INCH_0 is a shorthand for 0.
INCH_1 is a shorthand for INCH0.
INCH_2 is a shorthand for INCH1.
INCH_3 is a shorthand for INCH1+INCH0.
INCH_4 is a shorthand for INCH2.
INCH_5 is a shorthand for INCH2+INCH0.
INCH_6 is a shorthand for INCH2+INCH1.
etc.

--- In m..., "abufadel" wrote:
>
> Greetings,
> I am confused about some defines in the given msp430x22x4.h with IAR.
>
> There is #define INCH3 for example and it explicitly says ADC10 input
> channel selection (did not work for me).
> There is also INCH_3 with no explanation but actually worked.
>
> The same issue for the OA inputs (eg. OAP0 and OAP_0).
>
> Can someone shed some light on this?
>
> Thank you,
>
> A
>


Memfault Beyond the Launch