The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/iio/afe/voltage-divider.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 Voltage divider
    2 ===============
    3 
    4 When an io-channel measures the midpoint of a voltage divider, the
    5 interesting voltage is often the voltage over the full resistance
    6 of the divider. This binding describes the voltage divider in such
    7 a curcuit.
    8 
    9     Vin ----.
   10             |
   11          .-----.
   12          |  R  |
   13          '-----'
   14             |
   15             +---- Vout
   16             |
   17          .-----.
   18          | Rout|
   19          '-----'
   20             |
   21            GND
   22 
   23 Required properties:
   24 - compatible : "voltage-divider"
   25 - io-channels : Channel node of a voltage io-channel measuring Vout.
   26 - output-ohms : Resistance Rout over which the output voltage is measured.
   27                 See full-ohms.
   28 - full-ohms : Resistance R + Rout for the full divider. The io-channel
   29               is scaled by the Rout / (R + Rout) quotient.
   30 
   31 Example:
   32 The system voltage is circa 12V, but divided down with a 22/222
   33 voltage divider (R = 200 Ohms, Rout = 22 Ohms) and fed to an ADC.
   34 
   35 sysv {
   36         compatible = "voltage-divider";
   37         io-channels = <&maxadc 1>;
   38 
   39         /* Scale the system voltage by 22/222 to fit the ADC range. */
   40         output-ohms = <22>;
   41         full-ohms = <222>; /* 200 + 22 */
   42 };
   43 
   44 &spi {
   45         maxadc: adc@0 {
   46                 compatible = "maxim,max1027";
   47                 reg = <0>;
   48                 #io-channel-cells = <1>;
   49                 interrupt-parent = <&gpio5>;
   50                 interrupts = <15 IRQ_TYPE_EDGE_RISING>;
   51                 spi-max-frequency = <1000000>;
   52         };
   53 };

Cache object: 10320d6f343a2003ae588417fdd49dfc


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.