Quantcast
Channel: Data converters
Viewing all articles
Browse latest Browse all 27814

Forum Post: RE: ADS1015: i2c protocol questions

$
0
0
Nathan, When debugging digital communications, the first thing I think you should do is get an oscilloscope or an logic analyzer and look at the lines between the device and the microcontroller. For the ADS1015 , I find that the best thing is to look at these lines and compare them to the communication figures shown in Figures 15 and 16 on pages 20 and 21 in the datasheet (note that there's a newer version of the datasheet on the TI website here: www.ti.com/.../ads1015.pdf ). These are going to be the best examples of how to communicate with the device. In your version of the datasheet, there is a difference in the MSB byte written to the configuration register. In that datasheet, the MSB byte is 0b00000001, in the newer datasheet, this is 0b10000100. In the newer version, this starts the conversion, sets PGA[2:0]=010 so that the input range is ±2.048V, and sets the device to continuous conversion mode. I would probably start with this setting, unless you need to start with a larger input range. Going to your questions, here are my answers: 0. At this point, I think you have some problems with the read of the conversion. You might be reading the configuration register, not the conversion register. The default value of the configuration register is 8583h. Note that we often use the h for hex notations (0h is the same as 0x0). Also, it could be that you're reading the device but reporting back the first byte twice in the GUI. Again, you should get an oscilloscope and check the communications directly. 1. The ADC only uses the internal reference as the reference, it never uses the supply (5V) as the reference. If you were to measure the input voltage of 5V, you would need to use the ±6.144V range. This would give a value of 1667 as a positive result, or 683h in hex. 2. In the quickstart guide you first write to the configuration register. The first byte is the address. The second byte is 0b00000001 as the pointer to the configuration register. The third and the fourth byte are the configuration register. These are the values you want to set for the ADC. These set the gain, data rate, and all functionality. In the new version of the datasheet, Look at Figure 21 and Table 6. Joseph Wu

Viewing all articles
Browse latest Browse all 27814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>