亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? i2c.txt

?? MICROCHIP pic-demo板 液晶官方驅動
?? TXT
字號:
The i2c functions and macros to implement the i squared c,7-bit, standard-mode, master-mode protcol.For a description of i squared c, see "The i2c bus -and how to use it" by Philips Semiconductors.CONTENTS########1 Setting Up2 High-level Function and Macro Definitions3 Lower-level Function and Macro Definitions4 Examples1) Setting Up#############The file i2c.h should be #included into your sourcefiles. This file contains several macros which specifywhich port bits are to be used for the clock (SCL) andthe data line (SDA). These should be adjusted to suityour application. The bus time-out macro I2C_TM_SCL_TMOin i2c.h may need adjusting to suit the devices used.Some devices require relatively long time to processdata. A delay may be required in your code beforeattempting further access to these devices. If yourPIC crystal frequency is not 4MHz, you will have tomake the appropriate adjustments as detailed in delay.hfor the delays to be accurate.2) High-level Function and Macro Definitions############################################unsigned chari2c_WriteTo(unsigned char address)~~~~~~~~~~~This function is used to commence writing to a deviceon the bus. Specify the 7-bit address to which data isto be sent. The least significant bit of the argumentis ignored. The function generates a (re)start conditionand reads an acknowledge from the slave. The functionreturns TRUE if the slave did not acknowledge the addresstransfer or FALSE otherwise.unsigned chari2c_ReadFrom(unsigned char address)~~~~~~~~~~~~This function is used to commence reading from adevice on the bus. Specify the 7-bit address from whichdata is to be read. The least significant bit of theargument is ignored. The function generates a (re)startcondition and reads an acknowledge from the slave. Thefunction returns TRUE if the slave did not acknowledgethe address transfer or FALSE otherwise.signed chari2c_PutByte(unsigned char byte)~~~~~~~~~~~~This function is used to send a byte of data to thedevice which has been activated by i2c_WriteTo().The function checks the acknowledge bit returnedby the slave. The function returns I2C_ERROR if duringthe transfer a bus error occured, TRUE if the datawas not acknowledged, or FALSE if the transfer tookplace without error and was acknowledged.inti2c_GetByte(unsigned char more)~~~~~~~~~~~This function is used to read a byte of data fromthe device which has been activated by i2c_ReadFrom().The argument to this function is used to determine ifmore data is to be read from the activated device. Ifmore is I2C_LAST, or false, no acknowledge is sent, andno more data can be read from the activated deviceunless another i2c_ReadFrom() command is issued.If more is I2C_MORE, or any true value, an acknowledge issent and more data can be read from the activateddevice. The function returns the unsigned byte readfrom the activated device or I2C_ERROR if a bus erroroccured during the read operation.signed inti2c_PutString(const unsigned char *string,~~~~~~~~~~~~~       unsigned char str_len)This function is used to send a sequence of bytes tothe device which has been activated by i2c_WriteTo().The function attempts to send str_len bytes whichare read from string. If a bus error occures duringthe transfer, the function returns a negative int.The magnitude of this number is the number of byteswhich were not successfully transmitted. If theslaves fails to acknowledge a transfer, thetransmission is terminated and the functionreturns a positive number. The magnitude of thisnumber is the number of bytes which were notsuccessfully transmitted. The function returns FALSEif the all the bytes were transmitted without errorand they were all acknowledged by the slave.unsigned chari2c_GetString(unsigned char *string,~~~~~~~~~~~~~ unsigned char str_len)This function is used to obtain a sequence of bytesfrom the device which has been activated byi2c_ReadFrom(). The function attempts to read str_lenbytes which will be stored at string. If a bus erroroccurs during the transfer, the function terminatesand returns the number of bytes not successfully read.The function returns FALSE if all the data requestedwas read without error. This function indicates tothe slave that no more data is to be read aftersuccessfully reading the last byte. To read more dataafter using this function, activate the source deviceby using i2c_ReadFrom().I2C_MORE and I2C_LAST~~~~~~~~     ~~~~~~~~These macros may be used with i2c_GetByte() toindicate that more data is to be read or that thisis the last byte to be read, respectively.I2C_ERROR~~~~~~~~~This macro may be used with i2c_GetByte() andi2c_PutByte() to check for a bus error.3) Lower-level Function and Macro Definitions#############################################voidi2c_Stop(void)~~~~~~~~Sends a stop condition.voidi2c_Restart(void)~~~~~~~~~~~Sends a start condition.voidi2c_Start(void)~~~~~~~~~~~Sends a start condition. Functionally the sameas i2c_Restart().unsigned chari2c_SendByte(unsigned char byte)~~~~~~~~~~~~Sends an 8-bit number to the active device. Theacknowledge bit is not checked. Returns TRUE ifa bus error occured; FALSE otherwise.usigned chari2c_SendAddress(unsigned char address,~~~~~~~~~~~~~~~      unsigned char rw)Sends an 8-bit quantity representing a 7-bitaddress and a 1-bit read/write mode bit. ReturnsTRUE if a bus error occurred; FALSE otherwise.signed chari2c_ReadAcknowledge(void)~~~~~~~~~~~~~~~~~~~Reads the acknowledge bit from the slave.Returns I2C_ERROR if a bus error occurs, TRUE ifthe device did not acknowledge, or FALSEotherwise.inti2c_ReadByte(void)~~~~~~~~~~~~Reads an 8-bit quantity from the slave. Theacknowledge is not generated. Returns the byte orI2C_ERROR if a bus error occurred.voidi2c_SendAcknowledge(unsigned char status)~~~~~~~~~~~~~~~~~~~Sends an acknowledge if status is TRUE; sendsa ~acknowledge otherwise. A ~acknowledge is usedto indicate to the slave that no more data is tobe read and that it should release the bus so thatthe master can issue the next command.unsigned chari2c_Open(unsigned char address, unsigned char mode)~~~~~~~~Sends a 7-bit address and 1-bit read/write mode bit.Returns TRUE if the device did not acknowledge.unsigned chari2c_WaitForSCL(void)~~~~~~~~~~~~~~Waits for the clock line to be released by the slave.If the line is not released after I2C_TM_SCL_TMO microseconds, the function times out and a bus error isassumed. In this case, the function returns TRUE;FALSE otherwise.4) Examples###########i2c_WriteTo(0xAE);	/* talk to device 1010111w */i2c_PutByte(0x00);	/* send data 0x00 */i2c_ReadFrom(0xAE);	/* talk to device 1010111r */data1 = i2c_GetByte(I2C_MORE);	/* read one byte */data2 = i2c_GetByte(I2C_MORE);	/* read another */i2c_GetString(my_string, 10);	/* read 10 bytes *//* i2c_GetString() terminates reading, if more data * is required, re-address the device */i2c_ReadFrom(0xAE);data3 = i2c_GetByte(I2C_LAST);	/* last byte read *//* check for errors */if(i2c_PutByte(0xff))  my_error_routine();	/* bus error or ~ack */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久不见久久见免费视频1| 日韩一区在线免费观看| 欧美曰成人黄网| 91麻豆国产在线观看| 成人97人人超碰人人99| 97se亚洲国产综合在线| 91香蕉视频在线| 色欧美片视频在线观看 | 狠狠色狠狠色综合日日91app| 亚洲成人免费av| 日韩精品一二三四| 精品一区二区免费看| 国产精品99久久久久久有的能看| 国产99久久精品| 91一区二区三区在线观看| 国产精品一区二区三区99| 国产日韩精品久久久| 日韩精品中文字幕在线不卡尤物| 日韩一区二区三区视频| 日韩一区二区精品葵司在线| 久久久久久免费| 国产精品免费久久| 亚洲午夜激情av| 蓝色福利精品导航| 波多野结衣在线一区| 欧美日韩在线播放一区| 久久亚洲春色中文字幕久久久| 国产精品乱码妇女bbbb| 亚洲一区二区在线观看视频 | 亚洲人吸女人奶水| 成人精品视频一区二区三区| 国产一区二区毛片| 国产精品一区二区视频| 91视频一区二区| 欧美日韩久久一区| www国产精品av| 亚洲裸体xxx| 蜜桃视频一区二区| av动漫一区二区| 3atv在线一区二区三区| 国产精品无圣光一区二区| 图片区小说区国产精品视频| 成人一区在线看| 欧美男同性恋视频网站| 久久精品夜色噜噜亚洲a∨| 亚洲成人资源在线| 国产一区二区三区黄视频| 欧美男男青年gay1069videost| 国产亚洲综合性久久久影院| 视频一区欧美日韩| 成人精品小蝌蚪| 精品国产亚洲一区二区三区在线观看| 中文字幕一区二区在线观看| 激情亚洲综合在线| 欧美日韩另类国产亚洲欧美一级| 国产精品伦一区二区三级视频| 强制捆绑调教一区二区| 欧美三区在线观看| 一区二区三区免费观看| 成人免费黄色大片| 欧美国产欧美综合| 国产一区二区三区蝌蚪| 日韩免费电影网站| 日韩黄色免费电影| 欧美色图片你懂的| 亚洲曰韩产成在线| 99国产精品一区| 日韩毛片在线免费观看| 国产精品一色哟哟哟| 国产日韩影视精品| 国产精品456露脸| 久久久久九九视频| 国产麻豆视频一区| 国产亚洲综合av| 高清成人免费视频| 久久精品在这里| 国产黄色91视频| 亚洲精品一区二区三区香蕉| 久久精品国产999大香线蕉| 精品久久久久一区| 精品中文av资源站在线观看| 制服丝袜激情欧洲亚洲| 蜜臀av性久久久久av蜜臀妖精| 欧美最新大片在线看| 亚洲国产精品久久不卡毛片 | 日本乱人伦一区| 久久精品免费在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 91高清在线观看| 亚洲卡通动漫在线| 欧美日韩免费观看一区三区| 免费成人在线观看视频| 久久久精品国产免大香伊| 国产999精品久久| 日韩美女视频一区| 91精品午夜视频| 国产在线一区二区综合免费视频| 国产日本欧洲亚洲| 久久久久久一二三区| 免费黄网站欧美| 精品国产乱码久久久久久影片| 久久精品国产亚洲5555| 国产欧美日韩在线| 一本大道久久a久久综合婷婷| 亚洲成av人综合在线观看| 日韩一区二区三区观看| 成人免费高清视频在线观看| 一区二区激情小说| 日韩欧美中文一区| 91啪九色porn原创视频在线观看| 五月婷婷另类国产| 亚洲国产高清aⅴ视频| 欧美婷婷六月丁香综合色| 久久www免费人成看片高清| 国产精品嫩草久久久久| 欧美一级午夜免费电影| 成人app在线| 精品一区二区三区在线观看国产 | 成人午夜看片网址| 亚洲制服丝袜一区| 国产精品伦理在线| 欧美一区二区播放| 91黄色激情网站| 成人动漫一区二区| 精品综合久久久久久8888| 亚洲地区一二三色| 亚洲人成在线播放网站岛国| 精品日韩在线一区| 91国偷自产一区二区三区观看| 国产美女精品在线| 日韩中文字幕av电影| 成人免费一区二区三区视频| 精品国产自在久精品国产| 欧美日韩你懂得| 日本高清不卡视频| 成+人+亚洲+综合天堂| 久久国产麻豆精品| 日韩中文字幕麻豆| 亚洲欧美日韩综合aⅴ视频| 国产欧美中文在线| 久久精品亚洲精品国产欧美kt∨| 日韩美女在线视频| 91精品国产手机| 精品视频在线看| 欧美色男人天堂| 精品视频一区三区九区| 欧美日韩在线三级| 在线观看91视频| 欧美性受xxxx黑人xyx性爽| 91国产免费观看| 欧美性大战久久| 欧美撒尿777hd撒尿| 欧美日韩在线观看一区二区| 色素色在线综合| 欧美在线观看禁18| 在线电影欧美成精品| 51精品视频一区二区三区| 91精品国产综合久久香蕉麻豆| 欧美伦理影视网| 欧美一级黄色片| 日韩视频一区二区三区在线播放| 日韩免费在线观看| 国产农村妇女精品| 亚洲日韩欧美一区二区在线| 欧美一级艳片视频免费观看| 欧美成人精品二区三区99精品| 欧美无砖砖区免费| 99久久伊人网影院| 99亚偷拍自图区亚洲| 色吧成人激情小说| 欧美日韩一卡二卡| 日韩欧美一级二级三级久久久| 精品久久久久久综合日本欧美| 久久午夜羞羞影院免费观看| 国产精品天干天干在观线| 亚洲青青青在线视频| 午夜精品久久久久久久99樱桃| 免费看精品久久片| 成人激情小说网站| 777久久久精品| 久久只精品国产| 亚洲黄网站在线观看| 日本最新不卡在线| 粗大黑人巨茎大战欧美成人| 欧美少妇性性性| 久久美女高清视频| 亚洲一区在线观看视频| 久久99精品网久久| 91在线视频18| 日韩视频123| 亚洲同性gay激情无套| 强制捆绑调教一区二区| 91亚洲大成网污www| 欧美r级电影在线观看| 亚洲欧美电影院| 久久91精品国产91久久小草| 色婷婷一区二区三区四区| 欧美xxxxx牲另类人与| 亚洲一区日韩精品中文字幕| 国产iv一区二区三区|