Porting code to MSP430

I took a little time to look into porting code written for AVR in order to run it on the MSP430 architecture. It’s easier than you think, being mostly small differences like an extra step to enable pull-up resistors. But there is a lot to be learned in order to transition away from using EEPROM.

Since the TI chips don’t have EEPROM you need to use the Info Flash, a topic which I detail in the article linked at the top. This flash memory must be erased before writing because a write operation can only change high bits to low, not the other way around. And an erase operation clears an entire 64 kB segment, not just the bytes you want to write to. It’s different but manageable.

Oh, and if you were wondering, I ported the code I wrote for the garage door coded entry project.

Comments

  1. Franklyn says:

    Does anyone know a good distributor to pickup this board from ?. They seem to be sold out everywhere except the TI estore where the shipping is $15.

  2. gatesphere says:

    Actually, the TI Estore is on backorder, it’s just not showing it. I ordered two orders of two each back in late June and they still haven’t shipped.

    TI didn’t produce enough boards for the initial demand, and are now stuck on backorders for a long while. Try ebay?

  3. Beretta says:

    I think the eStore is also backordered, but checking it looks like you can get 2 day FedEx shipping there for $7.92… not the free shipping we got when the LaunchPad was introduced, but better than $15. Of course, that’s to a US address…

  4. Roberto says:

    This means that we will be running the Arduino system on MSP430s very soon :)

  5. borisk says:

    I order mine in eStore 1st july, and it is still backordered. I have been talking with nice lady at customer service and she told me, that they inspecting then iz second half of august, but I doubt.

  6. NatureTM says:

    I was thinking about porting my HDD clock from AVR/Arduino to MSP430 because I felt it could be a good way to compare the performances of the two platforms. My first step was to try to get the MSP430 running at 16MHz with the included crystal. There’s a lot of flexibility in the clocks, and I found it a bit overwhelming, especially since there isn’t much about it in the example code. This would be a big step in unlocking the chip’s potential.

  7. Beretta says:

    One of the real advantages Arduino has right now is established help; there are a number of us trying to build the MSP430 community, and we’ll eventually get to the point where we have much better documentation about all that overwhelming flexibility.

    @NatureTM: I’ve started looking a little at the clock system and have written up a couple of posts on my blog; if you have anything else you’ve learned let me know! There’s a lot more to cover on that topic yet.

  8. Still haven’t got mine, but the last couple of posts will be useful when i finally get it. (Using linux)

  9. Donov4n says:

    Dude, if it’s such a mess to switch from a controller with EEPROM to one without than DONT DO IT!

  10. Zelka says:

    Man, I have been excited about this for a while. I really want one!

    I have never had anything like (microcontroller) this but have always read HAD and always had a passion for this kind of thing.

    As soon as I get one of these I am going to RIP INTO IT!

  11. lkdfj says:

    SOoooo what’s all this buzz about MSP430?
    Last time i checked TI mcu architect was no where as good as Atmel’s avr (barely better than old 16f pic) … and not even cheaper!!!

  12. Hans says:

    @Zelka

    no need to get so pumped up. I ordered three LaunchPads two month ago. Still didn’t get anything.

    LaunchPads are pretty unattractive if you can’t make Texas Instruments to ship to you. And now, with $15 for international shipping, they are even unattractive if you can make Texas Instruments to ship to you. There is really no point in trying to get these low-end MSP430G2xxx microcontrollers.

    If you want to start with microcontrollers, buy something that is available right now, from a company not playing stupid tricks.

  13. Beretta says:

    @Hans

    No need to give up, either. Some of us have gotten our LaunchPads, and are quite pleased with the benefits TI offers in their uCs. Give them some credit; if you plan for a release of 5,000 and get an overwhelming response of 50,000 orders– well, that’s a problem no company is really prepared to deal with. TI is not playing any stupid tricks, they just weren’t expecting so much demand for this product.

  14. Hans says:

    @Beretta

    On some TI discussion site users figured TI was not processing backorders. That, and TI absolutely not talking to people and not answering questions about backorders.

    So let me repeat, if you want to start now, buy something that is available now, from a company willing to interact with you, via a retailer not charging three times the value of the goods for international shipping.

  15. kc says:

    Every time I called their support line with my order number, I reached a person telling me “1 to 2 more weeks back ordered.” They even responded to my email inquiries, a day or two afterwards. Either way, they interacted quite well with this consumer.
    I finally received my order on Monday, so it looks like they are finally getting more product in.

  16. Hans says:

    Let me guess, you live in the US, so TI talks to you?

    Some people now, after two month, receiving LaunchPads doesn’t in any way mean that you will get one now if you order now. Unless of course, you know the secret handshake and can jump the queue.

    So for a third time, if you want to start now, buy something you can get now. And $15 for international shipping is another reason to look elsewhere.

  17. Radiowave911 says:

    I ordered two of these last week from DigiKey, got them yesterday. Time to play!

  18. Anon says:

    Ah, that would explain why I still have not received mine. It’s still listed as ‘Processing’ on my order status.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,380 other followers