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.

ADS1231: Do we have example C code for ADS1231?

Part Number: ADS1231

The link:

ftp://ftp.ti.com/pub/data_acquisition/ADS1x31REF/Firmware/Firmware_Source_Code/ads1x31ref_fwsrc_1.0.0.zip

No longer exists.

Could you forward me the ads1x31ref_fwsrc_1.0.0.zip file so I can modify the Eval code to aid in my development.

Need to add some inline filters, but I want to still keep the eval GUI you provided.

Or, re-open the link.

Thank you,

Richard

  • Richard,


    We've recently gone through some changes on how we release software. However this file should still be available.

    Go to the landing page for the ADS1231REF, which you can find here:

    www.ti.com/.../ads1231ref

    and there should be a download button for the software under ADS1X3XREF-SW. After you get it, let me know if you were able to download the file. If you can't access it, post back and I'll see what I can do.


    Joseph Wu
  • Richard,


    I've been told that this software is just for the GUI to run the board, and not the actual firmware zip that we used to have on the ftp site.

    At this point, we don't have any example code available. We may be able to release some later (as we've been updating our software release procedure). I would note that this device is relatively easy use. Most of this device is pin controlled and only the data is read from the device.


    Joseph Wu
  • The ads1x31ref_fwsrc_1.0.0.zip is the firmware source for the Eval board. FWSRC -> FirmWareSouRCe.

    Please reference your own TI staff remarks in the original thread.

    Bob Benjamin:
    " As this device is pin controlled, there is really not much to the communication. After each conversion you read the data. We do have some code from the ADS1231REF reference design that is available on the ftp site. This code is a little complicated in that freeRTOS is used and the compiler is GCC, so it is pretty old and difficult to build anymore.

    ftp.ti.com/.../ads1x31ref_fwsrc_1.0.0.zip

    The most useful files are the ADS1231.h and ADS1231.c files. "

    Richard
  • Hi Richard,

    Unfortunately due to situations beyond our applications team control the firmware zip is no longer available for distribution in the current form.  This firmware is actually very old and will not compile easily.  I'm not even sure the compiler used for the project is available anymore.  The rebuild of the project is not considered a high priority at this time.

    The ADS1231 is a simple device and the prototype functions declared in the ADS1231.h mostly consisted of GPIO settings.  When reading the data, the DOUT/DRDY pin went to two GPIO pins on the MSP430.  One was the SPI peripheral MISO and the second GPIO was used as an interrupt input pin (triggering on falling edge).  When the interrupt triggered, 3 bytes of data were read from the device.  I've included the interrupt function for reading the data used for the ADS1231REF.

    interrupt (PORT2_VECTOR) ads1231_isr(void)
    {
    	u8 *cptr=(u8 *)(&_code);
    
    	// disable int before shifting
    	DRDYIEL();
    
    	// get 3 bytes
    	U0TXBUF=0;
    	while(!(IFG1&URXIFG0));
    	cptr[2]=U0RXBUF;
    
    	U0TXBUF=0;
    	while(!(IFG1&URXIFG0));
    	cptr[1]=U0RXBUF;
    
    	U0TXBUF=0;
    	while(!(IFG1&URXIFG0));
    	cptr[0]=U0RXBUF;
    
    	// sign-extend negative values
    	cptr[3]=(cptr[2]&0x80)?0xff:0;
    
    	
    	// clear and reenable int
    	DRDYIFGL();
    	DRDYIEH();
    
    	// _directmonitor refers to streaming data to console
    	if (_directmonitor){	// if streaming
    		// Print the code to the console
    		printhex(&_code);
    		// Give up processing this task and go to the next event
    		taskYIELD();
    	} else _flags.newdata=1;
    
    			
    }
    

    Best regards,

    Bob B