전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

AN1045 데이터시트(PDF) 10 Page - STMicroelectronics

부품명 AN1045
상세설명  ST7 S/W IMPLEMENTATION OF I2C BUS MASTER
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1045 데이터시트(HTML) 10 Page - STMicroelectronics

Back Button AN1045 Datasheet HTML 6Page - STMicroelectronics AN1045 Datasheet HTML 7Page - STMicroelectronics AN1045 Datasheet HTML 8Page - STMicroelectronics AN1045 Datasheet HTML 9Page - STMicroelectronics AN1045 Datasheet HTML 10Page - STMicroelectronics AN1045 Datasheet HTML 11Page - STMicroelectronics AN1045 Datasheet HTML 12Page - STMicroelectronics AN1045 Datasheet HTML 13Page - STMicroelectronics AN1045 Datasheet HTML 14Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 10 / 16 page
background image
10/16
ST7 S/W IMPLEMENTATION OF I2C BUS MASTER
INPUT/OUTPUT : None.
DESCRIPTION : Generates I2C-Bus Stop Condition.
COMMENTS
:
--------------------------------------------------------------------------*/
void I2Cm_Stop (void)
{
SetBit(PADDR,SDA);
/* Configure SDA and SCL as output open drain to have a low state
*/
SetBit(PADDR,SCL);
ClrBit(PADDR,SCL);
/* Configure SCL as floating input to have a high state
*/
delay(4);
/* Macro delay with time=4 (4.875 µs)
*/
ClrBit(PADDR,SDA);
/* Configure SDA as floating input to have a high state
*/
/* Delay after the Stop did in main.c with Wait_1ms()
*/
}
/*--------------------------------------------------------------------------
ROUTINE NAME : wait_Ack
INPUT/OUTPUT : None.
DESCRIPTION : Acknowledge received?
COMMENTS
: Transfer sequence = DATA, ACK.
--------------------------------------------------------------------------*/
void wait_Ack (void)
{
SetBit(PADDR,SCL);
/* Output open drain to have a low level */
ClrBit(PADDR,SDA);
/* Floating input, the slave has to pull SDA low */
delay(1);
if (ValBit(PADR,SDA))
/* Test of SDA level, if high -> pb
*/
{
SetBit(I2C_SR2,AF);
ClrBit(I2C_SR1,ACK);
return;
}
delay(2);
if (ValBit(PADR,SDA))
/* Test of SDA level, if high -> pb
*/
{
SetBit(I2C_SR2,AF);
ClrBit(I2C_SR1,ACK);
return;
}
delay(5);
ClrBit(PADDR,SCL);
/* Start of the generation of 1 clock pulse */
delay(1);
if (ValBit(PADR,SDA))
/* Test of SDA level, if high -> pb
*/
{



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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