| 数据搜索系统,热门电子元器件搜索 |
|
HT46R23 数据表(PDF) 21 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT46R23 数据表(HTML) 21 Page - Holtek Semiconductor Inc |
|
21 / 42 page ![]() HT46R23 Rev. 1.30 21 August 17, 2001 3: Set EHI bit of the interrupt control register 1 (INTC1) bit 0 to enable the I2C BUS interrupt. Label (HSR) Bits Function HCF 7 HCF is clear to ²0² when one data byte is being transferred, HCF is set to ²1² indi- cating 8-bit data communication has been finished. HAAS 6 HAAS is set to ²1² when the calling ad- dressed is matched, and I2C BUS inter- rupt will occur and HIF is set. HBB 5 HBB is set to ²1² when I2C BUS is busy and HBB is cleared to ²0² means that the I2C BUS is not busy. ¾ 4 Unused bit, read as ²0² ¾ 3 Unused bit, read as ²0² SRW 2 SRW is set to ²1² when the master wants to read data from the I2C BUS, so the slave must transmit data to the mas- ter. SRW is cleared to ²0² when the master wants to write data to the I2C BUS, so the slave must receive data from the master. ¾ 1 Unused bit, read as ²0² RXAK 0 RXAK is cleared to ²0² when the master receives an 8-bit data and acknowledg- ment at the 9th clock, RXAK is set to ²1² means not acknowledged. HSR register Start signal The START signal is generated only by the master de- vice. The other device in the bus must detect the START signal to set the I2C BUS busy bit (HBB). The START signal is SDA line from high to low, when SCL is high. Slave address The master must select a device for transferring the data by sending the slave device address after the START signal. All device in the I2C BUS will receive the I2C BUS slave address (7 bits) to compare with its own slave address (7 bits). If the slave address is matched, the slave device will generate an interrupt and save the following bit (8th bit) to SRW bit and sends an acknowl- edge bit (low level) to the 9th bit. The slave device also sets the status flag (HAAS), when the slave address is matched. In interrupt subroutine, check HAAS bit to know whether the I2C BUS interrupt comes from a slave address that is matched or a data byte transfer is completed. When the slave address is matched, the device must be in trans- mit mode or receive mode and write data to HDR or dummy read from HDR to release the SCL line. SRW bit The SRW bit means that the master device wants to read from or write to the I2C BUS. The slave device check this bit to understand itself if it is a transmitter or a receiver. The SRW bit is set to ²1² means that the mas- ter wants to read data from the I2C BUS, so the slave de- Da t a 1 0 1 AC K St o p 0 0 1 0 0 S = S t ar t ( 1 bi t ) S A = S l a ve A d d r e ss ( 7 b i t s) S R = S R W b i t ( 1 b i t) M = S l av e dev i ce s e nd a cl cnow l edge bi t ( 1 b i t ) D = D a ta ( 8 b i ts ) A = A C K ( R X A K b i t fo r tr a n s m i tte r ; T X A K b i t fo r r e ce i v e r 1 b i t) P = S t op ( 1bi t ) S SA SR M D A D A S SA SR M D A D A P SC L St a r t SD A SR W A C K 1 0 01010 11 SC L SD A Slave address |
|
链接网址 |
| 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 |