| Zakładka z wyszukiwarką danych komponentów |
|
VV5404 Arkusz danych(PDF) 38 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
VV5404 Arkusz danych(HTML) 38 Page - STMicroelectronics |
|
38 / 54 page ![]() VV5404 & VV6404 CD5404-6404F-A 38/54 5.6 Types of messages This section gives guidelines on the basic operations to read data from and write data to the serial interface. The serial interface supports variable length messages. A message may contain no data bytes, one data byte or many data bytes. This data can be written to or read from common or different locations within the sensor. The range of instructions available are detailed below. • Write no data byte, only sets the index for a subsequent read message. • Single location multiple data write or read for monitoring (real time control) • Multiple location, multiple data read or write for fast information transfers. Examples of these operations are given below. A full description of the internal registers is given in the previous section. For all examples the slave address used is 3210 for writing and 3310 for reading. The write address includes the read/write bit (the lsb) set to zero while this bit is set in the read address. 5.6.1 Single location, single data write. When a random value is written to the sensor, the message will look like this: In this example, the fineH exposure register (index = 3210) is set to 8510. The r/w bit is set to zero for writing and the inc bit (msbit of the index byte) is set to zero to disable automatic increment of the index after writing the value. The address index is preserved and may be used by a subsequent read. The write message is terminated with a stop condition from the master. 5.6.2 Single location, single data read. A read message always contains the index used to get the first byte. This example assumes that a write message has already taken place and the residual index value is 3210. A value of 8510 is read from the fineH exposure register. Note that the read message is terminated with a negative acknowledge (A) from the master: it is not guaranteed that the master will be able to issue a stop condition at any other time during a read message. This is because if the data sent by the slave is all zeros, the sda line cannot rise, which is part of the stop condition. 5.6.3 No data write followed by same location read. When a location is to be read, but the value of the stored index is not known, a write message with no data byte must be written first, specifying the index. The read message then completes the message sequence. To avoid relinquishing the serial to bus to another master a repeated start condition is asserted between the write and read messages. In this example, the gain value (index = 3610) is read as 1510: Figure 19 : Single location, single write. S 3210 A 0 3210 A 8510 A P Start Device Ack address Index Data Stop Figure 20 : Single location, single read. S 3310 A 0 3210 A 8510 A P Start Device Ack address Index Data Stop |
|
Link URL |
| Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Link do karty katalogowej | Linki | Lista producentów All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |