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.

CCStudio using MSP430

Other Parts Discussed in Thread: CCSTUDIO, MSP430F2274

 

Hi all,

I have been using MSP430 eZ430-RF2500 microcontroller, and Code Composer Studio as the programming interface.

I need to measure a reference voltage and temoerature and send it to some port. This stuff is possible via IAR Embedded

Workbench IDE as I can follow the instructions already posted in this forum. I am also new here.. so not have much idea 

about the ppl. I can communicate with the microcontroller by using CCStudio but not sure how can I procede.. If someone 

has any relevant  reference coding for preparing a packet and send it to the channel so that I can use hyperterminal (my

machine is XP) to see if the system works.. this stuff is possible via IAR EW IDE, I mean we can download+run the program 

and have a look both via hyperterminal and eZ430-RF2500 sensor monitor. Any help regarding this would be helpful....

 

Joydeep 

Germany

 

 

 

 

 

 

 

 

 

  • Hi Joydeep,

    the CCS (as well as the IAR sources) for the Sensor Monitor demo are here http://www.ti.com/lit/zip/slaa378 , the app report is here http://www.ti.com/lit/pdf/slaa378.

    CCS also has a build in terminal window (IAR too); click on VIEW-->OTHER for opening it.

    Terminal looks like:

    The interface configuration is done by using the buttons in the Terminal window.

    Rgds
    aBUGSworstnightmare 

     

  •  

    Thanks a ton for your reply! This code works fine for IAR EW IDE but I'm not sure about the CCS..  How can I implement in CCS these methods like,

     

    /* Get temperature */

    ADC10CTL1 = INCH_10 + ADC10DIV_4;       // Temp Sensor ADC10CLK/5

          ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + ADC10SR;

          /* Allow ref voltage to settle for at least 30us (30us * 8MHz = 240 cycles)

           * See SLAS504D for settling time spec

           */

          __delay_cycles(240);

          ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start

          __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled

          results[0] = ADC10MEM;                  // Retrieve result

          ADC10CTL0 &= ~ENC;

    /* Get voltage */
          ADC10CTL1 = INCH_11;                     // AVcc/2
          ADC10CTL0 = SREF_1 + ADC10SHT_2 + REFON + ADC10ON + ADC10IE + REF2_5V;
          __delay_cycles(240);
          ADC10CTL0 |= ENC + ADC10SC;             // Sampling and conversion start
          __bis_SR_register(CPUOFF + GIE);        // LPM0 with interrupts enabled
          results[1] = ADC10MEM;                  // Retrieve result
          /* Stop and turn off ADC */
          ADC10CTL0 &= ~ENC;
          ADC10CTL0 &= ~(REFON + ADC10ON);
    temp = results[0];
          degC = ((temp - 673) * 4230) / 1024;
          if( (*tempOffset) != 0xFFFF )
          {
            degC += (*tempOffset);
          }
          temp = results[1];
          volt = (temp*25)/512;
          /* Package up the data */
          msg[0] = degC&0xFF;
          msg[1] = (degC>>8)&0xFF;
          msg[2] = volt;
    Regards,
    Joydeep

  • Hi Joydeep,

    I don't see anything that will prevent this code from beeing used in CCS. The only thing you need to do is importing the CCS project, do the changes there (as you did in your IAR version (if any!)) and you're done.

    Except from a different IDE things were pretty much the same.

    Rgds
    aBUGSworstnightmare 

  • Hi,

     

    Thanks... I make a workspace and do new-->CCS project. Then give a project name and choose 'MSP430' as project type. I proceed this way 

    to find output type as 'Executable' and halt over Device variant.. not sure which one to choose for my device (eZ430-RF2500T, SN: 23.84584).

    I am not sure about the linker command file...  I think I made a mistake last time with this choice...

    Otherwise, I can directly import the project by Project--> Import existing CCS/CCE eclipse project, choose root directory as your file Embedded->CCS

    and when I finish this, an error occurs.

     

     

    How can I proceed?

     

    Regards,

    Joy

     

  • Hi Joydeep,

    1.) the device on your eZ430-RF2500 (or eZ430-RF2500T) is a MSP430F2274

    2.) download and unzip the Sensor monitor demo (slaa378c.zip; find it here http://focus.ti.com/docs/toolsw/folders/print/ez430-rf2500.html)

    3) open CCS and click on PROJECT-->IMPORT EXISTING..

    4.) Click on BROWSE and select the root directory of the project to import (see below)

    5.) select CCS and click OK. Your window should look like below now:

    6.) check 'copy project into workspace (un-checked in my screenshot) and click on FINISH

    7.) now, your project is ready for working with

    8.) click on PROJECT->PROPERTIES->BUILD to select the configuration (AP or ED)

    10.) do not alter the device variant and/or linker command file!

    Rgds
    aBUGSworstnightmare 

  • Hi,

    Thanks a lot for ur reply... but I feel difficulty to find slaa378c.zip. You gave me the link  http://www.ti.com/lit/zip/slaa378 from where I 

    downloaded the code but when I follow ur procedure, eZ430-RF2500_WSM [Active-] is being shown without any Access Point or 

    End Device. Furthermore, the unzipped file does not have 'Include' along with 'Applications', 'Components', 'Configuration' folders.

     

    Regards,

    Joydeep

     

  • Hi Joydeep,

    be shure to CHECK COPY PROJECTS INTO WORKSPACE before you click on the FINISH button! By doing so, every piece of soure/include or whatever code will be copied into your workspace folder. If you leave it unchecked you will need to keep the un-zipped slaa378x-folder in it's current location!

    As already pointed out above, the selection of the Access Point or End Device code to be build is made under PROJECT PROPERTIES by selection the build configuration from the drop-down menue (as shown above).

    Rgds
    aBUGSworstnightmare

     

  • Hi

     

    Thanks so much for your information! I seemed to be using 4.0.2.01003 version and hence there was some problem concerning the

    workspace. Now I have modified it to 4.1.3.00038. Things have changed.. the workspace is being built fine but the code seems buggy..

    Is it only due to path '#include xxxx.h '    problem or something else? I followed asyou mentioned.. afterwards, I tried to build the workspace..

    My next step would be to 'debug' and then 'run'. I attach the printscreen..

     

    rgds,

    Joy

     

     

     

  • Hi Joy,

    be shure to TICK the COPY PROJECTS INTO WORKSPACE box!

    I would recommend to delete the project from the workspace and restart as described above. Looks like the included were not copied from the unzipped folder (and maybe you've deleted them after clicking on finish).

    Rgds
    aBUGSworstnightmare

  • Hey,

    Everything is working fine... the code runs without any bug and it gets downloaded into the hardware.. Thanks so much for 

    your help.. One thing.. can I check the data in Communications-->hyper-terminal? My machine is xp..

     

    Regards,

    Joydeep

     

  • Hi Joydeep,

    yes, you can! But, who wants to use a seperate terminal software if you can use the terminal window of the IDE (see my post above on how to open the terminal window).

    Rgds
    aBUGSworstnightmare

    P.S. I hate Hyperterminal! Bacause of that I can't anser any questions on how to set it up!

  • Hi,

     

    Yes, I get the terminal window, but I do not have port 'COM6'  as shown in your example.. I only have 'COM3', 'COM4'.

    I use 'Bit rate' as 9600, 'Data bits' 8, 'Stop bits' as 1, others set default.. can I get datastream here also?

     

    Rgds,

    J

  • Hi Joydeep,

    .... well ... how should I say it ... You need to use the COM port which YOUR machine assignes to the tool. On my PC is is assigned to COM6.

    So, look into system control to figure out were it is assigned to and connect the terminal (or hyperterminal) to this COM port. Look at this for more details: http://processors.wiki.ti.com/index.php/EZ430_Backchannel_UART_Configuration

    Rgds
    aBUGSworstnightmare

  • aBUGSworstnightmare said:
    I hate Hyperterminal!

    If you only used the version that came with XP, I can only agree. It's the same outdated buggy stuff that was already included in Win95.
    Long before XP was released, the creators of HyperTerminal have released a newer, heavily bugfixed version that is finally usable (V6.3, 2001). It was available for free (for personal use) when I downloaded it years ago. Now they have released V7 and it costs again (free 30 days trial available). Good thing I still have the 6.3 installer somewhere. :)

    Do a google search for HTPE63.exe. The license explicitely allows distributing this file as long as it remains unchanged. They may not have it online on their site anymore, but they cannot invalidate this kind of license :)

  • Jens-Michael Gross said:

    I hate Hyperterminal!

    If you only used the version that came with XP, I can only agree. It's the same outdated buggy stuff that was already included in Win95.
    Long before XP was released, the creators of HyperTerminal have released a newer, heavily bugfixed version that is finally usable (V6.3, 2001). It was available for free (for personal use) when I downloaded it years ago. Now they have released V7 and it costs again (free 30 days trial available). Good thing I still have the 6.3 installer somewhere. :)

    Do a google search for HTPE63.exe. The license explicitely allows distributing this file as long as it remains unchanged. They may not have it online on their site anymore, but they cannot invalidate this kind of license :)

    [/quote]

    I'm a big fan of hterm, a free high-quality German-made terminal program with many flexible features such as display data in hex, dec, binary, ascii or enable block data input [instead of typing in 1 ascii/byte at a time], etc. 

    I'd highly recommend you to check this software out.

    Alternatively, if you use CCS, you can use the built-in terminal window. It's not feature-rich but really convenient if you're developing code inside CCS already.

     

    ~Dung

  • Hi Dung,

    the scrrenshots (and your feature lists) looks very promising! Well, seems like I'll give it a try in the near future.

    CCS terminal window is easy to use when you just use it for 'on-the-fly debug' output. No need to switch to a different window with the terminal prog.

    Rgds
    aBUGSworstnightmare

  • Hi,

     

    Thanks again for all those informations! I'm really new in this field.. Code is working fine.. I know the port as well (for me, COM5)..

    If I want to check the temperature and voltage etc. parameters in CCS, what should I write as a function? the same 

    thing appears in IAR, I think beacuse of the presence of the code,

     

    void transmitDataString(char addr[4],char rssi[3], char msg[MESSAGE_LENGTH] ){

    ......

    if( verboseMode )

      {

        char output_verbose[] = {"\r\nNode:XXXX,Temp:-XX.XC,Battery:X.XV,Strength:XXX%,RE:no "};

     

        output_verbose[46] = rssi[2];

        output_verbose[47] = rssi[1];

        output_verbose[48] = rssi[0];

     

        output_verbose[17] = temp_string[0];

        output_verbose[18] = temp_string[1];

      ....

      output_verbose[10] = addr[3];

        TXString(output_verbose, sizeof output_verbose );

    }

    else

      {

        char output_short[] = {"\r\n$ADDR,-XX.XC,V.C,RSI,N#"};

     

        output_short[19] = rssi[2];

        output_short[20] = rssi[1];

      .....

      output_short[6] = addr[3];

        TXString(output_short, sizeof output_short );

      }

    }

    So, IAR worsspace shows the data in terminal.. how can I make it happen in CCS? 

     

    Rgds,

    Joydeep

  • Hi all,

    Does any1 have any idea on how to view the statement in Terminals? This is 

    in reference to the last query!

     

    Rgds,

    Joydeep

     

**Attention** This is a public forum