Skip to content
Snippets Groups Projects
Commit 36a44f93 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Set default ADS1255 multiplexer settings depending on board version.

parent 7a8a1693
Branches
Tags
No related merge requests found
......@@ -86,7 +86,13 @@ void ads1255_reset(){
}
void ads1255_setup(uint8_t buff, uint8_t rate, uint8_t pga){
uint8_t command_buffer[6] = {0x50,0x03,buff,0x01,pga,rate};
#if BOARD_VER_MAJOR == 1 && BOARD_VER_MINOR == 1
uint8_t command_buffer[6] = {0x50,0x03,buff,0x01,pga,rate}; // write reg 0, write 4 registers, analog buffer, MUX AIN0-AIN1, pga, rate
#endif
#if BOARD_VER_MAJOR == 1 && BOARD_VER_MINOR == 2
uint8_t command_buffer[6] = {0x50,0x03,buff,0x08,pga,rate}; // write reg 0, write 4 registers, analog buffer, MUX AIN0-AINCOM, pga, rate
#endif
usart_spi_select_device(&USARTE1, &spi_device_conf);
usart_spi_transmit(&USARTE1, ADS_SDATAC);
......
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment