This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to move Data from code memory to regsiters?

Other Parts Discussed in Thread: MSP430F2013

 

Hello Forum,

i am a 8051,PIC and AVR user but Just few days back i started playing around with MSP430 mcu ( MSP430F2013), i code in assembly. i have two questions:

1) how to store look table in code memory ?

2) Normally in 8051, we use "DPTR" and "ACC" for data moves from code memory, how to do the same in MSP430 ?

Thank you

Nura

 

 

  • For MSP430s, I/O registers, RAM, and FLASH all live in the same "address space" but each with a distinguished address.

    For example, in the case of MSP430F2013: Port 1 Input Register is at 0020h, etc. There are 256 bytes of RAM at 0200h to 02FFh. There are 2KB of Flash at 0F800h to 0FFFFh.

    The instructions treats I/O registers, RAM, or FLASH equally. Thus "MOV.B &0020,R15" will load R15 with Port 1 Input. "MOV.B &0200h,R15" will load R15 with content of RAM at 0200h, and "MOV.B &0F800,R15" will load R15 with content of FLASH at 0F800h. You can also use "MOV.B 0F800h(R14),R15" to load R15 from a table starting at 0F800h using R14 as index.

    Read the Chapter about CPU instruction set in the User's Guide.





  • OCY

    Thank You

     

    Nura

     

     

**Attention** This is a public forum