{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.adc.error_budget.input.json",
  "title": "ADC error budget — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "n_bits": {
      "type": "integer",
      "minimum": 1,
      "maximum": 32,
      "description": "Integer ADC resolution in bits."
    },
    "FSR_V": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Total analog input span in volts, not necessarily VREF. For a 0–3.3 V ADC, FSR_V = 3.3; for ±2.5 V, FSR_V = 5."
    },
    "gain_err_LSB": {
      "type": "number",
      "default": 0,
      "description": "Gain error already referred to LSB."
    },
    "offset_err_LSB": {
      "type": "number",
      "default": 0,
      "description": "Offset error already referred to LSB."
    },
    "inl_LSB": {
      "type": "number",
      "default": 0,
      "description": "Integral nonlinearity already referred to LSB."
    },
    "dnl_LSB": {
      "type": "number",
      "default": 0,
      "description": "Differential nonlinearity already referred to LSB. CalculatorX includes DNL as a separate RSS/worst-case contributor."
    },
    "combine": {
      "type": "string",
      "enum": [
        "rss",
        "worst_case"
      ],
      "default": "rss",
      "description": "rss treats contributors as independent/uncorrelated and is an engineering estimate, not a guaranteed bound. worst_case sums absolute LSB terms."
    }
  },
  "required": [
    "n_bits",
    "FSR_V"
  ],
  "description": "Combine gain/offset/INL/DNL into LSB, volts, and %FS. (calculation_version 1.0.0)"
}
