|
|||
This may seem like an odd question, but its one that needs answering :-
A while ago I bought an MSP430 Launchpad, because they are $4.30. Where do I find information about the commands / ***sequences of commands*** that are used to program it. There doesn't seem to be a 'manual' for it anywhere. And the issue isn't limited to this board/chip - what do I need to look for? Now, please dont misunderstand - I know how to program, set up the boards, read schematics, read the .h files, etc. but there MUST be a better way to learn how to program these things than deconstructing online tutorials made by random enthusiasts (beside which, how did THEY learn it in the first place). Here is some example code void ConfigureAdc(void) { /* Configure ADC Channel */ ADC10CTL1 = INCH_4 + ADC10DIV_0 + CONSEQ_3 + SHS_0; ADC10CTL0 = SREF_0 + ADC10SHT_2 + MSC + ADC10ON + ADC10IE; ADC10AE0 = BIT4 + BIT3 + BIT2 + BIT1 + BIT0; ADC10DTC1 = ADC_CHANNELS; } Now, do you see what I mean? I can look up all these things individually in the header file, but where is the 'manual' that tells me that things have to be done *this way* or in *this order*. How did the guy who originally wrote this code come up with it, trial and error |
|||
| ^ | Joined: 19 Jul 2010 Member: #235948 | ||
|
|||
skitchy wrote: WHAT AM I MISSING?
Patience and doing your homework? took me 15 seconds to find this via Google: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Lea rning_Community And there, for example, you'll find the instruction set, address modes and all the registers etc detailed in the Users Guide. http://www.ti.com/lit/ug/slau144i/slau144i.pdf |
|||
| ^ | Joined: 03 Sep 2001 Member: #1041 | ||
|
|||
Thanks, but I've seen that site. Again, we have incredibly low level documents full of voltage graphs and register names, and we jump to 'use this code chunk to perform this action' examples. If you read my post, you will see that I have been patiently doing my homework looking for what lies in between these two. |
|||
| ^ | Joined: 19 Jul 2010 Member: #235948 | ||
|
|||
| ^ | Joined: 30 Dec 2004 Member: #53160 Location: London uk | ||
|
|||
Perhaps I haven't been clear.
What I am looking for (at the very least) is a sort of 'command reference' document. It might look something like this : Quote: Function/Var Name WDTCTL Description Watchdog Timer Control Values/Variables WDTPW............Description of the effect WDTPW has WDTHOLD..........Description of the effect WDTHOLD has ...and so on for all vars/functions Do such things exist, or am I supposed to look elsewhere for this information? Last edited by skitchy on Wed Apr 11, 2012 6:40 am; edited 1 time in total |
|||
| ^ | Joined: 19 Jul 2010 Member: #235948 | ||
|
|||
skitchy wrote: Perhaps I haven't been clear.
[/quote]
What I am looking for (at the very least) is a sort of 'command reference' document. It might look something like this : Quote: Function/Var Name | Description | Values/Variables | Description WDTCTL Watchdog Timer Control WDTPW Does thing A WDTHOLD Does thing B ...and so on for all vars/functions Do such things exist, or am I supposed to look elsewhere for this information? Users guide : http://e2e.ti.com/group/msp430launchpad/w/contents/1130.aspx but to be honest, the fact that youve bought a bare bones product kind of implies that you already know something about RISC programming. It builds on the many available PIC chips and general RISC stuff thats been out for ages. They use the same instructions more or less. This isnt a beginners kit. |
|||
| ^ | Joined: 30 Dec 2004 Member: #53160 Location: London uk | ||
|
|||
Aren't the ADC registers and so forth specified in the datasheet? Maybe start there... |
|||
| ^ | Joined: 18 Dec 2006 Member: #132797 | ||
|
|||
At the risk of necro-ing this thread for no great reason, I do really think that the OP just needs to dig in and start reading the individual datasheets for the chips involved. The Launchpad can hold different chips and you really have to read the specific datasheet for the chip currently on the board, as well as the summary documents for the family line.
I too have come from a more general programming background and learning to critically read datasheets is a new skill. You have to remember, while C and whatever flavor of Assembly you are using are portable languages (to differing degrees) the control register definitions are chip specific. Hope this helps somebody. |
|||
| ^ | Joined: 01 Jun 2013 Member: #306235 | ||
|
|||
FYI: There has never been the kind of manual that you're looking for. The datasheet usually supplies the instruction set and register description and its assumed that you know what the various hardware devices are used for.
Caxton Foster had some very good books about basics way way way back in the day, but they're not about modern processors and the path is long from where they are to where you want to be. Really, the best way to cut your teeth these days is with the Arduino stuff. If you're set on what you're doing though, the posters are right, you just need to start reading. What exactly do you want to do with the kit? |
|||
| ^ | Joined: 13 Oct 2009 Member: #217404 | ||
|
|||
Besides the datasheets, I would recommend MSP430 Microcontroller Basics by John H. Davies if you have a Launchpad.
This classroom-style text assumes you are using a different evaluation board but I was able to translate the differences with little trouble, even as a n00b. I think microcontrollers are like programming languages, a deep dive into the mastery of one will give you a huge leg up on any new ones you need to learn in the future. Later |
|||
| ^ | Joined: 01 Jun 2013 Member: #306235 | ||
|
|||
Ooh, an old thread of mine was resurrected.
And one where the first reply was immediately condescending (for a change) - awesome In reply to the people who are actually taking part in the discussion - thanks I did start with the Arduino which has a 'command reference', many tutorials, example code, libraries, and a great community. I bought the MSP430 because a) it was too cheap not to b) I wanted to learn something new for the sake of it. It was at that point I hit kind of a brick wall in terms of finding the information I described in my first post. It is frustrating when you don't know where to start, and even more so when you ask for advice and people talk down to you. The MSP430 has since been sitting in a box, waiting. I just carried on making stuff with Arduino and the Raspberry Pi. Weirdly enough though, a few days ago I chanced upon this new development for the MSP430 which looks promising : http://energia.nu/ I still want to learn the low level programming stuff though because that was the original point - I might have a look at that book you mentioned jbump. |
|||
| ^ | Joined: 19 Jul 2010 Member: #235948 |
| KVR Forum Index » DIY: Build it and they will come | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group
















