I read about MAX. It's this correct :
'------------------------
read 0, calibra.byte0
read 1, calibra.byte1
if calibra =0 then
high rel1
gosub calibration
endif
'------------------------
calibration:
for cnt=0 to 80
adcin 3, v_cal
v_cal=v_cal * 5000
v_cal=div32 1023
vmax=vmax max v_cal
pause 100
next cnt ' reading v_cal for about 8 seconds ?
endfor
low rel1
calibra=vmax
calibra.highbyte = ADRESH
calibra.lowbyte = ADRESL
write 0, calibra.byte0
write 1, calibra.byte1
Return
'---------------------------
Thanks for any advice !
L.E.: The problem is : writing vmax ( example: 275) to eeprom, and then reading.
Bookmarks