This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need some good tutorials Code with comments for first time using MSP430F5438

Other Parts Discussed in Thread: MSP430F5438A, MSP430F5438

Hi Team,

 

I am very new to Microcontroller and I have decided to use MSP430F5438A for my project.

Can some one guide me and provide me sample code and tutorials which I can study for basic flow of msp430f5438 modules.

and how to use and program different modules like UCS or Ports?

I am going to use C and IAR for my project.

Also I need to know basec start up flow from Init for msp430 code in c.

 

Can some one please help me to use msp430?

 

Thanks in Advance.

Hardik Patel

 

  • Hey Hardik,

    In addition to the forum, here are some other resources for MSP430:

     

    Main Page:

    http://ti.com/msp430

     

    Application Notes & User Guides:

    http://bit.ly/MSP430_User_Guides

     

    MSP430 Getting Started Guide:

    http://bit.ly/MSP430_Getting_Started_Guide

     

    MSP430 Wikipedia Page:

    http://en.wikipedia.org/wiki/TI_MSP430

     

    MSP430 Code Samples

    http://bit.ly/MSP430_Code

     

    MSP430 Integrated Development Environment (IDE) - Code Composer Studio - Free (requires you to register for TI.com due to export control regulations)

    http://bit.ly/Code_Composer_Studio_Free

     

    MSP430 Development Tools:

    http://bit.ly/MSP430_USB_Stick_Development_Tool

     

    TI Microcontrollers Facebook Page

    http://www.facebook.com/pages/TI-Microcontrollers/146834707997

  • Hi WILS ESE,

    Thanks  for quick reply.

    Actually I have downloaded sample which you have mentioned.

    But I want to know how should we start up with, I mean the first module code which we write when we use MC for any project.

    What r different steps we need to follow for writing and compiling 1st MSP430F5438A program using IAR?

    And Can u please suggest me basic/generic code flow for any MicroController programming.

    Like 1st Init A module (with steps) and B and then C and then Final Modele like cleanup module.

     

    I am very much new to this domain,  so may be asking silly question but it will help me.

    Can you please guide me.

     

    Thank you in advance.

    Hardik Patel

     


     

  • Hey Hardik,

    Do you know how to code in assembly or C?

    It will take alot of time to explain to you all what you need, but the most important things are the MSP430xxxx  users manual ( look for MSP430F5438A user manual) that contain the hardware specifications of each peripheral and how to configure them.

    Starting a project is very easy, try to search the how to on the net,

    You might also want to look at the MSP430 IAR C/C++ compiler guide : http://www.control.aau.dk/~bisgaard/teaching/d3/dap/dap-litterature/EW430_CompilerRef.pdf

     

    William

  • Hi William,

     

    Thanks for the information, Yes I do know C programming actually I have developed various softwares for Video Surveillance and Streaming application

    But Microcontroller is newer to me.

     

    According to your suggestions I will go through user manual and family guide.

    I will get back to you in case I found any issue or need help !

     

    Thanks ,

    Hardik Patel

  • Hardik Patel said:
    But I want to know how should we start up with

    My own workflow with the 5438 processor was as follows:

    first initialize the I/O ports (so you can let an LED blink).

    Then make the clock system work (init to desired frequency, bring the quartz crystal to life, if any etc.). You can use the LED for signalling the current state. Using a debugger at this stage is mostly fruitless as it interferes with the whole process.
    Init ACLK and SMCLK (and of course MCLK) to the desired values. In my case, it is 16MHz MCLK/SMCLK and 1MHz ACLK. But depending on the project requirements, the selection can be different.

    Next was to make a timer running, so i have a time-base. I use a timer interrupt every 1 ms. It is easy with 1MHz ACLK. one interrupt every 1000 timer ticks.

    Based on this, the minimum infrastructure is done.

    Next was the UART.  From this point on the codebase was sufficient for any further development. The UART can be used for debug output as well as for data exchange. Of course if the final device doesn't have an RS232 and the port pins are required for something else, this can be skipped. But having a way for text (debug) output is a nice thing and eliminates the need for most (if not all) debugging sessions.

    It's a good thing to build up some basic function library that is modular and configurable enough to be reused in future projects but doe snot have too much superfluous code (as found in all-in-one libraries). Personally, I include the library code as source code into the project and compile it with project specific settings. This way only what I need is compiled and linked, and it is optimized for the current requirements.

    BTW: there is no 'cleanup' on microcontrollers (at least normally) since these devices never 'exit' like normal programs. They start and then run.

  • Hi Jens-Michael Gross,

     

    Now I have some good picture in my mind how it will works.

    I will try out this according to basic requirement and let you know my findings.

     

    Thanks a lot for such a good help !

     

    Regards,

    Hardik Patel


**Attention** This is a public forum