User Tools

Site Tools


info:howto:water_vapor_pressure_project_notes

Comments from the W7100 asm program

   ; Calculate vapor pressure from temperature and humidity
   ; DPTR points to start of stream of ASCII Humidity
   ; From temperature find the saturation vapor pressure
   ; Take humidity * saturation vapor pressure to get vapor pressure
   ; EX: 70F at 65%  = 25.0*.65 = 16.25mbar
   ; WVP (0-13400) returned in A(lsb)B(msb) and output as xxx.x

Here is the lookup table in the asm program:

   ; Saturation vapor pressure is a table that starts at -30F and
   ; continues to 125F in 5 degree steps
   ; Values in the word table are interpreted with one decimal point (3 = .3)
   ; Reduced accuracy byte table is interpreted as no decimal points (1 = 1.0)
   GET_SVP:
       INC     A
       MOVC    A,@A+PC
       RET
   SAT_VAP_PRES:    ; in millibars
   ;        DW      3,4,6,7,9,12,15,19,24,30,37,46,56,69,84,102,123,148,177
   ;        DW      210,250,296,350,410,481,562,656,762,878,1014,1168,1342
       DB      0,0,1,1,1,1      ; -30 to -5
       DB      2,2,2,3,4,5      ; 0 to 25
       DB      6,7,8,10,12      ; 30 to 50
       DB      15,18,21,25,30   ; 55 to 75
       DB      35,41,48,56,66   ; 80 to 100
       DB      76,88,101,117,134 ; 105 to 125
info/howto/water_vapor_pressure_project_notes.txt · Last modified: 2010/09/26 18:37 by tomgee