NOTES on UNI-T UT81 ScopeMeter IR/Serial interface
--------------------------------------------------
This information has been obtained unofficially from observation of the
characteristics of a UT81B unit, and has not been endorsed or validated
by UNI-Trend in any way. It is presented "as is" and with absolutely no
guarantee that it is correct, or that use of it will not damage your
device. Make use of it entirely at your own risk.


The UT81 communicates via an Infrared/Serial interface which can be
accessed via USB with the included USB cable (it contains an FTDI USB
to serial adapter), or a homebuilt RS-232 cable (see RS232.TXT)

Serial encoding is 9600 bps, 8 data bits, one stop bit.

There is only one "command" which can be sent to the meter, which is the
single byte 0x5A - this causes the meter to transmit a status record.

NOTE: That if the meter is performing an acquisition, it will wait until
the acquisition is finished before sending the status record. The worst
case acquisition time is in Scope mode, with a TimeBase of 5 seconds/division
times 8 division (40s) - the meter sometimes also takes some additional
time to respond, so I'd recommend a timeout of at least 45s when taking
slow readings.

Unfortunately there is no error checking in the protocol, and no response
from the meter until the acquisition is complete - so there is no way to
know if the acquisition is coming or the request was missed - fortunately
the IR interface places the detectors and emitters in very close proximity
to each other, so the interface is quite reliable.

The status record sent by the meter always starts with the 0x5A byte, and
always contains at least 41 bytes - If the meter is operating in "Scope"
mode (indicated by Bit7 of byte [06]) an additional 320 bytes of scope
display data is also sent, for a total of 361 bytes.

Here are the fields I've worked out so far - if you can add any detail to
this, please contact me:

00      5A  (Indicates Start of message)
01-04   ??? Unknown - possibly an ID field ???
05      5C when operating as Meter, 59 when Scope (06.7 may be more reliable)
06      Function (Bit 7 is set when operating in Scope mode).
            00=Voltage      03=Capacitance      06=Diode
            01=Current      04=Resistance
            02=Frequency    05=Continuity       
07      00=Hold     01=Run
08      Volts/Amps range: 00=Manual     01=Auto
09      TimeBase        : 00=Manual     01=Auto
10      00=DC/Freq      01=AC/Duty
11      Volts/Amps range
        Scope mode:
            00=20mv         05=1v/ma        0A=50v/ma       10=5A
            01=50mv         06=2v           0B=100v/ma
            02=100mv        07=5v           0C=200v
            03=200mv/ua     08=10v          0D=500v
            04=500mv/ua     09=20v/ma       0F=2A
        Meter Mode:
              Range-Manual        Range-Auto
            02= 400mv/400ua     00=400mv/400ua
            05=    4v/4000ua    03=   4v/4000ua
            08=   40v/40ma      06=  40v/40ma
            0B=  400v/400ma     09= 400v/400ma
            0D=1000v(750vAC)
            0E=   4A            0C=1000v(750ac)/4A
            10=  10A
12      Move (offset)   +/-60
13      TimeBase - Period
            06-08=100/200/500ns
            09-11=1/2/5/10/20/50/100/200/500us
            12-1A=1/2/5/10/20/50/100/200/500ms
            1B-1D=1/2/5s
14      TimeBase : Trigger shift +/-76
15      Trigger  : Slope  00=RisingEdge  01=FallingEdge
16      Trigger  : Level +/-60
17      Trigger  : Mode
            00 = Auto
            01 = Norm
            02 = Shot
18      Ohms range:
            00=400ohm       03=400k
            01=4k           04=4m
            02=400k         05=40m
19      Ohms Range:     00=Manual   01=Auto
20      00=Abs      01=REL
21-29   Display 1 text
30      Zero-term for Display 1?
31-38   Display 2 text
39      Zero-term for Display 2?
        Displays use '?' for "Ohms" symbol
41-360  Scope data  X=0-319 Y=+95/-96 (only present in Scope mode)
        Note that the range of scope-data covers four more vertical
        grid-blocks that the UT81 internal display (which only covers
        the range of +63/-64) - this is why the display of my UT81
        demo program looks taller than the meter display (and has four
        more grid-blocks vertically).


Dunfield Development Services (DDS) offers software and firmware
development services specializing in systems and embedded applications.
For more information, visit: http://www.dunfield.com

