Questions related to the ADC implementation on the BCM2073XS...

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

This came in via email from gcohler, but I thought it may make sense to post here since the documentation for the ADC functionality is very limited:

===================Begin

We’re confused about the situation with reference voltage for the ADC, so I was hoping you could point me in the right direction.

Three things I’m confused about:

  1. The API for SetReferenceVoltage(pin, voltage).
    • I believe (but am not sure) that, when called, the API takes a measurement of the pin specified, then computes the ratio between the raw ADC value and the number of millivolts specified to create a conversion factor between the raw ADC value and the millivolts value.  And then saves that conversion factor for future use when adcRead() is called.
    • In other words, it is purely a software thing, and that it does not actually use that pin as the external hardware reference voltage for the ADC operation.
  2. Reference Voltage(s):
    • I believe (but am not sure) that there is at least one internal voltage reference inside the chip.  But from the limited docs I can’t be sure.  And there may be more than one.
    • If for example, I wanted to use the 1.2V core voltage as the reference, is that possible?  Is there an API to select this?  There are three bullets that talk about different impedances based on different voltage ranges. So that implies that there are three different references that I can use: VDD, 2.4 and Vcore.
    • If I call the SetReferenceVoltage API (for example with P15), does that make P15 an external reference for the ADC in a hardware sense?  I’m thinking no, but not sure.
  3. The different ADC Modes (table 1).  Are these really just different sample and hold rates?  So if I go to low-frequency sampling, I get better precision.  Or is there more to these modes.  There isn’t really any description of what the modes mean.

Thanks very much for any light that you can shed on this.  I have a customer that wants to use 1.2V as the reference. Hence my curiosity.

0 Likes
1 Solution

gcohler

Note that we confirmed today that 1.2V (VDD_Core) is the reference used within the core example provided in ROM.

So if you need to use 1.2V, everything is already setup and no changes are needed.

View solution in original post

0 Likes
4 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

The user then explained that the following post was extremely helpful: Re: BCM20732S ADC Configuration

And included the following understanding that I think would be helpful to others:

Begin====================

My current understanding:

     

  1. The API for adcCalibrate(voltage, pin).  – I named this wrong, it was adcCalibrate()
    • When called, the API takes a measurement of the pin specified, then computes the ratio between the raw ADC value and the number of millivolts specified to  create a conversion factor between the raw ADC value and the millivolts value.  And then saves that conversion factor for future use when adcRead() is called.
    • It also selects the hardware reference voltage for the ADC.
    • Beside the normal pin numbers that can be used, there are two other “key words”
      • ADC_INPUT_VDDIO
        – use VDDIO as an internal reference voltage
      • ADC_INPUT_VDD_CORE
        – use VDD core as the internal reference voltage.
  2. Reference Voltage(s):
    • There are three internal voltage references inside the chip.  VDD, VDDIO, VDD_Core.  By default, it uses VDD.
    • If I call the adcCalibrate API (for example with P15), that makes P15 an external reference for the ADC in a hardware sense.

We will follow up with the developers to confirm this understanding, then close out the discussion once verified.

kwang

0 Likes
Anonymous
Not applicable

There likely is at least a third keyword (maybe ADC_INPUT_VDD) for using VDD as the internal reference.  But I didn't see it in the other posts.  There's likely a .h file around with all these symbols defined.

0 Likes

gcohler

Note that we confirmed today that 1.2V (VDD_Core) is the reference used within the core example provided in ROM.

So if you need to use 1.2V, everything is already setup and no changes are needed.

0 Likes