| 数据搜索系统,热门电子元器件搜索 |
|
STW5098 数据表(PDF) 19 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STW5098 数据表(HTML) 19 Page - STMicroelectronics |
|
19 / 86 page ![]() Functional description STw5098 18/85 4.3 Device programming STw5098 can be programmed by writing Control Registers with SPI or I2C compatible control interface (both slave). The interface is always active, there is no need to have the master clock running to program the device registers. The control interfaces of each entity can be operated independently either in SPI or I2C modes. The choice between the two interfaces for each entity is done via their input pins 1CMOD and 2CMOD (CMOD): 1. CMOD connected to GND: I2C compatible mode selected The device address is selected with AS pin: When this mode is selected control registers are accessed through pins: SCLK (clock) SDA (serial data out/in, open drain) 2. CMOD connected to VCCIO: SPI compatible mode selected When this mode is selected control registers are accessed through: AS/CSB (chip select, active low) SCLK (clock) SDIN (serial data in) AD_OCK or DA_OCK or IRQ (serial data out, if selected) Device Programming: I2C. The I2C Control Interface timing is shown in Section 6.1 on page 50. The interface has an internal counter that keeps the current address of the control register to be read or written. At each write access of the interface the address counter is loaded with the data of the register address field. The value in the address counter is increased after each data byte read or write. It is possible to access the interface in 2 modes: single-byte mode in which the address and data of a single register are specified, and multi-byte mode in which the address of the first register to be written or read is specified and all the following bytes exchanged are the data of successive registers starting from the one specified (in multi-byte mode the internal address counter restart from register 0 after the last register 36). Using the multi-byte mode it is possible to write or read all the registers with a single access to the device on the I2C bus. This applies to both entities of the device. Device Programming: SPI. The SPI Control Interface timing is shown in section Section 6.2 on page 51. Bits SPIOSEL (SPI Output Select) in CR33 control the out pin selection for serial data out (none, AD_OCK, DA_OCK or IRQ), while bit SPIOHIZ=1 in CR33 selects the high impedance state of serial data out pin when idle. The first bit sent on SDIN, after AS/CSB falling edge, sets the interface for writing (SDIN=1) or reading (SDIN=0), then a 7-bit Control Register address follows. If the interface is set for writing then the last 8 bits on SDIN are written in the control register. If the interface is set for reading then after the 7 bit address STw5098 sends out 8 bits data on the pin selected with bits SPIOSEL in CR33, while bits present at SDIN pin are ignored. If SPIOSEL=00 (no out pin selected) the reading access on SPI interface can still be useful to clear the IRQ event bits in CR32. AS/CSB connected to GND: chip address 00110101(35hex) for reading, 00110100 (34hex) for writing AS/CSB connected to VCCIO: chip address 00110111(37hex) for reading, 00110110 (36hex) for writing |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |