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

X  

AN1045 데이터시트(PDF) 9 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) 9 Page - STMicroelectronics

Back Button AN1045 Datasheet HTML 5Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 9 / 16 page
background image
9/16
ST7 S/W IMPLEMENTATION OF I2C BUS MASTER
/* MODEL => [static] type_name var_name; or #define
*/
void delay (unsigned char time)
{
#ifdef __HIWARE__
asm
{
nop
/* Time is stored on the Accumulator automatically */
again: DEC
A
/* When the function is called.
*/
JRNE
again
/* (15+6*time) clock cycles
*/
}
#else
#ifdef __CSMC__
{
_asm ("nop");
_asm("again: DEC A");
_asm(" JRNE again");
}
#endif
#endif
}
/*--------------------------------------------------------------------------
ROUTINE NAME : I2Cm_Start
INPUT/OUTPUT : None.
DESCRIPTION : Generates I2C-Bus Start Condition.
COMMENTS
:
--------------------------------------------------------------------------*/
void I2Cm_Start (void)
{
ClrBit(PADDR,SDA);
/* Configure SDA and SCL as floating input to have a high state */
ClrBit(PADDR,SCL);
delay(10);
SetBit(PADDR,SDA);
/* Configure SDA as output open drain to have a low state */
delay(4);
/* Waits 39 cycles=4.875µs at a Fcpu=8MHz to keep the high state on SCL */
SetBit(PADDR,SCL);
/* Configure SCL as output open drain to have a low state */
delay(6);
/* Delay to wait after a START
*/
}
/*--------------------------------------------------------------------------
ROUTINE NAME : I2Cm_Stop



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