ADS1298 + MSP430BT5190

I have problems to start using the msp430bt5190 ads1298, I could help find my mistake. This is the code.
mcu: 3.3volt. This is the code.
ads1298: 1.5/-1.5, 1.8 volt

tengo problemas para iniciar el ads1298 utilizando el msp430bt5190, me podrian ayudar a encontrar mi error.
mcu: 3.3volt. Este es el codigo.
ads1298: 1.5/-1.5, 1.8 volt

main.c

16 Replies

  • In reply to Kevin Duke:

    The problem is that so far I could not do any shows with ads1298, not that I'm failing. I do not get any data in the buffer.

    El problema es que hasta el momento no he podido realizar ninguna muestra con el ads1298, no se en que estoy fallando. No obtengo ningun dato en el buffer.

  • In reply to Juan Gilberto:

    Is this with an ADS1298 evaluation module or your own design? Is the MSP430 on an evaluation board? If this is a pair of EVMs please share how the EVMs are connected, if it's your own hardware please share a schematic. Have you verified the functionality of your serial communication lines with an oscilloscope?

  • In reply to Kevin Duke:

    It is my own design, and now I am not in position to use an oscilloscope, you could say I'm working with nails.

    Es mi propio diseño, y actualmente no me encuentro en posicion de poder utilizar un osciloscopio, se podria decir que estoy trabajando con las uñas.

    ECG.sch
  • In reply to Juan Gilberto:

    Juan,

    Your schematic did not post, if you can post it as a PDF I think we'll have better success.

    In reviewing your C code I noticed a few things...

    #include "msp430bt5190.h"

    #define   PWDN             BIT2
    #define   RESET_ADS        BIT3
    #define   START            BIT5
    #define   CS               BIT6
    #define   CLKSEL           BIT0

    char  RESA[26];
    unsigned int i;

    void main(void)
    {
     
      WDTCTL = WDTPW+WDTHOLD;                    // Stop watchdog timer
      P4DIR = RESET_ADS + START + PWDN + CLKSEL; // P for RESET_ADS, START, PWDN, CLKSEL
      P3DIR = CS;                                // P for  CS
      P4SEL = 0X80;                              //DRDY
     
      P3SEL |= 0x31;                            // P3.5,4,0 option select spi
      P3OUT |= ~CS;                             // Disable CS
      UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**
      UCA0CTL0 |= UCMST+UCSYNC+UCCKPL+UCMSB;    // 3-pin, 8-bit SPI master
                                                // Clock polarity high, MSB
      UCA0CTL1 |= UCSSEL_2;                     // SMCLK
      UCA0BR0 = 0x02;                           // /2
      UCA0BR1 = 0;                              //
      UCA0MCTL = 0;                             // No modulation
      UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
      UCA0IE |= UCRXIE;                         // Enable USCI_A0 RX interrupt

      P4OUT &= ~START;
      //__delay_cycles(100);                    // Wait for slave to initialize
      P4OUT |= ~PWDN;
      //__delay_cycles(100);                    // Wait for slave to initialize
      P4OUT |= ~RESET_ADS;
      __delay_cycles(100);                      // Wait for slave to initialize
      P4OUT &= CLKSEL;                          // Set CLKSEL Pin = 1
      P3OUT &= CS;                              // Enable CS
     

    <...begin utilizing the device...>

    You've defined the symbol CS as BIT6 from the msp430 header, which is usually defined as 0x0040. In the code above you...

    1. Set pin 6 of port 3 as an output
    2. Set P3OUT = P3OUT | ~0x0040, which should yield P3OUT = 0x00BF - pin 6 is low
    3. Set P3OUT = P3OUT & CS, which will yield P3OUT = 0x0000 - pin 6 is still low

    On port 4 you do something similar...

    1. P4OUT = P4OUT & CLKSEL - this does not set CLKSEL = 1 unless your code is misleading - I can't tell which port/pin CLKSEL is actually connected to since your schematic did not post cleanly.

    These type of assignments make me skeptical of the entire initialization sequence. You should really try to get access to an oscilloscope or logic port or SOMETHING to see what is actually happening on the MSP430 serial lines.

  • In reply to Kevin Duke:

    Check out this code on our design notes page. This might help you get things ironed out and set-up.

  • In reply to Kevin Duke:

    Usually, I document a little more, but as I do to raise the spi clock to 2 MHz ?

    Listo, ya me documente un poco mas, pero como le hago para subir el spi clock a 2Mhz?

    main.c
  • In reply to Juan Gilberto:

    Juan Gilberto

    Usually, I document a little more, but as I do to raise the spi clock to 2 MHz ?

    Listo, ya me documente un poco mas, pero como le hago para subir el spi clock a 2Mhz?

    You'll have to pardon me, but I'm not sure what you're asking. Are you asking if a 2MHz SPI clock is allowable for the ADS1298? Are you asking if your MSP430 can implement a 2MHz SPI clock? Are you asking how to do it?

    From your scope shot it doesn't seem like you're achieving any output on the SCLK line...