Yen-Ming Mark Lai wrote:

hello,

what command should i substitute for the command sfrb and sfrw?

Special Function Register (sfr) variables are located in direct internal
RAM locations. sfrb instructions have a range 0x00 to 0xFF and sfrw from
0x100 to 0x1FF. The sfrb type allows a symbolic name to be associated with
a byte in this range. The register at that address can be addressed
symbolically, but no memory space is allocated.

thanks.

ml

SFRs work just like IAR. All the SFRs are defined in the headers. You don't need to define anything yourself. Just include the header <io.h>. This in turn will include the relevant header for the MCU you are using. As with IAR, you just do things like

TACTL = 42;
x = TACTL;

to use the SFRs. All the SFR names are exactly the same as IAR - they actually come from TI themselves, so all the MSP430 tools use the same names for compatibility.

Basically, don't worry, just use them! :-)

Regards,
Steve




Reply via email to