Examples of MSP430(G2553) assembly
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
flabbergast 4ef8fa2af1
Update README.
2 years ago
01-button-led Update scripts, readmes. 2 years ago
02-lpm3wait Update scripts, readmes. 2 years ago
03-uart Update scripts, readmes. 2 years ago
04-uartstring Update scripts, readmes. 2 years ago
05-morestring 05-morestring: rewrite write.asm. 2 years ago
06-i2c-bitbang 05-morestring: rewrite write.asm. 2 years ago
07-spiflash 05-morestring: rewrite write.asm. 2 years ago
common Fix stoopid registers error that broke uart. 2 years ago
pdfs Add pdf manuals. 2 years ago
.gitignore Update scripts, readmes. 2 years ago
README.md Update README. 2 years ago
UNLICENSE Add unlicense; update README, registers. 2 years ago

README.md

msp430 assembly examples

A record of my journey learning MSP430 assembly. A series of examples that aim to arrive at assembly code for a RFM69-radio based sensor network: some code for the sensors themselves, some code for a gateway.

My starting point was mecrisp forth - which is also an excellent basis for working with MSP430! Highly recommended! (But I wanted to learn some assembly.)

Since mecrisp sources are written for/compiled with macro assembler, naturally these examples are for that as well.

All code is for MSP430G2553, presumably sitting on a MSP430G2 Launchpad. You'll want the excellent mspdebug for programming the chip and debugging.

register conventions

See common/regconvention.asm. I renamed the registers and am pretty much using only the aliases, according to the "convention" specified in that file.

function calling conventions

I am mixing two approaches: I try to make function parameters to be passed in registers (a0,a1,...) to try to avoid memory read/writes. However some functions do use the data stack that's set up in core.asm. You need to look at the comments around the function definitions to find out which one is being used. (Starts at 04-.)

todo

  • rfm69 tx
  • rfm69 rx
  • readline?
  • gateway