WebADC Implementation Details

The PicoWeb server you are using is attached to a LTC 1392 is an 8-pin micropower data acquisition system chip from Linear Technology Corporation (www.linear-tech.com).

LTC 1392 Block Diagram

The LTC 1392 is a micropower data acquisition system designed to measure temperature, on-chip supply voltage and a differential voltage. The differential inputs feature rail-to-rail common mode input voltage range. The LTC 1392 contains a temperature sensor, a 10-bit A/D converter with sample-and-hold, a high accuracy bandgap reference and a 3-wire half-duplex serial interface.

The LTC 1392 can be programmed to measure ambient temperature, power supply voltage and an external voltage at the differential input pins, that can also be used for current measurement using an external sense resistor. When measuring temperature, the output code of the A/D converter is linearly proportional to the temperature in °C. Production trimming achieves ±2°C initial accuracy at room temperature and ±4°C over the full -40°C to 85°C temperature range.

The LTC 1392 is connected to the PicoWeb server as detailed in the following schematic:

The PicoWeb project file "adc.pwp" implements a pcode routine named pread_adc that can be used to read 10-bit values from any of the LTC 1392's four registers:

   pread_adc - take reading from LTC1392 chip

     pread_adc a,n

   where:

     a    - address in SRAM to get 10-bit result (as 16-bit integer)
     n    - which LTC1392 register to read, defined as follows:

            n   Register        Meaning
           ---  -------         -------
            0   Temperature     Temp(°C) = (10-bit code) / 4 - 130
            1   Supply Voltage  Vcc = [(10-bit code) * 4.84/1024] + 2.42
            2   Input (0-1 V)   Diff. Volts = 1.0V * (10-bit code) / 1024
            3   Input (0-.5 V)  Diff. Volts = 0.5V * (10-bit code) / 1024
The PicoWeb project file also provides several user-supplied CGI routines which will return ASCII decimal values, as described in the following table:
     CGI Routine  Returned Value (ASCII decmial)
     -----------  ------------------------------
     readtemp     temperature (deg-C)
     readpwr      power supply voltage (mV)
     readhigh     0-1.0 V differential input voltage (mV)
     readlow      0-0.5 V differential input voltage (mV)
     rawtemp      raw 10-bit temperature reading
     rawpwr       raw 10-bit power supply reading
     rawhigh      raw 10-bit differential input reading (0-1.0 V scale)
     rawlow       raw 10-bit differential input reading (0-0.5 V scale)
Using these routine names as "CGI tags" in PicoWeb HTML files will cause readings (in decimal ASCII) to appear in place of the "tags" in Web pages sent by the PicoWeb server.

Home

Powered by PicoWeb™  (www.picoweb.net)