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.

msp430fe427, PC uart comminucation

Other Parts Discussed in Thread: MSP430FE427

Hi 

i am using msp430fe427. i tried to comm with PC by uart. i can not find suitable code or doc about msp430fe427 uart. 

 

thanks for help...

  • If you click on the link that was automatically created where you named your processor, the msp430fe427, you'll find links to the device datasheet (telling you which kind of uart chip this MSP has) and further down the page (click on 'technical documents') a link to the family users guide, describing all modules a device of this family can possibly have, along with detailed description and register listing.
    Also, all example code written for a particular module in this users guide will work on every processor of this family which has this module. Only some minor adjustments such as the external pin assignments (see device datasheet(s)) are necessary.

    In some cases, using one module (e.g. USART) requires usage of another module (e.g. clock module) which might differ between the original example target and your processor. It's a rare case within the same family (except for certain features inside a module such as support of only one crystal instead of two for the smaller family members) but may be more common if you cross families where some of the modules (e.g. the USART) are identical but others not.

    There are 270 different MSPs out there. You simply cannot write dedicated examples for every module in each of them. Be an engineer, get the basics and do it yourself.

  • Hi,

    you can find some sample code (i.e. UART echo examples) by scrolling down the products page (http://focus.ti.com/docs/prod/folders/print/msp430fe427.html).
    Here is the direct link to the examples: http://www.ti.com/litv/zip/slac017h

    Kind regards
    aBUGSworstnightmare

  • thanks.

    i tried a lot of Uart code. But i understand my problem is clock. My crystal is not working correctly.

    i used DCO clock to uart module. but i dont know default dco clock what is. or how can i configure it.

    in msp430fe427 datasheet:

    f(DCO=2) FN_8=FN_4=FN_3=FN_2=0 ; DCOPLUS = 1      3 V       0.3      0.7       1.3 MHz

    according this information. i configured uart nodule:

    calculate baut rate register's  values:

    http://www.daycounter.com/Calculators/MSP430-Uart-Calculator.phtml

    UXBR0 = 0x48

    UXBR1 = 0X00

    UXMCTL = 0XBF

    Set DCOPLUS:

    FLL_CTL0 |= DCOPLUS; 

     

    Uart modue is working now. but not correctly.

    when i typed "v" it returns "r". so baud configuration is wrong.

    my code is:

    void main(void)

    {

      WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

      FLL_CTL0 |= DCOPLUS;                     // Configure load caps

      P2SEL |= 0x30;                            // P2.4,5 = USART0 TXD/RXD

      ME1 |= UTXE0 + URXE0;                     // Enable USART0 TXD/RXD

      UCTL0 |= CHAR;                            // 8-bit character

      UBR00 = 0x48;                             

      UBR10 = 0x00;                             

      UMCTL0 = 0xbf;                            // modulation

      UCTL0 &= ~SWRST;                          // Initialize USART state machine

      IE1 |= URXIE0;                            // Enable USART0 RX interrupt

      P2DIR |= 0x10;                            // P2.4 output direction

     

      _BIS_SR(LPM1_bits + GIE);                 // Enter LPM0 w/ interrupt

    }

     

    #pragma vector=USART0RX_VECTOR

    __interrupt void usart0_rx (void)

    {

      while (!(IFG1 & UTXIFG0));                // USART0 TX buffer ready?

      TXBUF0 = RXBUF0;                          // RXBUF0 to TXBUF0

    }

     

     

  • hi

    i solved problem.

    i changed crystal and everything work normally. Uart comm. is corrected.

     

    Thanks. yours help friends.

     

     

**Attention** This is a public forum