; calibracion en dos puntos para canal 110 y 111 ;faltan los lite ;para mida 14 cali setri 157 6 cali6 clear ;calibracion agregados disl calagr com 0 clear disl e-c com 1 ink ent jnz cali61 ink cle jnz cali7 jmp cali6 cali61 clear ;dato Y1 high disl agr-h com 0 clear com 1 ini 2 stoi ythi movif ythi stof yth movif tei ;dato X1 stof xth clear ;dato YO temp low disl agr-l com 0 clear com 1 ini 2 stoi ytli movif ytli stof ytl movif tei ;dato XO stof xtl movrf xth ;X1-XO movrf xtl subf stof tx movrf yth ;Y1-YO movrf ytl subf stof ty movrf ty ;Y1-Y0 / X1-XO movrf tx divf stof tk movrf tk ; K * XO movrf xtl mulf stof tmx movrf ytl ;B = YO - K*XO movrf tmx subf stof tb cali7 clear ;calibracion humedad disl cal_cem com 0 clear disl e-c com 1 ink ent jnz cali71 ink cle jnz cali8 jmp cali7 cali71 clear ;dato Y1 humedad high disl cem-h com 0 clear com 1 ini 2 stoi yhhi movif yhhi stof yhh movif hui ;dato X1 stof xhh clear ;dato YO humedad low disl cem-l com 0 clear com 1 ini 2 stoi yhli movif yhli stof yhl movif hui ;dato XO stof xhl movrf xhh ;X1-XO movrf xhl subf stof hx movrf yhh ;Y1-YO movrf yhl subf stof hy movrf hy ;Y1-Y0 / X1-XO movrf hx divf stof hk movrf hk ; K * XO movrf xhl mulf stof hmx movrf yhl ;B = YO - K*XO movrf hmx subf stof hb calif return ;---------------------------------------------- ;[REG_RELAYS] ent equ 30 cle equ 31 arr equ 32 izq equ 33 ;[REG_INTEGERS] tei equ 110 hui equ 111 ythi equ 500 ytli equ 501 yhhi equ 502 yhli equ 503 ;[REG_FLOATS] tk equ 100 tb equ 101 hk equ 102 hb equ 103 yth equ 105 ytl equ 106 xth equ 107 xtl equ 108 tx equ 109 ty equ 110 tmx equ 111 yhh equ 112 xhh equ 113 yhl equ 114 xhl equ 115 hx equ 116 hy equ 117 hmx equ 118