zeke 693 Posted January 31, 2011 Share Posted January 31, 2011 If you are new to the MSP430 then you're probably drowning in information right now. It's true that there are a zillion configurations to make before the 430 will do what you want it do do. So I'm betting that you are asking yourself "Where do I start?" I humbly suggest the following TI application notes and books that will get you going in the right direction: 1. slaa294: MSP430 Software Coding Techniques This application report covers software techniques and topics of interest to all MSP430 programmers. The first part of the document discusses the MSP430 standard interrupt-based code flow model, recommended for the vast majority of applications. The next part discusses a handful of techniques that should be considered by any developer that sets out to develop an MSP430 application. Using these methods can greatly reduce debug time and/or provide additional robustness in the field. They include initialization procedures, validation of supply rails before performing voltage-sensitive operations, and use of special functions. Code examples are provided. 2. : MSP430 32-kHz Crystal OscillatorsSelection of the right crystal, correct load circuit, and proper board layout are importantfor a stable crystal oscillator. This application report summarizes crystal oscillatorfunction and explains the parameters to select the correct crystal for MSP430ultralow-power operation. In addition, hints and examples for correct board layout aregiven. The document also contains detailed information on the possible oscillator teststo ensure stable oscillator operation in mass production. 3. MSP430 Microcontroller Basics by John H. Davies The best thing I can say about this book at this time is that it describes well how to make use of the clocking system of the MSP430. This book should be in your personal library or at least on your wishlist. Once you digest the information above then you will be in good shape for success in working with the msp430. Have something to add? Then post up your valuable sources of knowledge. vicvelcro, oetroc, Rei Vilo and 10 others 13 Quote Link to post Share on other sites
zeke 693 Posted February 5, 2011 Author Share Posted February 5, 2011 As you progress in your development of an embedded system based upon the MSP430, you will eventually have to cut your dependency on your dev board. When you do this, you will have to give your system the ability to be programmed. Whether by JTAG or by Spy-Bi-Wire, you will have to assimilate and understand the information inside this document. Otherwise, you will have a brick coming off the assembly line. Do want to make a million bricks or a million dollars? Knowing this information will save you time, money and prevent ulcers! 4. slau320: Programming via the JTAG Interface This document describes the functions that are required to erase, program, and verify the memory module of the MSP430 Dimiric, gatesphere, GeekDoc and 1 other 4 Quote Link to post Share on other sites
zeke 693 Posted March 9, 2011 Author Share Posted March 9, 2011 So, now you got a job doing hardware design and you want to use the MSP430 in your design. But you've discovered that your boss has insisted on using this "wicked cool awesome" and ancient 5V sensor because they have a bazillion in stock. "What's the problem with that?" you ask. The problem is this: the MSP430 is a 3.6V device and it doesn't have 5V tolerant I/O's. This means that you'll probably hurt the part if you put 5V into an input. Go ahead and google it. You'll find our very own OCY schooling someone on this topic back in 2008. I'll let you find the article. OCY is shy. And he's probably gonna rip me open for giving away his secret identity. So, what's the answer? SLAA148 is the answer. It will take you through the various input and output scenarios that you may face trying to interface to higher voltage systems - not just 5V. Using this information, you should be able to measure the status of a 12V power supply with the A/D inputs or figure out how to drive a 12V relay. Have a read. It's useful info. fj604, Troll_Dragon, gatesphere and 6 others 9 Quote Link to post Share on other sites
ender 10 Posted March 22, 2011 Share Posted March 22, 2011 To me .. These two have provided the best information so far: 1. http://mspsci.blogspot.com/2010/07/tuto ... arted.html 2. http://glitovsky.com/blog/?p=85 ZotDitzMyo, bluehash, Fe2o3Fish and 6 others 9 Quote Link to post Share on other sites
bluehash 1,581 Posted March 23, 2011 Share Posted March 23, 2011 Good find on the glitovsky link. Quote Link to post Share on other sites
zeke 693 Posted May 14, 2011 Author Share Posted May 14, 2011 This is a follow up to the 5Volt tolerant I/O posting above. I decided that I should put up a picture of a sample circuit that I've used to do 5V tolerant I/O. The resistive divider on the left will scale down the 5V to a range tolerable by the MSP430. The NPN transistor will do the same in the output direction. You could drive anything with the NPN - not just a relay. This should make things clearer. GeekDoc and Robby 2 Quote Link to post Share on other sites
zeke 693 Posted May 16, 2011 Author Share Posted May 16, 2011 Note: This is a follow up on the JTAG posting above. This is very valuable information that you should remember. The MSP-FET430UIF is TI's programming tool. It is able to program an MSP430 using either JTAG or Spy-Bi-Wire. I recommend that you get one if you don't already. The MSP430 Hardware Tools - User's Guide is its user manual. You want this document because it will aid you in your circuit design choices. Pay special attention to pages 25 and 26. These circuit diagrams will show you the difference between JTAG and Spy-Bi-Wire circuits. When you design your product for your customer, you should refer to this User Manual so that you select the correct circuit and components. Then you will be able to mass manufacture your devices with confidence knowing that you will be able to program them. Also, one more note. The LaunchPad can be used as a programmer for your devices. But, you should take note of which device will be supplying power. Will it be the LaunchPad or the Target Device? Please don't say both. You will light something on fire if you do. Most likely the Target MSP430 will suffer from the excessive amount of heat you generate in it. Learn from my personal experience! bluehash 1 Quote Link to post Share on other sites
n1ksn 26 Posted September 8, 2011 Share Posted September 8, 2011 Zeke, a great set of posts! I started primarily with Davies' book. As you stated, this is a good source for information on the clock system and, I would add, the MSP430 peripherals. I've downloaded the tutorials and look forward to reading them. I just finished crawling though Tom Baugh's "MSP430 State Machine Programming." I worked through the exercises using an Olimex H2274 header board holding an MSP430F2274 on a breadboard combined with a few parts and a couple of SMT to DIP adapter boards with an RS232 interface chip and a DAC. I used a Launchpad as a Spy-Bi-Wire programmer. A picture of the setup is in the Programmers and Debuggers forum under "Launchpad as external programmer." This book is an interesting introduction to designing software based on state machine models without using an RTOS or a task scheduler of any sort. Lots of functionality can be had in 4K of flash. The book covers both bit-banged and peripheral-based UARTs, fancy button debouncing with stuck button detection, reading and writing flash from within a program, and so on. Definately a step or two beyond the examples in Davies. There is also early on an extensive discussion of machine instruction cycle times and addressing modes. I learned a lot from this book. Its strength is that Baugh shows how to incorporate lots of functionality with an event-driven approach with very low power draw (LMP3) in the idle state. So many resources contain toy programs to illustrate a point or two, while this one shows goes much further into software design using its chosen approach. There are a couple of downsides to this book. First, the reader is assumed to have a decent knowledge of C. Function pointers and structures abound. I played some catch-up here, but was glad to see these used as it increased my C abilities. Next, it is unlikely that a reader will absorb all the ins and outs on state machine programming in a first reading, even after working all the examples. You will need to try programming some of your own projects to "get it." You are exposed to many concepts like callbacks, event sinks, and so on that take time and experience to fully understand. The book would benefit from even more diagrams than it already has in this regard. The book has convinced me that the event-driven state machine approach is a good one, and I'm buying a book UML statecharts that takes this approach, but in a more formal way. Again, Zeke, many thanks for these posts. Andy zeke 1 Quote Link to post Share on other sites
zeke 693 Posted September 8, 2011 Author Share Posted September 8, 2011 You are so right about Tom Baugh's MSP430 State Machine Programming. I bought it at the same time as Davies' book. I used the state machine approach to design and to code on a recent contract. The beauty is that I could complete a paper code design and know at once that it would work. After fixing two cut and paste errors, I had my code running bug free immediately. So, I'm a big fan of state machine style programming. I even started a thread on how to design a state machine over here. I haven't finished it just yet due to work commitments but I'll get to it eventually. vicvelcro and n1ksn 2 Quote Link to post Share on other sites
n1ksn 26 Posted September 9, 2011 Share Posted September 9, 2011 Hi Zeke. Thanks for your comments on Baugh's book. I went over to your state machine thread and found it interesting, although I was disappointed to see no responses to it. At the risk of going off-topic, I did have a question on it. I assume that you will be in LPM3 while waiting for a timer ISR to signal a tick? I think you have inspired me to try a 10 minute countdown timer using the state machine approach. Such a timer (which is used in my ham radio shack to remind me to ID every ten minutes as per FCC regulations) was my very first microcontroller project, using a 14-pin PIC. However, that project used a seven segment display (one digit) to count down the minutes and I want to find a one or two digit display that is very low power to keep things in the spirit of the MSP430, but doesn't need an LCD controller module in the MSP430. Or maybe I can use a yellow warning LED with a low duty cycle blink for the last minute, and then the time-out red LED comes on, .... As usual, I blather on. Again thanks for this thread and I hope you find the time to complete your state machine post. Cheers, Andy Quote Link to post Share on other sites
zeke 693 Posted September 9, 2011 Author Share Posted September 9, 2011 I assume that you will be in LPM3 while waiting for a timer ISR to signal a tick? Yup. That's the plan. We can talk more in that thread if you'd like. Again thanks for this thread and I hope you find the time to complete your state machine post. Just need to find some time and inspiration. Thanks for the kind words. Quote Link to post Share on other sites
jazz 209 Posted September 13, 2012 Share Posted September 13, 2012 If you are new to MSP430, best/simplest/cheapest way to start is with new MSP430f55x series. There is no need for flashing tool, because uC have USB and can be flashed by TI USB BSL tool, without any glue logic. There is no need for development board, because you can build it by yourself (less than 20 parts in total). And why not to start with older series? Check for example MSP430F2232 / MSP430FF5510 from TI slab034 document. For the same price new series give much more. Development board for older series you can build by yourself too (very simple, 5 parts in total), but you also need to buy/build some flashing tool (BSL/JTAG/SBW). Quote Link to post Share on other sites
Nytblade 24 Posted September 13, 2012 Share Posted September 13, 2012 If you are new to MSP430, best/simplest/cheapest way to start is with new MSP430f55x series. There is no need for flashing tool, because uC have USB and can be flashed by TI USB BSL tool, without any glue logic. There is no need for development board, because you can build it by yourself (less than 20 parts in total). And why not to start with older series? Check for example MSP430F2232 / MSP430FF5510 from TI slab034 document. For the same price new series give much more. Development board for older series you can build by yourself too (very simple, 5 parts in total), but you also need to buy/build some flashing tool (BSL/JTAG/SBW). I have started using the F5438 experimenter board and it is great! Plenty of RAM and a massive amount of Flash. It would be nice if TI could make a new official (inexpensive) MSP430 launchpad with the F5438A. The only problem I had is that the code between the Value Line and 5-series is not really compatible... interrupts have a different syntax and all the peripheral registers names have changed. Also I would prefer a DIP chip, which isn't available for these. Quote Link to post Share on other sites
artifus 16 Posted September 20, 2012 Share Posted September 20, 2012 hello fellow noobs. if your eyes are bleeding from reading but your brain is still hungry for more and you have an hour or so to kill i recently found this short series of brief youtube tutorials very easy to watch and quite helpful in getting my head around a few c programming basics, which has been useful when studying code examples. cubeberg, bluehash, oPossum and 1 other 4 Quote Link to post Share on other sites
jazz 209 Posted September 28, 2012 Share Posted September 28, 2012 For entering in USB BSL programming mode, there is no need to disconnect/connect USB cable from/to PC with BSL button pressed every time. USB cable can stay connected, and another entry to USB BSL mode can be done using RESET button. Just press BSL and RESET button together, first release RESET button, and after (1 second is enough) release BSL button. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.