| 전자부품 데이터시트 검색엔진 |
|
AN1045 데이터시트(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1045 데이터시트(HTML) 13 Page - STMicroelectronics |
|
13 / 16 page ![]() 13/16 ST7 S/W IMPLEMENTATION OF I2C BUS MASTER { if (!I2C_SR2) /* No communication error detected */ { buff*=2; /* Shift I2C_DR to receive next bit */ #ifdef __HIWARE__ asm { nop nop nop } #else #ifdef __CSMC__ { _asm("nop"); _asm("nop"); _asm("nop"); } #endif #endif ClrBit(PADDR,SCL); /* Rise the SCL line */ do{ }while(ValBit(PADR,SCL)!=0); /* Wait SCL at a high state */ if(ValBit(PADR,SDA)) buff|=1; /* The received bit is 1 */ else buff|=0; /* The received bit is 0 */ delay(10); SetBit(PADDR,SCL); /* SCL at a low level */ } else r_count_err++; } /*-------------------------------------------------------------------------- ROUTINE NAME : I2C_Ack INPUT/OUTPUT : None. DESCRIPTION : Send Ack to the slave. COMMENTS : --------------------------------------------------------------------------*/ void I2C_Ack(void) { ClrBit(PADR,SDA); /* The master pulls the SDA line low */ |
|
|
링크 URL |
| 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 |