Other Parts Discussed in Thread: ADS1258
Hi
I wanted to know what is the command to select Analog Channel 1 as the input .Do you have to give the register 0x02 with value of 0x10 i.e channel 1 with compared to negative channel 0
Thanks
Chintan
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.
Other Parts Discussed in Thread: ADS1258
Hi
I wanted to know what is the command to select Analog Channel 1 as the input .Do you have to give the register 0x02 with value of 0x10 i.e channel 1 with compared to negative channel 0
Thanks
Chintan
Hi Chintan,
Is this question in regards to the commands for the ADS1258?
Hi Chintan,
There are two ways to select Analog Channel 1 depending on whether you want to use Fixed-channel mode or Auto-scan mode. Now, to configure the ADC, you can either use multiple register access to allow you to cycle through the registers one by one and set them accordingly or separately write to the registers of interest. For multiple register access, you would need to set the MUL bit high and then cycle through the registers to allow you to configure each one individually.
A quick example of one possibility (not using multiple register access) to set the registers for Analog Channel 1, Fixed channel mode is written below -
For Fixed channel mode, first write 0110 0000 (0x60) followed by 0010 0000(0x20) to write to the config register and set the device into Fixed channel mode.
To set the channel to Analog Channel 1 in Fixed channel mode, first write 0110 0100 (0x62) followed by 0001 0001 (0x22) to set the converter to use AINN0 as the negative input and AINP0 as the positive input (differential input). In Fixed-channel mode, differential mode is the only option.
In order to use the converter in single ended mode referring the input to AINCOM, you need to use auto-scan mode. To put the converter in Auto scan mode, first write 0110 0000 (0x60) followed by 0000 0000(0x00).
Then, to select AIN1, write 0110 0400 (0x64) followed by 0000 0020(0x02). In auto-scan mode, you can select multiple channels to have the internal mux cycle through if you would like.
Regards,
Tony Calabria
Hi Tony
Thanks for your response.Do you mean 0x62 and value of 0x11.Also in the evaluation module it says that Positive Channel 0 and negative channel 0 do not work together.These would be only useful for noise measurement
I want to do input a sine wave on AIN1 and use AIN0 as the other terminal ..what would be the address then ...
Best
Chintan
Hi Tony,
This is Mike, a colleague of Chintan. I have a couple of questions.
Earlier in this thread, you stated that in Fixed Channel Mode, we can only use differential inputs. The ADS1258 data sheet makes no mention of that. We chose this device as it supported 16 SE inputs. We need more than 8 inputs. And we have to use Fixed Channel mode. So, can this device be made to work for this application?
When first configure the ADS1258 for:
fixed data mode 0x60 with data 0x20
0x61 with data 0x03
0x62 with data 0x10
Then each loop we send:
0x62 with the desired channel number
toggle the start line
wait for DRDY-
0x01 channel data read direct
This used to work ...
Mike Dobbs and Chintan
Hi Mike, Chintan,
I think I am confused exactly with what you are trying to do.
Fixed-Channel mode is going to force you to reference the any of the 16 input channels with another one of the 16 analog inputs. The AINCOM input cannot be reference in this mode as we state in the Fixed-Channel Mode section on page 29 of the data sheet. If using Fixed channel mode as you mentioned that you are, table 19 is of interest. Here you can see it is split up into two 4 bit sections. First four bits are for the AINP of interest and the second four bits is for the AINN input. I think that I may have mis-spoke in my previous email but if you are interested in using channel AIN0 for the negative terminal and AIN1 for the positive terminal, you would write 0x62 for the address followed by 0x10. If you want to use pin AIN15 for the negative terminal and pin AIN7 for the positive terminal, you would write 0x62 for the address followed by 0xF7.
You are able to put the device in Auto-Scan mode and then go through registers MUXSG0 and MUXSG1 to enable the specific AIN input of interest one at a time. This would give you the ability to manually select any one of the single ended channels AIN0 - AIN15 one at a time that is of interest and should give you what you want. So if you are interested in reading back just AIN0 referred to AINCOM, you would write 0x60 with data 0x00 to put it in auto-scan mode and then individually switch in the channel of interest.
Sorry for any confusion.
Regards,
Tony Calabria
HI . I am having the following issues with ADC i am constantly getting values of 00 07 FF FF. my flow of code is as follows : Read_Value_ADC() { UCB0TXBUF=DUMMYBYTE WORD[0]=UCB0RXBUF; WHILE(!(SFRIFG1&UCTXIFG)) UCB0TXBUF=DUMMYBYTE WORD[1]=UCB0RXBUF; WHILE(!(SFRIFG1&UCTXIFG)) UCB0TXBUF=DUMMYBYTE WORD[2]=UCB0RXBUF; WHILE(!(SFRIFG1&UCTXIFG)) UCB0TXBUF=DUMMYBYTE WORD[3]=UCB0RXBUF; } void main() Select_Fixed_Mode() { Address Data 0x60 0x20 0x61 0x03 0x62 0x13 } while(1) { CS_High CS_Low write_Register( 0x62 ,0x13) ST_Bit_High ST_bit_Low while(wait for Data Ready to toggle) Read_value_ADC() }
Hi Chintan,
The way that you are currently configuring the ADC is to use channels AIN1 as the positive channel and AIN3 as the negative channel. This corresponds to pins 3 and 1 on the ADC itself. First thing I would do is to make sure that you are using the correct input pins. Does the input code stay fixed at 00 00 07 FF FF or does it vary in code reading? I wonder if the ADC is clipping and the output is reading back full scale. Could you send a few more SCLKs to see if the data word that you read back is 7F FF FF? Also, take a scope picture of the SPI data word so we can get an idea of what the data word looks like that you are receiving.
Regards,
Tony
Hi Tony
Thanks for your response.I could get the ADC to work in the fixed mode.The issue was after the read was completed in the next cycle of ADC write channel address it would give random value in register of address 0x62 so i guess that was the reason behind the 7F FF FF.Now i am getting some value out of the ADC but i havent confirmed if they are correct.
Also would i have to give delay of few cycles between reading of 3 bytes of ADC data or it can go continously as described in the code i asked before.
Just to have it confirmed by you the formula to convert the ADC reading is follows
Voltage =(ADC Reading)* 5V /(2^24).
Also to confirm that on the evaluation board i have the switch set to AVDD and AVSS as REFP and REFN.
Hi Chintan,
You are able to send 3 bytes of continusous clocks without a delay between the 8 bit cycles.
Your transfer function you provided is not quite correct. The Fullscale voltage in this part is a little different than other delta sigmas in our portfolio. In this part the range is +/-1.06Vref allowing the input to slightly exceed the reference voltage as shown in page 25 of the data sheet. The data format is 2s compliment. Therefore, for a positive voltage, the transfer function is -
Voltage = (ADC reading) * (Vref / 0x780000). Note: 0x780000 is 7864320 in decimal.
Regards,
Tony Calabria