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.

Programming MSP430 with another MSP430 using UART

Other Parts Discussed in Thread: MSP430G2553

Hello everyone,

I'm working on MSP430g2553 s. 

I have succeeded to communicate MSP430 as either reciever or transmitter with PC using UART module. But, I couldn't figure out how the MSP430 communicates with another MSP430 using UART module. 

Thanks for any help and suggestions.

Best regards,

Anil

  • Just connect the Rx to the other msp430's Tx, and viceversa.

    By the way, are you working with mspgcc? I can't make my code work, could you post yours?

  • Oh, understood. But, i have one more question that i missed to ask.

    Actually, I want to program a MSP's pins with the aid of another MSP. So, first MSP will be programmer, second one will be programmed.Besides, just connecting the Rx to the other msp430's Tx will be sufficient for the connections. (for this situation)

    I hope I make myself clear.

    P.S: I'm working with CCS v4 for debugging. 

    I sent a code below that is transmitting a character to PC. 

    #include<msp430g2553.h>


    void UARTInit(void);
    void TXData(unsigned char c);

    void main(void){
    WDTCTL = WDTPW + WDTHOLD;
    BCSCTL1 = CALBC1_8MHZ;
    DCOCTL = CALDCO_8MHZ;

    UARTInit();

    P1DIR = 0x41;
    P1OUT = 0x00;

    __bis_SR_register(GIE);

    while(1){
    if(!(P1IN&BIT3)){
    P1OUT = 0x01;
    TXData('@');
    __delay_cycles(16000000);
    }
    else
    P1OUT = 0x40;
    }
    }
    void UARTInit(void){
    P1SEL |= (BIT1 + BIT2);
    P1SEL2 |= (BIT1 + BIT2);
    UCA0CTL1 = UCSSEL_2;
    UCA0BR0 = 52;
    UCA0BR1 = 0;
    UCA0MCTL = 0x11;

    UCA0CTL1 &= ~UCSWRST;

    IE2 |= UCA0RXIE;
    }

    void TXData(unsigned char c){
    while(!(IFG2&UCA0TXIFG));
    UCA0TXBUF = c;
    }

    I hope it works.

  • Woah! That's like msp430ception

    I'm not sure if this will work.  If you look at the pins connecting the emulator on the launchpad to the chip itself (all of the pins connected by the black jumpers) you will see that you also need the reset, test, and Vcc pins in addition to the TX and RX pins.

     I'm also pretty sure that this will be impossible with just the msp430 due to the fact that you will be lacking much of the hardware on the emulation side of the board.

    Just out of curiosity why do you want to do this? if you're looking for a way to program the chip while it's off of the development board, you can actually use the emulator on the launchpad.  Just remove all of the jumpers and run wires from those pins on the emulator to its respective port pins on the chip

  • Hi,

    Anıl Kırkıl said:

    Actually, I want to program a MSP's pins with the aid of another MSP. So, first MSP will be programmer, second one will be programmed.Besides, just connecting the Rx to the other msp430's Tx will be sufficient for the connections. (for this situation)

    well, actually there is a similar application note for that:

    http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=slaa535a&docCategoryId=1&familyId=342

**Attention** This is a public forum