{"id":95751,"date":"2026-08-26T20:40:51","date_gmt":"2026-08-26T12:40:51","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/95751.html"},"modified":"2026-08-26T20:40:51","modified_gmt":"2026-08-26T12:40:51","slug":"stm32f103-i2c-%e5%ae%9e%e6%88%98%ef%bc%9aat24c02-eeprom-%e8%af%bb%e5%86%99%e5%85%a8%e6%b5%81%e7%a8%8b%e6%8b%86%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/95751.html","title":{"rendered":"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3"},"content":{"rendered":"<p>\u8c03\u8bd5\u8bb0\u5f55\u4eea\u53c2\u6570\u6389\u7535\u5c31\u4e22&#xff1f;\u6821\u51c6\u503c\u6bcf\u6b21\u4e0a\u7535\u90fd\u8981\u91cd\u8bbe&#xff1f;I2C \u53ea\u6709\u4e24\u6839\u7ebf&#xff0c;\u5374\u8ba9\u65e0\u6570\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u5361\u5728\u8d77\u59cb\u6761\u4ef6\u3001\u5e94\u7b54\u7b49\u5f85\u548c BUSY \u6b7b\u9501\u4e0a\u3002\u672c\u6587\u7528\u4e00\u4e2a\u6210\u719f\u6848\u4f8b\u2014\u2014STM32F103 \u786c\u4ef6 I2C1 &#043; AT24C02 \u8bfb\u5199\u5168\u6d41\u7a0b&#xff0c;\u62c6\u89e3\u4ece\u603b\u7ebf\u65f6\u5e8f\u5230 SPL \u4e8b\u4ef6\u7b49\u5f85\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282&#xff0c;\u5e76\u9644\u4e0a 6 \u6761\u5b9e\u6218\u907f\u5751\u6e05\u5355\u3002<\/p>\n<p>\u4f60\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\u5417&#xff1f;\u8bbe\u5907\u65ad\u7535\u91cd\u542f&#xff0c;\u8f9b\u8f9b\u82e6\u82e6\u6807\u5b9a\u7684\u6821\u51c6\u503c\u5168\u90e8\u5f52\u96f6\u3002\u6216\u8005\u66f4\u5934\u75bc\u7684\u2014\u2014I2C \u603b\u7ebf\u83ab\u540d\u5176\u5999\u5361\u6b7b&#xff0c;while \u5faa\u73af\u6b7b\u7b49&#xff0c;\u770b\u95e8\u72d7\u590d\u4f4d\u90fd\u6551\u4e0d\u56de\u6765\u3002<\/p>\n<p>I2C \u53ea\u6709 SDA \u548c SCL \u4e24\u6839\u7ebf&#xff0c;\u770b\u8d77\u6765\u7b80\u5355&#xff0c;\u771f\u6b63\u8c03\u8d77\u6765\u5374\u5904\u5904\u662f\u5751\u3002\u8d77\u59cb\u505c\u6b62\u65f6\u5e8f\u3001\u5e94\u7b54\u673a\u5236\u3001\u4e8b\u4ef6\u6807\u5fd7\u4f4d\u3001BUSY \u9501\u6b7b\u2026\u2026\u6bcf\u4e2a\u73af\u8282\u90fd\u6709\u8bb2\u7a76\u3002<\/p>\n<p>\u4eca\u5929\u4e0d\u804a\u7406\u8bba&#xff0c;\u76f4\u63a5\u62c6\u4e00\u4e2a\u6210\u719f\u6848\u4f8b&#xff1a;STM32F103 \u786c\u4ef6 I2C1 &#043; AT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u3002\u4ece\u786c\u4ef6\u63a5\u6cd5\u5230\u5bc4\u5b58\u5668\u914d\u7f6e&#xff0c;\u4ece\u5355\u5b57\u8282\u5199\u5230\u8de8\u9875\u8bfb&#xff0c;\u6700\u540e\u7ed9\u4f60\u4e00\u4efd\u80fd\u76f4\u63a5\u6284\u7684\u907f\u5751\u6e05\u5355\u3002<\/p>\n<h3>01 \u6848\u4f8b&#xff1a;\u4e3a\u4ec0\u4e48\u662f I2C &#043; AT24C02<\/h3>\n<p>\u5148\u770b\u5e94\u7528\u573a\u666f\u3002\u4e00\u53f0\u5de5\u4e1a\u8bbe\u5907&#xff0c;\u6bcf\u6b21\u4e0a\u7535\u9700\u8981\u8bfb\u53d6\u4e0a\u6b21\u4fdd\u5b58\u7684\u914d\u7f6e\u53c2\u6570\u2014\u2014\u6821\u51c6\u7cfb\u6570\u3001\u8fd0\u884c\u8ba1\u6570\u5668\u3001\u7528\u6237\u8bbe\u7f6e\u3002\u8fd9\u4e9b\u6570\u636e\u5fc5\u987b\u6389\u7535\u4e0d\u4e22&#xff0c;\u4f46 STM32F103 \u5185\u90e8 Flash \u64e6\u5199\u6b21\u6570\u6709\u9650&#xff08;\u7ea6 1 \u4e07\u6b21&#xff09;&#xff0c;\u9891\u7e41\u6539\u5199\u4e0d\u73b0\u5b9e\u3002<\/p>\n<p>AT24C02 \u5c31\u662f\u4e3a\u8fd9\u79cd\u573a\u666f\u8bbe\u8ba1\u7684&#xff1a;2Kbit &#061; 256 \u5b57\u8282&#xff0c;\u5730\u5740\u8303\u56f4 0x00~0xFF&#xff0c;\u652f\u6301 100 \u4e07\u6b21\u64e6\u5199&#xff0c;\u6570\u636e\u53ef\u4fdd\u5b58 100 \u5e74\u3002\u5173\u952e\u662f\u5b83\u53ea\u6709 8 \u4e2a\u5f15\u811a&#xff0c;\u901a\u8fc7\u4e24\u6839\u7ebf&#xff08;SDA &#043; SCL&#xff09;\u5c31\u80fd\u901a\u4fe1\u3002<\/p>\n<p>\u603b\u7ebf\u7ed3\u6784\u4e5f\u7b80\u5355&#xff1a;STM32 \u4f5c\u4e3a\u4e3b\u673a&#xff0c;AT24C02 \u4f5c\u4e3a\u4ece\u673a&#xff0c;\u4e24\u6839\u7ebf\u4e0a\u5404\u6302\u4e00\u4e2a\u4e0a\u62c9\u7535\u963b\u3002\u591a\u4ece\u673a\u573a\u666f\u4e0b&#xff0c;\u6bcf\u4e2a\u4ece\u673a\u9760 7 \u4f4d\u5730\u5740\u533a\u5206\u2014\u2014AT24C02 \u7684\u5730\u5740\u662f 1010 A2 A1 A0&#xff0c;\u5f53 A0\/A1\/A2 \u5168\u90e8\u63a5\u5730\u65f6&#xff0c;7 \u4f4d\u5730\u5740\u4e3a 0x50&#xff0c;\u5199\u5730\u5740 0xA0&#xff0c;\u8bfb\u5730\u5740 0xA1\u3002<\/p>\n<p>\u5730\u5740\u4f4d A2\/A1\/A0 \u5c31\u662f\u82af\u7247\u7684 3 \u4e2a\u786c\u4ef6\u5f15\u811a&#xff1a;\u4e00\u6761\u603b\u7ebf\u4e0a\u6700\u591a\u6302 8 \u9897 AT24C02&#xff08;\u5730\u5740 0x50~0x57&#xff09;&#xff0c;\u9760\u5f15\u811a\u7535\u5e73\u533a\u5206\u3002\u6ce8\u610f AT24C02 \u7684\u5b58\u50a8\u5730\u5740\u53ea\u6709 1 \u5b57\u8282&#xff08;0x00~0xFF&#xff09;&#xff0c;\u800c AT24C16 \u4ee5\u4e0a\u7684\u5927\u5bb9\u91cf\u578b\u53f7\u9700\u8981 2 \u5b57\u8282\u5730\u5740\u2014\u2014\u4ee3\u7801\u91cc\u901a\u5e38\u7528 EE_TYPE \u533a\u5206&#xff0c;\u5199\u5730\u5740\u65f6\u5206\u652f\u5904\u7406\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124040-6a8edec8967b1.png\" alt=\"\u7ed3\u6784\u56fe\uff1aSTM32 \u4e3b\u673a\u901a\u8fc7 SDA\/SCL \u603b\u7ebf\u8fde\u63a5 AT24C02 \u4ece\u673a\uff0c\u4e24\u6839\u7ebf\u4e0a\u5404\u63a5 4.7k \u4e0a\u62c9\u7535\u963b\uff0c\u6807\u6ce8 7 \u4f4d\u5730\u5740 0x50\" \/><\/p>\n<h3>02 \u786c\u4ef6\u4e0e\u65f6\u949f&#xff1a;\u4e24\u6839\u7ebf\u7684\u6b63\u786e\u63a5\u6cd5<\/h3>\n<p>\u5148\u786e\u8ba4\u5f15\u811a\u3002F103 \u4e0a I2C1 \u53ef\u4ee5\u6620\u5c04\u5230 PB6(SCL) \/ PB7(SDA)&#xff08;\u4e5f\u53ef\u590d\u7528 PB8\/PB9&#xff0c;\u4f46 PB6\/PB7 \u6700\u5e38\u7528&#xff09;\u3002\u6ce8\u610f&#xff0c;I2C \u5f15\u811a\u8981\u914d\u7f6e\u4e3a\u590d\u7528\u5f00\u6f0f GPIO_Mode_AF_OD&#xff0c;\u4e0d\u662f\u63a8\u633d\u8f93\u51fa\u3002<\/p>\n<p>\u4e0a\u62c9\u7535\u963b\u9009\u591a\u5927&#xff1f;\u5178\u578b\u503c 4.7k\u03a9\u3002\u6211\u8e29\u8fc7\u4e00\u4e2a\u5751&#xff1a;\u67d0\u5757\u677f\u5b50\u7528 10k \u4e0a\u62c9&#xff0c;\u603b\u7ebf\u8d1f\u8f7d\u7a0d\u91cd\u5c31\u51fa\u73b0\u5076\u53d1\u901a\u4fe1\u5931\u8d25&#xff0c;\u6362\u6210 4.7k \u540e\u4e00\u5207\u6b63\u5e38\u3002\u5982\u679c\u4f60\u9047\u5230 I2C \u65f6\u597d\u65f6\u574f&#xff0c;\u5148\u68c0\u67e5\u4e0a\u62c9\u3002<\/p>\n<p>\u65f6\u949f\u914d\u7f6e\u8981\u770b\u6e05&#xff1a;I2C1 \u6302\u5728 APB1 \u4e0a&#xff08;PCLK1 &#061; 36MHz&#xff09;&#xff0c;\u4e0d\u662f APB2\u3002\u522b\u5f00\u9519\u65f6\u949f&#xff0c;\u8fd9\u662f\u65b0\u624b\u6700\u5e38\u89c1\u7684\u4f4e\u7ea7\u9519\u8bef\u3002\u60f3\u60f3\u4e0a\u7bc7 USART1 \u4e3a\u4ec0\u4e48\u662f 72MHz\u2014\u2014USART1 \u6302 APB2&#xff0c;I2C1 \u6302 APB1&#xff0c;\u4e24\u6761\u603b\u7ebf\u7684\u65f6\u949f\u4e0a\u9650\u4e0d\u540c&#xff0c;\u5916\u8bbe\u5f52\u5c5e\u8981\u67e5\u6570\u636e\u624b\u518c&#xff0c;\u4e0d\u80fd\u9760\u731c\u3002<\/p>\n<p>\u6ce2\u7279\u7387\u8ba1\u7b97&#xff08;\u6807\u51c6\u6a21\u5f0f 100kHz&#xff09;&#xff1a;<\/p>\n<p>CCR &#061; PCLK1 \/ (2 \u00d7 fSCL) &#061; 36M \/ (2 \u00d7 100k) &#061; 180<\/p>\n<p>CR2 \u7684 FREQ \u5b57\u6bb5\u8bbe\u4e3a 36&#xff08;\u5bf9\u5e94 36MHz&#xff09;&#xff0c;TRISE \u8bbe\u4e3a 37&#xff08;&#061; 1000ns \/ (1\/36MHz) &#043; 1&#xff09;\u3002\u7528\u6807\u51c6\u5916\u8bbe\u5e93\u7684\u8bdd&#xff0c;I2C_ClockSpeed &#061; 100000 \u65f6\u8fd9\u4e9b\u53c2\u6570\u5185\u90e8\u81ea\u52a8\u7b97\u597d&#xff0c;\u4e0d\u7528\u624b\u52a8\u586b\u3002<\/p>\n<p>\u5982\u679c\u8981\u8dd1\u5feb\u901f\u6a21\u5f0f&#xff08;400kHz&#xff09;&#xff0c;\u8fd8\u9700\u8981\u914d\u7f6e I2C_DutyCycle\u2014\u2014\u6807\u51c6\u6a21\u5f0f\u9ad8\u4f4e\u7535\u5e73\u56fa\u5b9a 1:1&#xff0c;\u5feb\u901f\u6a21\u5f0f\u53ef\u914d 16:9 \u6216 2:1&#xff0c;\u4e14 CCR \u7684\u7b97\u6cd5\u4e0d\u540c&#xff08;\u5feb\u901f\u6a21\u5f0f\u8981\u8003\u8651\u5360\u7a7a\u6bd4\u7cfb\u6570&#xff09;\u3002\u6807\u51c6\u5916\u8bbe\u5e93\u5728\u5feb\u901f\u6a21\u5f0f\u4e0b\u66fe\u6709\u8fc7\u5206\u9891 Bug \u7684\u5386\u53f2&#xff0c;\u5b9e\u6d4b\u9891\u7387\u4f1a\u504f\u5feb\u2014\u2014\u6c42\u7a33\u7684\u8bdd&#xff0c;EEPROM \u8fd9\u7c7b\u5e94\u7528 100kHz \u5b8c\u5168\u591f\u7528&#xff0c;\u4e0d\u7528\u8ffd\u6c42 400kHz\u3002<\/p>\n<p>\u65f6\u5e8f\u8c03\u4e0d\u901a\u65f6&#xff0c;\u793a\u6ce2\u5668\u662f\u6700\u7ec8\u88c1\u5224&#xff1a;\u8d77\u59cb\/\u505c\u6b62\u6cbf\u3001\u7b2c 9 \u4e2a\u65f6\u949f\u7684 ACK \u4f4d\u3001SCL \u9891\u7387&#xff0c;\u4e00\u770b\u4fbf\u77e5\u3002\u6ca1\u6709\u793a\u6ce2\u5668&#xff0c;\u5341\u51e0\u5757\u7684 USB \u903b\u8f91\u5206\u6790\u4eea\u4e5f\u591f\u7528\u2014\u2014I2C \u662f\u4f4e\u901f\u534f\u8bae&#xff0c;\u6293\u4e00\u6b21\u5b8c\u6574\u901a\u4fe1\u5c31\u80fd\u770b\u6e05\u4e8b\u4ef6\u987a\u5e8f&#xff0c;\u6392\u67e5\u6548\u7387\u7ffb\u500d\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124042-6a8edeca6b87e.png\" alt=\"\u7ed3\u6784\u56fe\uff1aPB6\/PB7 \u5f15\u811a\u590d\u7528\u5f00\u6f0f\u63a5\u6cd5\uff0cI2C1 \u6302 APB1 \u603b\u7ebf 36MHz\uff0c\u6807\u6ce8 CCR=180 \u8ba1\u7b97\u8fc7\u7a0b\" \/><\/p>\n<h3>03 \u521d\u59cb\u5316&#xff1a;\u4e09\u6b65\u8d70<\/h3>\n<p>\u521d\u59cb\u5316\u6d41\u7a0b\u5206\u4e09\u6b65&#xff1a;\u5f00\u65f6\u949f\u3001\u914d GPIO\u3001\u914d I2C \u5916\u8bbe\u3002<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">I2C1_Init<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">void<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    GPIO_InitTypeDef GPIO_InitStructure<span class=\"token punctuation\">;<\/span><br \/>\n    I2C_InitTypeDef I2C_InitStructure<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 1. \u5f00\u542f\u65f6\u949f&#xff1a;I2C1 \u5728 APB1&#xff0c;GPIOB \u5728 APB2<\/span><br \/>\n    <span class=\"token function\">RCC_APB1PeriphClockCmd<\/span><span class=\"token punctuation\">(<\/span>RCC_APB1Periph_I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">RCC_APB2PeriphClockCmd<\/span><span class=\"token punctuation\">(<\/span>RCC_APB2Periph_GPIOB<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 2. \u914d\u7f6e PB6\/PB7 \u4e3a\u590d\u7528\u5f00\u6f0f<\/span><br \/>\n    GPIO_InitStructure<span class=\"token punctuation\">.<\/span>GPIO_Pin <span class=\"token operator\">&#061;<\/span> GPIO_Pin_6 <span class=\"token operator\">|<\/span> GPIO_Pin_7<span class=\"token punctuation\">;<\/span><br \/>\n    GPIO_InitStructure<span class=\"token punctuation\">.<\/span>GPIO_Mode <span class=\"token operator\">&#061;<\/span> GPIO_Mode_AF_OD<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u590d\u7528\u5f00\u6f0f<\/span><br \/>\n    GPIO_InitStructure<span class=\"token punctuation\">.<\/span>GPIO_Speed <span class=\"token operator\">&#061;<\/span> GPIO_Speed_50MHz<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">GPIO_Init<\/span><span class=\"token punctuation\">(<\/span>GPIOB<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>GPIO_InitStructure<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 3. \u914d\u7f6e I2C1 \u5916\u8bbe<\/span><br \/>\n    I2C_InitStructure<span class=\"token punctuation\">.<\/span>I2C_Mode <span class=\"token operator\">&#061;<\/span> I2C_Mode_I2C<span class=\"token punctuation\">;<\/span><br \/>\n    I2C_InitStructure<span class=\"token punctuation\">.<\/span>I2C_DutyCycle <span class=\"token operator\">&#061;<\/span> I2C_DutyCycle_2<span class=\"token punctuation\">;<\/span><br \/>\n    I2C_InitStructure<span class=\"token punctuation\">.<\/span>I2C_ClockSpeed <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">100000<\/span><span class=\"token punctuation\">;<\/span>       <span class=\"token comment\">\/\/ 100kHz \u6807\u51c6\u6a21\u5f0f<\/span><br \/>\n    I2C_InitStructure<span class=\"token punctuation\">.<\/span>I2C_Ack <span class=\"token operator\">&#061;<\/span> I2C_Ack_Enable<span class=\"token punctuation\">;<\/span><br \/>\n    I2C_InitStructure<span class=\"token punctuation\">.<\/span>I2C_AcknowledgedAddress <span class=\"token operator\">&#061;<\/span> I2C_AcknowledgedAddress_7bit<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">I2C_Init<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">&amp;<\/span>I2C_InitStructure<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 4. \u4f7f\u80fd I2C1<\/span><br \/>\n    <span class=\"token function\">I2C_Cmd<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u6ce8\u610f\u4e24\u4e2a\u7ec6\u8282&#xff1a;I2C_Init \u53ea\u80fd\u5728 PE&#061;0&#xff08;\u5916\u8bbe\u672a\u4f7f\u80fd&#xff09;\u65f6\u8c03\u7528&#xff0c;\u6240\u4ee5\u5148 Init \u518d Cmd\u3002\u53e6\u5916 I2C_OwnAddress1 \u662f\u7ed9\u672c\u673a\u5f53\u4ece\u673a\u65f6\u7528\u7684\u5730\u5740&#xff0c;\u4e3b\u673a\u6a21\u5f0f\u4e0b\u7528\u4e0d\u5230&#xff0c;\u4f46\u7ed3\u6784\u4f53\u5b57\u6bb5\u5fc5\u987b\u8d4b\u503c&#xff08;\u6bd4\u5982 0x32&#xff09;&#xff0c;\u5e93\u51fd\u6570\u8981\u6c42\u6240\u6709\u5b57\u6bb5\u521d\u59cb\u5316\u5b8c\u6574\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124044-6a8edecc11839.png\" alt=\"\u6d41\u7a0b\u56fe\uff1a\u521d\u59cb\u5316\u4e09\u6b65\u2014\u2014\u5f00\u542f RCC \u65f6\u949f \u2192 \u914d\u7f6e GPIO \u590d\u7528\u5f00\u6f0f \u2192 \u914d\u7f6e I2C \u5916\u8bbe\u53c2\u6570 \u2192 \u4f7f\u80fd\u5916\u8bbe\" \/><\/p>\n<h3>04 \u5199\u6d41\u7a0b&#xff1a;\u4e00\u5b57\u8282\u7684\u5b8c\u6574\u65c5\u7a0b<\/h3>\n<p>\u5199\u4e00\u4e2a\u5b57\u8282\u5230 AT24C02&#xff0c;\u5b8c\u6574\u65f6\u5e8f\u662f&#xff1a;\u8d77\u59cb\u6761\u4ef6 \u2192 \u53d1\u9001 0xA0 \u7b49 ACK \u2192 \u53d1\u9001\u5b57\u5730\u5740\u7b49 ACK \u2192 \u53d1\u9001\u6570\u636e\u7b49 ACK \u2192 \u505c\u6b62\u6761\u4ef6\u3002<\/p>\n<p>\u5148\u628a\u534f\u8bae\u7684\u4e24\u4e2a\u57fa\u7840\u52a8\u4f5c\u8bf4\u6e05&#xff1a;\u8d77\u59cb\u6761\u4ef6\u662f SCL \u4e3a\u9ad8\u65f6 SDA \u7531\u9ad8\u53d8\u4f4e&#xff0c;\u505c\u6b62\u6761\u4ef6\u662f SCL \u4e3a\u9ad8\u65f6 SDA \u7531\u4f4e\u53d8\u9ad8\u3002**\u5e94\u7b54&#xff08;ACK&#xff09;**\u662f\u6bcf\u4e2a\u5b57\u8282\u7684\u7b2c 9 \u4e2a\u65f6\u949f\u8109\u51b2\u4e0a&#xff0c;\u63a5\u6536\u65b9\u628a SDA \u62c9\u4f4e\u2014\u2014\u4ece\u673a\u4e0d\u62c9\u4f4e\u5c31\u662f NACK&#xff0c;\u8868\u793a\u5b83\u6ca1\u6536\u5230\u6216\u4e0d\u60f3\u6536\u3002\u7406\u89e3\u8fd9\u4e09\u4e2a\u52a8\u4f5c&#xff0c;\u540e\u9762\u6240\u6709\u65f6\u5e8f\u90fd\u80fd\u770b\u61c2\u3002<\/p>\n<p>\u786c\u4ef6 I2C \u662f\u4e2a\u4e25\u683c\u72b6\u6001\u673a&#xff0c;SPL \u5e93\u7528\u4e8b\u4ef6\u6807\u5fd7\u4f4d\u5e2e\u4f60\u5224\u65ad\u72b6\u6001\u3002\u5199\u6d41\u7a0b\u6d89\u53ca 4 \u4e2a\u5173\u952e\u4e8b\u4ef6&#xff1a;<\/p>\n<ul>\n<li>EV5&#xff08;SB \u7f6e\u4f4d&#xff09;&#xff1a;\u8d77\u59cb\u6761\u4ef6\u5df2\u53d1\u9001<\/li>\n<li>EV6&#xff08;ADDR \u7f6e\u4f4d&#xff09;&#xff1a;\u5730\u5740\u5df2\u53d1\u51fa\u4e14\u6536\u5230\u5e94\u7b54&#xff0c;\u8fdb\u5165\u4e3b\u53d1\u9001\u6a21\u5f0f<\/li>\n<li>EV8&#xff08;TXE \u7f6e\u4f4d&#xff09;&#xff1a;\u6570\u636e\u5bc4\u5b58\u5668\u7a7a&#xff0c;\u53ef\u4ee5\u5199\u5165\u4e0b\u4e00\u4e2a\u5b57\u8282<\/li>\n<li>EV8_2&#xff08;BTF \u7f6e\u4f4d&#xff09;&#xff1a;\u6700\u540e\u4e00\u4e2a\u5b57\u8282\u53d1\u9001\u5b8c\u6210&#xff0c;\u53ef\u4ee5\u53d1\u505c\u6b62<\/li>\n<\/ul>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">AT24C02_WriteByte<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">uint8_t<\/span> addr<span class=\"token punctuation\">,<\/span> <span class=\"token class-name\">uint8_t<\/span> data<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ 1. \u53d1\u9001\u8d77\u59cb\u6761\u4ef6&#xff0c;\u7b49\u5f85 EV5<\/span><br \/>\n    <span class=\"token function\">I2C_GenerateSTART<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_MODE_SELECT<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 2. \u53d1\u9001\u8bbe\u5907\u5730\u5740&#xff08;\u5199&#xff09;&#xff0c;\u7b49\u5f85 EV6<\/span><br \/>\n    <span class=\"token function\">I2C_Send7bitAddress<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0x50<\/span><span class=\"token punctuation\">,<\/span> I2C_Direction_Transmitter<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 3. \u53d1\u9001\u5b57\u5730\u5740&#xff0c;\u7b49\u5f85 EV8<\/span><br \/>\n    <span class=\"token function\">I2C_SendData<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> addr<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_BYTE_TRANSMITTING<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 4. \u53d1\u9001\u6570\u636e&#xff0c;\u7b49\u5f85 EV8<\/span><br \/>\n    <span class=\"token function\">I2C_SendData<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> data<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_BYTE_TRANSMITTING<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 5. \u7b49\u5f85 EV8_2&#xff08;BTF&#xff09;&#xff0c;\u53d1\u9001\u505c\u6b62<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_BYTE_TRANSMITTED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">I2C_GenerateSTOP<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5199\u5b8c\u522b\u6025\u7740\u8bfb&#xff01;AT24C02 \u6536\u5230\u505c\u6b62\u6761\u4ef6\u540e\u8fdb\u5165\u5185\u90e8\u5199\u5468\u671f 5~10ms&#xff0c;\u671f\u95f4\u4ece\u673a\u4e0d\u5e94\u7b54\u3002\u8fde\u7eed\u5199\u5fc5\u987b\u7b49\u5b83\u5199\u5b8c&#xff0c;\u6807\u51c6\u505a\u6cd5\u662f\u8f6e\u8be2 ACK\u2014\u2014\u4e0d\u65ad\u53d1\u8d77\u59cb &#043; 0xA0&#xff0c;\u76f4\u5230\u4ece\u673a\u5e94\u7b54\u4e3a\u6b62&#xff08;\u771f\u5b9e\u9879\u76ee\u91cc\u5efa\u8bae\u52a0\u8d85\u65f6\u8ba1\u6570&#xff0c;\u4ece\u673a\u6302\u6b7b\u65f6\u522b\u6b7b\u7b49&#xff09;&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">EE_WaitReady<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">void<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">I2C_GenerateSTART<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_MODE_SELECT<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token function\">I2C_Send7bitAddress<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0x50<\/span><span class=\"token punctuation\">,<\/span> I2C_Direction_Transmitter<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token function\">I2C_GenerateSTOP<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u6536\u5230 ACK&#xff0c;\u5199\u5468\u671f\u7ed3\u675f<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8fd8\u6709\u4e00\u4e2a\u5927\u5751&#xff1a;\u9875\u5199\u8de8\u9875\u56de\u5377\u3002AT24C02 \u6bcf\u9875 8 \u5b57\u8282&#xff0c;\u8fde\u7eed\u5199\u8d85\u8fc7\u9875\u8fb9\u754c\u4f1a\u56de\u5377\u8986\u76d6\u9875\u9996\u3002\u5199\u591a\u5b57\u8282\u65f6\u5fc5\u987b\u6309\u9875\u8fb9\u754c\u5207\u5206&#xff0c;\u4e0d\u80fd\u4e00\u80a1\u8111\u5199\u2014\u2014\u6bd4\u5982\u4ece\u5730\u5740 5 \u5f00\u59cb\u5199 20 \u5b57\u8282&#xff0c;\u8981\u62c6\u6210 3&#043;8&#043;8&#043;1 \u56db\u6279&#xff1a;\u5148\u5199 5~7 \u586b\u6ee1\u9875\u9996&#xff0c;\u518d\u6574\u9875\u5199 8<sub>15\u300116<\/sub>23&#xff0c;\u6700\u540e\u5269 1 \u5b57\u8282\u5355\u72ec\u5199\u3002\u8fd9\u4e2a\u8fb9\u754c\u5224\u65ad\u5199\u9519&#xff0c;\u6570\u636e\u5c31\u6084\u6084\u9519\u4f4d&#xff0c;\u8fd8\u4e0d\u62a5\u9519\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124045-6a8edecda921e.png\" alt=\"\u65f6\u5e8f\u56fe\uff1a\u5199\u6d41\u7a0b\u5b8c\u6574\u65f6\u5e8f\u2014\u2014\u8d77\u59cb \u2192 0xA0+ACK \u2192 \u5b57\u5730\u5740+ACK \u2192 \u6570\u636e+ACK \u2192 \u505c\u6b62\uff0c\u6807\u6ce8 EV5\/EV6\/EV8\/EV8_2 \u4e8b\u4ef6\u4f4d\u7f6e\" \/><\/p>\n<h3>05 \u8bfb\u6d41\u7a0b&#xff1a;\u91cd\u590d\u8d77\u59cb\u7684\u9b54\u6cd5<\/h3>\n<p>\u8bfb\u64cd\u4f5c\u6bd4\u5199\u591a\u4e00\u4e2a\u5173\u952e\u6280\u5de7&#xff1a;\u4f2a\u5199\u5b9a\u4f4d\u3002\u5148\u6309\u5199\u5730\u5740\u628a\u5b57\u5730\u5740\u6307\u9488\u5b9a\u4f4d\u5230\u76ee\u6807\u4f4d\u7f6e&#xff0c;\u7136\u540e\u53d1\u91cd\u590d\u8d77\u59cb\u6761\u4ef6&#xff0c;\u5207\u6362\u4e3a\u8bfb\u6a21\u5f0f\u3002<\/p>\n<p>\u968f\u673a\u8bfb\u65f6\u5e8f&#xff1a;\u8d77\u59cb \u2192 0xA0 &#043; \u5b57\u5730\u5740&#xff08;\u4f2a\u5199&#xff09;\u2192 \u91cd\u590d\u8d77\u59cb \u2192 0xA1 \u2192 \u8bfb 1 \u5b57\u8282 \u2192 \u4e3b\u673a\u53d1 NACK \u2192 \u505c\u6b62\u3002<\/p>\n<p><span class=\"token class-name\">uint8_t<\/span> <span class=\"token function\">AT24C02_ReadByte<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">uint8_t<\/span> addr<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token class-name\">uint8_t<\/span> data<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 1. \u4f2a\u5199&#xff1a;\u5b9a\u4f4d\u5b57\u5730\u5740<\/span><br \/>\n    <span class=\"token function\">I2C_GenerateSTART<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_MODE_SELECT<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token function\">I2C_Send7bitAddress<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0x50<\/span><span class=\"token punctuation\">,<\/span> I2C_Direction_Transmitter<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token function\">I2C_SendData<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> addr<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_BYTE_TRANSMITTING<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 2. \u91cd\u590d\u8d77\u59cb&#xff0c;\u5207\u6362\u4e3a\u8bfb\u6a21\u5f0f<\/span><br \/>\n    <span class=\"token function\">I2C_GenerateSTART<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_MODE_SELECT<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token function\">I2C_Send7bitAddress<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0x50<\/span><span class=\"token punctuation\">,<\/span> I2C_Direction_Receiver<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_RECEIVER_MODE_SELECTED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 3. \u8bfb 1 \u5b57\u8282&#xff08;EV7&#xff1a;RXNE \u7f6e\u4f4d&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">I2C_CheckEvent<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> I2C_EVENT_MASTER_BYTE_RECEIVED<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    data <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">I2C_ReceiveData<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ 4. \u4e3b\u673a\u53d1 NACK &#043; \u505c\u6b62<\/span><br \/>\n    <span class=\"token function\">I2C_AcknowledgeConfig<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> DISABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">I2C_GenerateSTOP<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u6062\u590d ACK&#xff0c;\u4f9b\u540e\u7eed\u901a\u4fe1\u4f7f\u7528<\/span><br \/>\n    <span class=\"token function\">I2C_AcknowledgeConfig<\/span><span class=\"token punctuation\">(<\/span>I2C1<span class=\"token punctuation\">,<\/span> ENABLE<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> data<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u987a\u5e8f\u8bfb&#xff08;\u8fde\u7eed\u8bfb n \u5b57\u8282&#xff09;\u6709\u4e2a\u5173\u952e\u70b9&#xff1a;\u6700\u540e\u4e00\u4e2a\u5b57\u8282\u4e4b\u524d&#xff0c;\u4e3b\u673a\u5fc5\u987b\u53d1 NACK\u3002\u5426\u5219\u4ece\u673a\u4f1a\u8ba4\u4e3a\u4f60\u8fd8\u8981\u7ee7\u7eed\u8bfb&#xff0c;\u7ee7\u7eed\u8f93\u51fa\u6570\u636e\u3002AT24C02 \u5728\u9875\u5185\u4f1a\u81ea\u52a8\u5730\u5740 &#043;1&#xff0c;\u8de8\u9875\u5219\u56de\u5377\u3002<\/p>\n<p>\u6ce8\u610f ACK \u7684\u65b9\u5411\u662f\u53cd\u7684&#xff1a;\u5199\u6d41\u7a0b\u91cc\u662f\u4ece\u673a\u5e94\u7b54&#xff08;\u4e3b\u673a\u53d1\u5b57\u8282&#xff0c;\u4ece\u673a\u62c9\u4f4e SDA \u8868\u793a\u6536\u5230&#xff09;&#xff1b;\u8bfb\u6d41\u7a0b\u91cc\u662f\u4e3b\u673a\u5e94\u7b54&#xff08;\u4ece\u673a\u53d1\u5b57\u8282&#xff0c;\u4e3b\u673a\u62c9\u4f4e\u8868\u793a&#034;\u7ee7\u7eed&#034;\u3001\u62c9\u9ad8\u8868\u793a&#034;\u591f\u4e86&#034;&#xff09;\u3002\u8bfb\u6700\u540e\u4e00\u4e2a\u5b57\u8282\u524d\u628a I2C_AcknowledgeConfig \u5173\u6389&#xff0c;\u8bfb\u5b8c\u518d\u6062\u590d\u4f7f\u80fd\u3002<\/p>\n<p>\u8bfb\u6d41\u7a0b\u6d89\u53ca\u7684\u4e8b\u4ef6\u662f EV7&#xff08;RXNE \u7f6e\u4f4d&#xff09;&#xff0c;\u8868\u793a\u6570\u636e\u5bc4\u5b58\u5668\u5df2\u6536\u5230\u5b57\u8282\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124047-6a8edecf50640.png\" alt=\"\u65f6\u5e8f\u56fe\uff1a\u8bfb\u6d41\u7a0b\u5b8c\u6574\u65f6\u5e8f\u2014\u2014\u4f2a\u5199\u5b9a\u4f4d \u2192 \u91cd\u590d\u8d77\u59cb \u2192 0xA1+ACK \u2192 \u8bfb\u6570\u636e \u2192 \u4e3b\u673a NACK \u2192 \u505c\u6b62\" \/><\/p>\n<h3>06 \u907f\u5751\u6e05\u5355&#xff1a;6 \u4e2a\u8840\u6cea\u6559\u8bad<\/h3>\n<p>1. BUSY \u5361\u6b7b&#xff0c;\u6700\u9634\u7684\u5751<\/p>\n<p>\u603b\u7ebf\u6bdb\u523a\u6216\u5f02\u5e38\u65ad\u5f00\u4f1a\u5bfc\u81f4 SR2 \u7684 BUSY \u4f4d\u88ab\u9501\u5b9a&#xff0c;\u4e14\u53ea\u80fd\u7b49\u68c0\u6d4b\u5230\u505c\u6b62\u4f4d\u624d\u6e05\u9664\u3002\u6b64\u65f6\u4efb\u4f55\u64cd\u4f5c\u90fd\u65e0\u54cd\u5e94\u3002\u89e3\u6cd5&#xff1a;\u8f6f\u4ef6\u590d\u4f4d SWRST&#xff0c;\u6781\u7aef\u60c5\u51b5\u9700 GPIO \u6a21\u62df\u91ca\u653e\u603b\u7ebf\u540e\u518d\u590d\u4f4d\u3002<\/p>\n<p><span class=\"token comment\">\/\/ BUSY \u5361\u6b7b\u540e&#xff1a;\u5148\u8f6f\u4ef6\u590d\u4f4d&#xff0c;\u518d\u91cd\u65b0\u521d\u59cb\u5316<\/span><br \/>\nI2C1<span class=\"token operator\">-&gt;<\/span>CR1 <span class=\"token operator\">|&#061;<\/span> I2C_CR1_SWRST<span class=\"token punctuation\">;<\/span>   <span class=\"token comment\">\/\/ \u7f6e\u4f4d SWRST<\/span><br \/>\nI2C1<span class=\"token operator\">-&gt;<\/span>CR1 <span class=\"token operator\">&amp;&#061;<\/span> <span class=\"token operator\">~<\/span>I2C_CR1_SWRST<span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u6e05\u9664 SWRST&#xff0c;\u5916\u8bbe\u56de\u5230\u590d\u4f4d\u6001<\/span><br \/>\n<span class=\"token function\">I2C1_Init<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>                   <span class=\"token comment\">\/\/ \u91cd\u65b0\u8d70\u4e00\u904d\u521d\u59cb\u5316<\/span><\/p>\n<p>\u5173\u952e&#xff1a;\u6240\u6709 while \u7b49\u5f85\u5fc5\u987b\u52a0\u8d85\u65f6&#xff0c;\u5426\u5219\u4ece\u673a\u4e0d\u54cd\u5e94\u76f4\u63a5\u5361\u6b7b\u3002<\/p>\n<p>2. 7 \u4f4d\u5730\u5740\u522b\u5de6\u79fb<\/p>\n<p>I2C_Send7bitAddress \u76f4\u63a5\u4f20 0x50&#xff0c;\u5e93\u5185\u90e8\u4f1a\u5904\u7406\u8bfb\u5199\u4f4d\u3002\u4f60\u624b\u52a8\u5de6\u79fb\u4e00\u4f4d&#xff0c;\u4ece\u673a\u6839\u672c\u4e0d\u5e94\u7b54\u3002\u8fd9\u4e2a\u9519\u6211\u89c1\u8fc7\u4e0d\u4e0b\u4e94\u6b21\u3002<\/p>\n<p>3. \u9875\u5199\u8de8\u9875\u56de\u5377<\/p>\n<p>8 \u5b57\u8282\u9875\u8fb9\u754c&#xff0c;\u8d85\u8fc7\u5c31\u56de\u5377\u8986\u76d6\u3002\u5199\u8d85\u8fc7 8 \u5b57\u8282\u7684\u6570\u636e\u5fc5\u987b\u6309\u9875\u5207\u5206&#xff0c;\u9010\u9875\u5199\u5165\u3002<\/p>\n<p>4. \u5199\u5468\u671f\u7b49\u5f85\u4e0d\u80fd\u7701<\/p>\n<p>5~10ms \u5185\u90e8\u5199\u5468\u671f&#xff0c;\u671f\u95f4\u4ece\u673a\u4e0d\u5e94\u7b54\u3002\u4e0d\u7b49\u5f85\u5c31\u8fde\u7eed\u5199&#xff0c;\u4e22\u6570\u636e\u662f\u5fc5\u7136\u7684\u3002<\/p>\n<p>5. \u4e8b\u4ef6\u7b49\u5f85\u5fc5\u987b\u52a0\u8d85\u65f6<\/p>\n<p>while (I2C_CheckEvent(&#8230;)) \u6b7b\u7b49\u662f\u5143\u51f6\u3002\u52a0\u4e2a\u8d85\u65f6\u8ba1\u6570&#xff0c;\u8d85\u65f6\u540e\u62a5\u9519\u6062\u590d&#xff0c;\u522b\u8ba9\u7a0b\u5e8f\u5361\u6b7b\u5728 I2C \u4e0a\u3002<\/p>\n<p>6. \u4e0a\u62c9\u7535\u963b\u9009\u578b<\/p>\n<p>4.7k\u03a9 \u662f\u5178\u578b\u503c&#xff0c;\u8986\u76d6\u7edd\u5927\u591a\u6570\u573a\u666f\u300210k\u03a9 \u5728\u603b\u7ebf\u8d1f\u8f7d\u91cd\u6216\u8d70\u7ebf\u957f\u65f6\u6297\u5e72\u6270\u80fd\u529b\u5dee&#xff0c;\u5bb9\u6613\u51fa\u5076\u53d1\u95ee\u9898\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124048-6a8eded0ec413.png\" alt=\"\u7ed3\u6784\u56fe\uff1a\u516d\u5751\u5206\u7c7b\u603b\u7ed3\u2014\u2014\u603b\u7ebf\u6062\u590d\uff08BUSY\/SWRST\uff09\u3001\u5730\u5740\uff087\u4f4d\u5de6\u79fb\uff09\u3001\u9875\u5199\uff08\u8de8\u9875\u56de\u5377\uff09\u3001\u65f6\u5e8f\uff08\u5199\u5468\u671f\uff09\u3001\u4ee3\u7801\uff08\u8d85\u65f6\u4fdd\u62a4\uff09\u3001\u786c\u4ef6\uff08\u4e0a\u62c9\u7535\u963b\uff09\" \/><\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>I2C \u4e0d\u96be&#xff0c;\u96be\u5728\u7ec6\u8282\u3002\u8d77\u59cb\u505c\u6b62\u65f6\u5e8f\u3001\u5e94\u7b54\u65b9\u5411\u3001\u4e8b\u4ef6\u6807\u5fd7\u4f4d\u3001BUSY \u6062\u590d\u2014\u2014\u628a\u8fd9\u5957\u6d41\u7a0b\u5b8c\u6574\u8dd1\u901a\u4e00\u904d&#xff0c;\u4f60\u5bf9\u786c\u4ef6 I2C \u7684\u7406\u89e3\u4f1a\u4e0a\u4e00\u4e2a\u53f0\u9636\u3002<\/p>\n<p>\u6700\u540e\u7559\u4e2a\u95ee\u9898&#xff1a;\u5982\u679c\u4f60\u7684\u677f\u5b50 I2C \u603b\u7ebf\u5361\u6b7b\u4e86&#xff0c;\u4f60\u7684\u7b2c\u4e00\u53cd\u5e94\u662f\u67e5\u786c\u4ef6\u8fd8\u662f\u67e5\u8f6f\u4ef6&#xff1f;\u6b22\u8fce\u5728\u8bc4\u8bba\u533a\u804a\u804a\u4f60\u7684\u6392\u67e5\u601d\u8def\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8c03\u8bd5\u8bb0\u5f55\u4eea\u53c2\u6570\u6389\u7535\u5c31\u4e22&#xff1f;\u6821\u51c6\u503c\u6bcf\u6b21\u4e0a\u7535\u90fd\u8981\u91cd\u8bbe&#xff1f;I2C \u53ea\u6709\u4e24\u6839\u7ebf&#xff0c;\u5374\u8ba9\u65e0\u6570\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u5361\u5728\u8d77\u59cb\u6761\u4ef6\u3001\u5e94\u7b54\u7b49\u5f85\u548c BUSY \u6b7b\u9501\u4e0a\u3002\u672c\u6587\u7528\u4e00\u4e2a\u6210\u719f\u6848\u4f8b\u2014\u2014STM32F103 \u786c\u4ef6 I2C1  AT24C02 \u8bfb\u5199\u5168\u6d41\u7a0b&#xff0c;\u62c6\u89e3\u4ece\u603b\u7ebf\u65f6\u5e8f\u5230 SPL \u4e8b\u4ef6\u7b49\u5f85\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282&#xff0c;\u5e76\u9644\u4e0a 6 \u6761\u5b9e\u6218\u907f\u5751\u6e05\u5355\u3002\u4f60\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\u5417&#xff1f;\u8bbe\u5907\u65ad\u7535\u91cd\u542f&#xff0c;\u8f9b\u8f9b\u82e6\u82e6\u6807\u5b9a\u7684\u6821\u51c6\u503c\u5168\u90e8\u5f52\u96f6\u3002\u6216\u8005\u66f4\u5934\u75bc\u7684\u2014\u2014I2C<\/p>\n","protected":false},"author":2,"featured_media":95745,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10967,10187,10968,7675,217,219],"topic":[],"class_list":["post-95751","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-at24c02","tag-codingplan","tag-eeprom","tag-i2c","tag-stm32","tag-219"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/95751.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8c03\u8bd5\u8bb0\u5f55\u4eea\u53c2\u6570\u6389\u7535\u5c31\u4e22&#xff1f;\u6821\u51c6\u503c\u6bcf\u6b21\u4e0a\u7535\u90fd\u8981\u91cd\u8bbe&#xff1f;I2C \u53ea\u6709\u4e24\u6839\u7ebf&#xff0c;\u5374\u8ba9\u65e0\u6570\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u5361\u5728\u8d77\u59cb\u6761\u4ef6\u3001\u5e94\u7b54\u7b49\u5f85\u548c BUSY \u6b7b\u9501\u4e0a\u3002\u672c\u6587\u7528\u4e00\u4e2a\u6210\u719f\u6848\u4f8b\u2014\u2014STM32F103 \u786c\u4ef6 I2C1 AT24C02 \u8bfb\u5199\u5168\u6d41\u7a0b&#xff0c;\u62c6\u89e3\u4ece\u603b\u7ebf\u65f6\u5e8f\u5230 SPL \u4e8b\u4ef6\u7b49\u5f85\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282&#xff0c;\u5e76\u9644\u4e0a 6 \u6761\u5b9e\u6218\u907f\u5751\u6e05\u5355\u3002\u4f60\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\u5417&#xff1f;\u8bbe\u5907\u65ad\u7535\u91cd\u542f&#xff0c;\u8f9b\u8f9b\u82e6\u82e6\u6807\u5b9a\u7684\u6821\u51c6\u503c\u5168\u90e8\u5f52\u96f6\u3002\u6216\u8005\u66f4\u5934\u75bc\u7684\u2014\u2014I2C\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/95751.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-26T12:40:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124040-6a8edec8967b1.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/95751.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/95751.html\",\"name\":\"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-26T12:40:51+00:00\",\"dateModified\":\"2026-08-26T12:40:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/95751.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/95751.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/95751.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/95751.html","og_locale":"zh_CN","og_type":"article","og_title":"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8c03\u8bd5\u8bb0\u5f55\u4eea\u53c2\u6570\u6389\u7535\u5c31\u4e22&#xff1f;\u6821\u51c6\u503c\u6bcf\u6b21\u4e0a\u7535\u90fd\u8981\u91cd\u8bbe&#xff1f;I2C \u53ea\u6709\u4e24\u6839\u7ebf&#xff0c;\u5374\u8ba9\u65e0\u6570\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u5361\u5728\u8d77\u59cb\u6761\u4ef6\u3001\u5e94\u7b54\u7b49\u5f85\u548c BUSY \u6b7b\u9501\u4e0a\u3002\u672c\u6587\u7528\u4e00\u4e2a\u6210\u719f\u6848\u4f8b\u2014\u2014STM32F103 \u786c\u4ef6 I2C1 AT24C02 \u8bfb\u5199\u5168\u6d41\u7a0b&#xff0c;\u62c6\u89e3\u4ece\u603b\u7ebf\u65f6\u5e8f\u5230 SPL \u4e8b\u4ef6\u7b49\u5f85\u7684\u6bcf\u4e00\u4e2a\u7ec6\u8282&#xff0c;\u5e76\u9644\u4e0a 6 \u6761\u5b9e\u6218\u907f\u5751\u6e05\u5355\u3002\u4f60\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\u5417&#xff1f;\u8bbe\u5907\u65ad\u7535\u91cd\u542f&#xff0c;\u8f9b\u8f9b\u82e6\u82e6\u6807\u5b9a\u7684\u6821\u51c6\u503c\u5168\u90e8\u5f52\u96f6\u3002\u6216\u8005\u66f4\u5934\u75bc\u7684\u2014\u2014I2C","og_url":"https:\/\/www.wsisp.com\/helps\/95751.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-26T12:40:51+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260826124040-6a8edec8967b1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/95751.html","url":"https:\/\/www.wsisp.com\/helps\/95751.html","name":"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-26T12:40:51+00:00","dateModified":"2026-08-26T12:40:51+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/95751.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/95751.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/95751.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"STM32F103 I2C \u5b9e\u6218\uff1aAT24C02 EEPROM \u8bfb\u5199\u5168\u6d41\u7a0b\u62c6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/95751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=95751"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/95751\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/95745"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=95751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=95751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=95751"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=95751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}