! ! This code is taken from John Morley's Barometric Pressure article ! presented in the October 1995 issue of Circuit Cellar Ink. ! DEFINE Ch7RawData = Variable(7) DEFINE Ch7Volts = Variable(8) DEFINE Barometer = Variable(g) BEGIN IF Reset THEN Timer(60) = ON END IF Timer(6O)>=1 THEN ! Read analog input channel 7 and convert to standard ! barometric pressure units. Ch7RawData = ADC(7) Ch7Volts = (Ch7RawData * 50) / 256 Barometer = (Ch7Volts * 12) + 2600 ! Display the barometric pressure on the LCD-Link and in ! the V3.0 HOST message window. LCD(O) = "Barometer: %P2 in", Barometer Console = "Barometer: %PP in", Barometer Timer(60) = ON END