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
↧