External adc interface in LPC824

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

External adc interface in LPC824

1,006 Views
aravindpb5009
Contributor III

hai 

I am using LPC824 MCUXPRESSO IDE,  in lpc824 having 12 bit ADC only but i need 16 bit adc for that i search external adc , finally i got ADS1115 adc  I2C o/p IC , i don't know how to interface that ADS1115 adc module to our LPC824 MODULE plz let me know how to connect and how to take ADC values ,for example  in ADS1115 module itself having four adc channels and I2C o/p. simply  i connect 4 adc  sensors to ADS1115 and i  read i2c value in our LPC824 means that ok? or i want to use adc registers to read the adc values in ADS1115 MODULE  ? I don't have idea about the interface between lpc &ADS1115 module plx let me know the solution in brief  and share I2C codings for read the adc  values

Thanks &regards 

Aravind P

Labels (5)
0 Kudos
4 Replies

788 Views
soledad
NXP Employee
NXP Employee

Hi, 

for example  in ADS1115 module itself having four adc channels and I2C o/p. simply  i connect 4 adc  sensors to ADS1115 and i  read i2c value in our LPC824 means that ok?

 

Yes, you need to connect the sensor to the ADS1115 and connect the I2C pins to the LPC device, according to the following diagram: 

pastedImage_3.png

Please check the ADS111x datasheet for more information about the data read. http://www.ti.com/lit/ds/symlink/ads1115.pdf

pastedImage_4.png

For the LPC824, you can use the LPC824 MCUXpresso SDK, you can download it from the following link: 

https://mcuxpresso.nxp.com/en/select

After download it, you will find some I2C examples that you can use as a reference. 

pastedImage_5.png

Have a great day,
Sol

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

788 Views
aravindpb5009
Contributor III

hai 

please let me know what is alert and ready pin ads1115

0 Kudos

788 Views
soledad
NXP Employee
NXP Employee

hi, 

You can find this info in the datasheet of the ads1115,

The ADS1115 and ADS1114 feature a programmable digital comparator that can issue an alert on the ALERT/RDY pin. The COMP_MODE bit in the Config register configures the comparator as either a traditional comparator or a window comparator. In traditional comparator mode, the ALERT/RDY pin asserts (active low by default) when conversion data exceeds the limit set in the high-threshold register (Hi_thresh). The comparator then deasserts only when the conversion data falls below the limit set in the low-threshold register (Lo_thresh). In window comparator mode, the ALERT/RDY pin asserts when the conversion data exceed the Hi_thresh register or fall below the Lo_thresh register value.

In either window or traditional comparator mode, the comparator can be configured to latch after being asserted by the COMP_LAT bit in the Config register. This setting causes the assertion to remain even if the input signal is not beyond the bounds of the threshold registers. This latched assertion can only be cleared by issuing an SMBus alert response or by reading the Conversion register. The ALERT/RDY pin can be configured as active high or active low by the COMP_POL bit in the Config register. Operational diagrams for both the comparator modes are shown in Figure 28. The comparator can also be configured to activate the ALERT/RDY pin only after a set number of successive readings exceed the threshold values set in the threshold registers (Hi_thresh and Lo_thresh). The COMP_QUE[1:0] bits in the Config register configures the comparator to wait for one, two, or four readings beyond the threshold before activating the ALERT/RDY pin. The COMP_QUE[1:0] bits can also disable the comparator function, and put the ALERT/RDY pin into a high state.

Have a great day,
Sol

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
----------------------------------------------------------------------------

0 Kudos

788 Views
aravindpb5009
Contributor III

thank you

0 Kudos