7 posts / 0 new
Last post
Max44
Offline
Last seen:9 months 1 day ago
加入:2016-02-08 15:58
ADC Application Note?

There have been several mentions of an ADC Application Note being written, but it hasn't appeared in the list of documentation. Is this effort still underway?

We sure could use some additional guidance, examples, and how-to information!

谢谢你,马克斯

Device:
MT_dialog
Offline
Last seen:2 months 1 day ago
Staff
加入:2015-06-08 11:34
Hi Max44,

Hi Max44,

At the moment there isn't any available documentation for the adc, its on the wish list but we are waiting as well from the documentation team. You can find some info and how to's in the peripheral examples in the SDK's and in the documents that describe the functionallity of the peripheral examples project as well as the drivers (documents UM-B-005 & UM-B-004).

Thanks MT_dialog

Max44
Offline
Last seen:9 months 1 day ago
加入:2016-02-08 15:58
Thanks for the reply.

Thanks for the reply.

Yes, I have done all the things you mentioned and I can report that based on the SDK examples have some preliminary code running to read sensor inputs to the ADC. However, I feel there's still much I don't know about the ADC operation that makes me slightly uncomfortable blindly using it.

我想下stand better what the adc_calibrate() function is doing and what the resulting offset numbers are.

I'd also like to understand more about what GP_ADC_SIGN does. In my code (which will be low frequency samples) I have tried running with and without GP_ADC_SIGN. The values returned from the ADC are slightly different. The SDK battery level example appears that it takes an average of the two conversions, so is this a good technique to provide an accurate and consistent result?

If you could provide more details on these things, I'd feel better about doing the correct things with the ADC peripheral. And, I sincerely hope Dialog will follow through and write up and application note that covers these and other user questions. IMHO, reading and reporting analog sensor data seems fundamental to BLE applications and there's a void of application details with the ADC.

Thanks again, Max

MT_dialog
Offline
Last seen:2 months 1 day ago
Staff
加入:2015-06-08 11:34
Hi Max44,

Hi Max44,

The GP_ADC_SIGN switch the ADC to work in differential mode (measure the voltage between two pins and not the voltage against ground - in single ended mode) its a method to aquire more accurate measuments of your sensor. My personal opinion is to pick only one of the two methods either single ended or differential and not to follow the battery example since the ADC is measuring from an internal channel.

Also regarding the adc_calibration() the GP_ADC_OFFP and GP_ADC_OFFN registers are used for cancelling the offset caused by a small dynamic comparator. This is the standard procedure for the 580 defined from the adc designers in order to compensate that offset and is recommended to implement the above calibration routing during start up initialization.

Thanks MT_dialog

sprhawk
Offline
Last seen:3 years 1 month ago
加入:2016-03-03 17:25
Hi @MT_Dialog,

Hi @MT_Dialog,

I didn't understand you say GP_ADC_SIGN switch ADC to work in differential mode.

1. due to the DA14580 Basic DevKit the schematic and source code of adc.c in SDK, it only measures the voltage from VBAT1V or VBat3V, so how it perform differential measurement ?
2. If it can in internally, what is it working for ADC0~3 channel ? in the same way ?

Max44
Offline
Last seen:9 months 1 day ago
加入:2016-02-08 15:58
Thanks! ..... good

Thanks! ..... good information.

MT_dialog
Offline
Last seen:2 months 1 day ago
Staff
加入:2015-06-08 11:34
Hi sprhawk,

Hi sprhawk,

1. Thanks for the indication, you are right about the above statement, is wrong, the pin that changes the mode of the ADC is the GP_ADC_SE and not the GP_ADC_SIGN.

2. Regarding the ADC channels when operating in differential mode, please check the datasheet in 3.6.4 paragraph and also check the GP_ADC_CTRL_REG (GP_ADC_SEL) for the
available ports when operating the ADC in differential mode.

Thanks MT_dialog