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.

msp430G2553 28pin package programming

Other Parts Discussed in Thread: MSP430G2553, ENERGIA

I am working with msp430G2553 28pin package and using CCSv5.2 for programming.

I have found that both 20 pin and 28 pin packages aren't  pin compatible so,  i think i need to remap the pins ,  anyone can help ??

  • Hi Nirav!

    Nirav Patel55 said:
    i think i need to remap the pins

    The MSP430G2553 has no port mapping ability if you were thinking of changing the function of the pins. The additional pins only have GPIO or timer related functionality, so more for controlling additional external hardware, generating PWM or capture input signals without loosing the special functions of the other pins when using the smaller package.

    Dennis

  •  but i am worried about the pin already defined like in 20 pin package p1.6 is numbered 14th and in 28 pin package its 22nd
    how can i change that? 

    and pin no 8 in 20 pin package is oo port 2.0 while the same pin is on 28 pin package is on Port 3.1

  • Which pins of 20pin package do you find not matching 28pin package? I am struggling to find even single one.
  • >but i am worried about the pin already defiend like in 20 pin package p1.6 is nummbered 14th and in 28 pin package its 22nd
    Why do you want pin NUMBERS to match? Look at physical layout - both pins you mention, actually are same PHYSICAL pin having same location, just numbers differ
  • Hi Nirav!

    Nirav Patel55 said:
    but i am worried about the pin already defined like in 20 pin package p1.6 is numbered 14th and in 28 pin package its 22nd
    how can i change that?

    This sounds like Energia?

  • can you tell me how to define the port 3 fuctions in header file ?
  • Is it Energia? If yes, I'm sorry, but I'm out - I do not use it and never did before. I only saw that it seems to work with the pin numbers of the device. Was wondering when I saw this because of exactly this problem you are facing now. But I have no idea how to add a new device to it. But I'm sure there is somebody else.

    Dennis

  • no in CCS

    can anyone tell me how the compiler differentiate between the 20 pin package and 28pin package 

    bcz, in both cases we are using same header file #include <msp430.h>

  • OK, in this case there is nothing to do for you! The header file for the MSP430G2553 already includes everything needed for port 3:

    Just use it as you would do for port 2.

    Dennis

  • can anyone tell me how the compiler differentiate between the 20 pin package and 28pin package

    bcz, in both cases we are using same header file #include <msp430.h>
  • Nirav Patel55 said:
    can anyone tell me how the compiler differentiate between the 20 pin package and 28pin package

    It doesn't. This is why the functions are identical for both package types. For example SMCLK is at P1.4 on the 20 pin and the 28 pin package, same for all the other functions. So writing P1SEL |= 0x10 will have the same effect on both types.

    When using the 20 pin version, you can also write to the P3 registers, but you will not see it beacuse there is no physical connection to the outside of the processor.

    Nirav Patel55 said:
    in both cases we are using same header file #include <msp430.h>

    Yes, the header file is the same. When using the msp430.h, you do not even specify a header file. Acoording to your settings, the compiler will select the msp430g2553.h - you could also use it directly by yourself.

    Dennis

  • >can anyone tell me how the compiler differentiate between the 20 pin package and 28pin package
    I would say: it does not have to. Pins of 20pin package are present on 28pin package, just their numbers differ. Most are even in the same place. You shall care about pin numbers only when you design PCB, not during compile time
  • thnks for the insight..
    :)
  • Nirav Patel55 said:
    but i am worried about the pin already defined like in 20 pin package p1.6 is numbered 14th and in 28 pin package its 22nd
    how can i change that? 

    You can change it this way: 22nd 14th

    Just kidding, do not try to change it.

    If your program makes P1.6 go up and down and you run that code on a 28-pin chip, 22nd pin will go up and down. If you run that same code on  a 20-pin chip, 14th pin will go up and down instead. There is no conflict.

    Nirav Patel55 said:
    and pin no 8 in 20 pin package is oo port 2.0 while the same pin is on 28 pin package is on Port 3.1

    If your program makes P2.0 go up and down and you run that code on a 28-pin chip, 10th pin will go up and down. If you run that same code on  a 20-pin chip, 8th pin will go up and down instead.

    If your program makes P3.1 go up and down and you run that code on a 28-pin chip, 8th pin will go up and down. If you run that same code on  a 20-pin chip, nothing will go up and down.

**Attention** This is a public forum