Thread: Microcontroller Programming

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    2

    Microcontroller Programming

    Hi,
    I'm trying to program the MSP430 Launchpad, except I don't really know which language is better suited for microcontroller programming: C or C++. I know nothing of either language, so I'd like to pick the best one to learn before starting.
    Also, what is the difference between microcontroller programming and programming on the PC? How do you indicate the different pins and stuff?

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    If the manufacturer has an SDK (Software development kit) for the chip, you should grab it. This will likely include programs that burn code to the chip and simulate the chip on the PC... You will find these very helpful.

    Most often the SDKs are C... C++ is overkill for the average small on memory chip capacity... but that's not universally true.

    How the various pins are identified in your software is entiry up to the SDK...

    EDIT... It appears to be a variant of C ... http://focus.ti.com/docs/toolsw/fold...S=Other+OT+ccs

    You also asked about the difference between uC programming and PC programming... it's worlds apart. In a PC you do not generally have access to pins and hardware directly, it's all through driver functions. Plus a PC has a whack more capability and the software complexity to go with it...
    Last edited by CommonTater; 08-17-2011 at 03:28 PM.

  3. #3
    Registered User
    Join Date
    Aug 2011
    Posts
    2
    So you need a custom tutorial or something?

  4. #4
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Quote Originally Posted by PFactorial View Post
    Hi,
    I'm trying to program the MSP430 Launchpad, except I don't really know which language is better suited for microcontroller programming: C or C++. I know nothing of either language, so I'd like to pick the best one to learn before starting.
    Also, what is the difference between microcontroller programming and programming on the PC? How do you indicate the different pins and stuff?
    Before you jump into uController design, you should probably get somewhat comfortable with C first. Otherwise, chances are you will wind up just frustrating yourself.

    Quote Originally Posted by PFactorial View Post
    So you need a custom tutorial or something?
    Hmm....I wonder what that red thing in Tater's post is?
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  5. #5
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by PFactorial View Post
    So you need a custom tutorial or something?
    I would grab a C textbook... spend the time, go through it page by page, compile the exercises, mess with them, change them... then when you understand what's going on move to page 2... by the time you finish the book you should have a pretty good grasp of what C is about.

    The SDK, of course, comes with documentation, but it assumes some prior knowledge of C...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming a PIC 16F84 microcontroller in C
    By Iahim in forum C Programming
    Replies: 1
    Last Post: 05-13-2004, 02:23 PM
  2. Microcontroller Programming With C
    By Garfield in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 11-18-2001, 02:06 PM
  3. Microcontroller Programming With C
    By Garfield in forum C Programming
    Replies: 20
    Last Post: 11-17-2001, 05:04 PM
  4. microcontroller programming???
    By Garfield in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 10-20-2001, 04:48 PM
  5. microcontroller programming
    By wazilian in forum C Programming
    Replies: 3
    Last Post: 10-12-2001, 02:22 PM