Product
ZX
Date:
2018.09.19
Page:
21 of 62
Z-Laser Optoelektronik GmbH
Merzhauser Str. 134
D-79100 Freiburg
Tel.: (0761)29644-44
Fax: (0761)29644-55/56
Operation manual
Document-ID: UI-ZL-140011-0.9-2018-09-19
0.9
Author:
CSCH
Merzhauser Str. 134 ~ 79100 Freiburg ~ Tel.: +49-(0)761-29644-44 ~ Fax: +49-(0)761-29644-55
info@z-laser.de ~
www.z-laser.com
Feature
Reference
The default device-ID of the laser module is 0x88 (WR). It can be permanently re-
programmed however (see below, always depicted in light green)
Standard TWI telegrams are supported; every TWI telegram contains a write
transmission and one or more read transmission of a defined length.
The write transmission contains the write-device-ID and 3 or more data bytes. At least
a Command byte and two CRC bytes for the telegram are transmitted. Optionally a
data payload of one or more bytes can be inserted.
The subsequent read transmission(s) contain the read-device-ID, a data payload of one
or more data bytes and two CRC bytes for the telegram. Every read transmission has a
predefined number of bytes - for every SET command the read transmission contains
the system status which indicates the success of the transmitted write telegram.
For write telegrams the read transmission can be repeated multiple times until the
status indicates a successful completion of the command processing (busy bit = 0)
For read telegrams that cannot provide instantaneous data to return, the read
transmission does not contain data payloads else then the system status followed by
the CRC (data byte count = 0). To provide the expected transmission length, fill bytes
are appended. This is indicated to the TWI host by an active “busy” flag in the system
status byte (Bit 0 = 1). The read transmission can be repeated multiple times until the
busy bit is reset (Bit 0 = 0) and valid data bytes are returned.
Other circumstances where no data is returned:
Error flag (bit 1 = 1) – e.g. the command byte has not been interpreted correctly
NACK flag (bit 3 = 1) – e.g. premature new command received when previous
command has not yet been executed successfully.
Typical data payload configurations for write transmissions are as follows:
Parameter-Lo
Parameter-Hi
Parameter
Parameter-2
Parameter-1
Parameter-4
Parameter-3
no Byte
for simple commands
for parameter settings
for parameter settings
for parameter settings
WR-Device-ID CMD Byte
Hi-Byte CRC
Data Byte 0….N
RD-Device-ID
Hi-Byte CRC
Data Byte 0….N
System Status
Fill Byte 0….N
Lo-Byte CRC
Lo-Byte CRC