www.vtiinstruments.com
EX1629 Onboard Memory
321
A
PPENDIX
C
M
ICRO
LAN
(MLAN)
P
RIMER
I
NTRODUCTION
The MicroLAN specification details five major functions that are the centerpiece of any operations
involving TEDS devices. These five functions are:
Read serial/URN from device (GET_URN)
Write to volatile memory scratchpad (READ_SCRATCHPAD)
Read from volatile memory scratchpad (WRITE_SCRATCHPAD)
Copy volatile scratchpad to nonvolatile memory (COPY_SCRATCHPAD)
Read from non-volatile memory (READ_MEMORY)
The GET_URN command is a vital precursor to any of the other four operations. If the URN of
the TEDS (1-Wire) device is not queried before the other operations are called, these operations
will fail.
In general, there can be multiple 1-Wire devices per 1-Wire bus master (MLAN repeater) and the
MLAN responder in the unit holds the state of the device being addressed. To interact with a 1-
Wire device, the URN of the device is used as an address, allowing a single device to be selected.
Each channel on the EX1629 has a 1-Wire bus master. Under typical operation on the EX1629,
only a single 1-Wire device will be connected to each channel.
The GET_URN function is designed to identify a single 1-Wire TEDS device and return its unique
64-bit URN value. Sample code for how this function is implemented is provided. A variant of the
GET_URN function can be used to search through multiple devices in order to select a specific
device, but the example version of this function only supports one device per channel.
Once the 1-Wire device has been addressed, the MLAN responder will store its address, and it will
not need to be referenced again until it is necessary to change devices. Any of the other commands
can now be used to view or change data.
The READ_MEMORY function is probably the most commonly used MLAN command. It allows
the user to query the non-volatile memory of any 1-Wire device and read back its contents.
Currently, the maximum size of the EX1629 MLAN buffer is 48 bytes, but, because of packet
overhead, this sample code limits data reads to 32 bytes. For some devices, notably the DS2431,
the READ_MEMORY function may return multiple MLAN packets.
The “scratchpad” is a volatile buffer on a 1-Wire device where data is written before it is copied to
memory. In order to write data to the main memory, it must first be written to the scratchpad.
After writing to the scratchpad, the data can then be copied to the main memory.
WARNING
The scratchpad will be erased if you unplug your MLAN device, power off the EX1629, or wait
a significant amount of time between commands.
VTI Instruments recommends performing
scratchpad operations in a production environment using the “write_and_copy” atomic command
which is discussed in detail later.
Содержание EX1629
Страница 310: ...VTI Instruments Corp 310 EX1629 Command Set...
Страница 342: ...VTI Instruments Corp 342 EX1629 Onboard Memory...