| |
1README.txt
Wed May 17 13:12:27 PDT 2000
PicoWeb Sample Project "ADC"
----------------------------
This project uses a PicoWeb server attached to a LTC 1392 chip.
The LTC1392 is an 8-pin micropower data acquisition system chip from
Linear Technology Corporation (http://www.linear-tech.com/).
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
schematic "pwadc.pdf" (an Adobe Acrobat document). The connection to
the LTC 1392 chip requires five wires:
Signal DB-25 Pin Description
------ --------- -----------
+5V 2 Power (Vcc)
GND 19 Ground
CS_ 4 Chip select (Atmel Port B, bit 0)
CLK 6 Clock (Atmel Port B, bit 1)
D 8 Bidirectional data bit (Atmel Port B, bit 2)
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 <i>a,n</i>
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.
The Web pages in this sample project use HTML FRAMES to create a Web
page with the top FRAME containing a table with the four ADC readings
(i.e., temperature and the three voltage readings). A FORM button can
be used to start and stop auto-update of the readings. Another FORM
button can be used to update the readings table each time it is pressed.
Back
|
|
|