{"id":101474,"date":"2026-09-06T22:09:00","date_gmt":"2026-09-06T14:09:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101474.html"},"modified":"2026-09-06T22:09:00","modified_gmt":"2026-09-06T14:09:00","slug":"%e5%b5%8c%e5%85%a5%e5%bc%8f%e9%80%9a%e4%bf%a1%e7%9a%84%e6%9c%ac%e8%b4%a8%ef%bc%9a%e4%bb%8e%e7%bf%bb-gpio%e5%88%b0%e5%86%99%e9%a9%b1%e5%8a%a8%ef%bc%8cuart-i2c-spi","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101474.html","title":{"rendered":"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f"},"content":{"rendered":"<h3>\u76ee\u5f55<\/h3>\n<ul>\n<li>\u4e00\u3001\u5f15\u5b50&#xff1a;\u4e3a\u4ec0\u4e48&#034;\u8f6f\u4ef6\u80fd\u6a21\u62df I2C&#034;&#xff1f;<\/li>\n<li>\u4e8c\u3001\u901a\u4fe1\u7684\u672c\u8d28&#xff1a;\u7535\u5e73 &#043; \u65f6\u95f4 &#061; \u534f\u8bae\n<ul>\n<li>2.1 \u4e00\u6839\u7ebf\u53ea\u6709 0 \u548c 1&#xff0c;\u610f\u4e49\u6765\u81ea&#034;\u4f55\u65f6\u53d8&#034;<\/li>\n<li>2.2 \u540c\u6b65\u4e0e\u5f02\u6b65&#xff1a;\u6709\u6ca1\u6709\u90a3\u6839\u65f6\u949f\u7ebf<\/li>\n<li>2.3 \u63a8\u633d\u3001\u5f00\u6f0f\u3001\u4e09\u6001&#xff1a;\u7535\u6c14\u5c42\u7684\u4e09\u79cd&#034;\u6027\u683c&#034;<\/li>\n<li>2.4 \u6211\u4eec\u770b\u5230\u7684\u5b57\u7b26&#xff0c;\u548c\u7ebf\u4e0a\u90a3\u4e32 0\/1 \u662f\u600e\u4e48\u5bf9\u5e94\u8d77\u6765\u7684&#xff1f;<\/li>\n<li>2.5 \u4e00\u5f20\u56fe\u770b\u61c2&#xff1a;\u5b57\u7b26 \u2192 \u4e8c\u8fdb\u5236 \u2192 \u7ebf\u4e0a\u7535\u5e73<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u4e09\u5927\u534f\u8bae\u4e00\u53e5\u8bdd\u5b9a\u6027\n<ul>\n<li>3.1 UART&#xff1a;\u5f02\u6b65\u3001\u70b9\u5bf9\u70b9\u3001\u4e24\u6839\u7ebf<\/li>\n<li>3.2 I2C&#xff1a;\u540c\u6b65\u3001\u534a\u53cc\u5de5\u3001\u591a\u8bbe\u5907\u3001\u4e24\u6839\u7ebf<\/li>\n<li>3.3 SPI&#xff1a;\u540c\u6b65\u3001\u5168\u53cc\u5de5\u3001\u56db\u6839\u7ebf\u3001\u6700\u5feb<\/li>\n<li>3.4 \u5bf9\u6bd4\u4e00\u89c8\u8868<\/li>\n<li>3.5 \u4e09\u5927\u534f\u8bae\u4e00\u56fe\u5bf9\u6bd4<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001\u786c\u4ef6\u5916\u8bbe vs \u8f6f\u4ef6\u6a21\u62df&#xff1a;\u6ce2\u5f62\u7531\u8c01\u4ea7\u751f&#xff1f;\n<ul>\n<li>4.1 \u786c\u4ef6\u5916\u8bbe&#xff1a;\u4e13\u7528\u7535\u8def\u81ea\u52a8\u53d1\u6ce2\u5f62<\/li>\n<li>4.2 \u8f6f\u4ef6\u6a21\u62df&#xff08;Bit-Banging&#xff09;&#xff1a;CPU \u624b\u5de5\u7ffb GPIO<\/li>\n<li>4.3 \u4e3a\u4ec0\u4e48 I2C\/SPI \u9002\u5408\u6a21\u62df&#xff0c;UART \u4e0d\u9002\u5408<\/li>\n<li>4.4 \u5de5\u7a0b\u9009\u578b&#xff1a;\u80fd\u7528\u786c\u4ef6\u5c31\u522b\u6a21\u62df<\/li>\n<li>4.5 \u786c\u4ef6\u5916\u8bbe vs \u8f6f\u4ef6\u6a21\u62df<\/li>\n<\/ul>\n<\/li>\n<li>\u4e94\u3001\u9a71\u52a8\u7684\u672c\u8d28&#xff1a;\u628a&#034;\u6211\u8981\u6570\u636e&#034;\u7ffb\u8bd1\u6210&#034;\u7ebf\u4e0a\u600e\u4e48\u52a8&#034;\n<ul>\n<li>5.1 \u9a71\u52a8 &#061; \u5206\u5c42\u7ffb\u8bd1\u5668<\/li>\n<li>5.2 \u4ee5 BMP280 \u53cc\u4f20\u611f\u5668\u4e3a\u4f8b\u7684\u56db\u5c42\u9a71\u52a8<\/li>\n<li>5.3 \u597d\u7684\u9a71\u52a8\u8ba9\u4e0a\u5c42&#034;\u5fd8\u4e86&#034;\u5e95\u5c42\u662f\u786c\u4ef6\u8fd8\u662f\u8f6f\u4ef6<\/li>\n<li>5.4 \u56db\u5c42\u9a71\u52a8\u4e00\u56fe\u770b\u61c2<\/li>\n<\/ul>\n<\/li>\n<li>\u516d\u3001CubeMX \u5de5\u7a0b\u914d\u7f6e\u5b9e\u6218&#xff08;STM32 \u4e3a\u4f8b&#xff09;\n<ul>\n<li>6.1 UART \u914d\u7f6e&#xff08;\u4ee5 USART3 \u63a5 ESP8266 \u4e3a\u4f8b&#xff09;<\/li>\n<li>6.2 I2C \u914d\u7f6e&#xff08;\u4ee5 I2C1 \u63a5\u53cc BMP280 \u4e3a\u4f8b&#xff09;<\/li>\n<li>6.3 SPI \u914d\u7f6e&#xff08;\u4ee5 SPI \u63a5 W25Q128 \u4e3a\u4f8b&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u4e03\u3001\u5e94\u7528\u573a\u666f\u4e0e\u9009\u578b\u51c6\u5219<\/li>\n<li>\u516b\u3001\u9ad8\u9891\u6392\u5751\u6307\u5357&#xff08;\u8840\u6cea\u7ecf\u9a8c&#xff09;\n<ul>\n<li>8.1 I2C \u8bfb\u4e0d\u5230\u5668\u4ef6<\/li>\n<li>8.2 I2C \u5730\u5740\u51b2\u7a81<\/li>\n<li>8.3 UART \u4e71\u7801<\/li>\n<li>8.4 SPI \u4e0d\u54cd\u5e94<\/li>\n<li>8.5 \u8f6f\u4ef6\u6a21\u62df I2C \u5076\u53d1\u5931\u8d25<\/li>\n<li>8.6 EEPROM \u5199\u540e\u7acb\u523b\u8bfb<\/li>\n<li>8.7 CubeMX \u751f\u6210\u4ee3\u7801\u540e\u5f15\u811a\u590d\u7528\u51b2\u7a81<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>\u6458\u8981<\/h3>\n<p>\u901a\u4fe1\u7684\u672c\u8d28&#xff0c;\u662f\u5728\u7ea6\u5b9a\u597d\u7684\u65f6\u95f4\u628a\u4e00\u6839\u7ebf\u62c9\u9ad8\u6216\u62c9\u4f4e\u3002UART\u3001I2C\u3001SPI \u770b\u4f3c\u5404\u5f02&#xff0c;\u5265\u5230\u6700\u5e95\u5c42\u90fd\u662f&#034;\u7535\u5e73&#043;\u65f6\u95f4&#034;\u7684\u6e38\u620f\u3002\u672c\u6587\u4ece&#034;\u4e3a\u4ec0\u4e48\u8f6f\u4ef6\u80fd\u6a21\u62df I2C&#034;\u8fd9\u4e2a\u6734\u7d20\u95ee\u9898\u51fa\u53d1&#xff0c;\u8bb2\u900f\u901a\u4fe1\u534f\u8bae\u7684\u672c\u8d28\u3001\u786c\u4ef6\u5916\u8bbe\u4e0e\u8f6f\u4ef6\u6a21\u62df\u7684\u53d6\u820d\u3001\u9a71\u52a8\u7684\u5206\u5c42\u672c\u8d28&#xff0c;\u5e76\u7ed3\u5408 STM32CubeMX \u7ed9\u51fa\u4e09\u5927\u534f\u8bae\u7684\u5de5\u7a0b\u914d\u7f6e\u6e05\u5355\u4e0e\u9ad8\u9891\u6392\u5751\u6307\u5357\u3002<\/p>\n<p>\u5173\u952e\u8bcd&#xff1a;\u5d4c\u5165\u5f0f\u901a\u4fe1\u3001UART\u3001I2C\u3001SPI\u3001CubeMX\u3001\u9a71\u52a8\u5206\u5c42\u3001\u5f00\u6f0f\u4e0a\u62c9\u3001\u6ce2\u7279\u7387\u3001CPOL\/CPHA<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u5f15\u5b50&#xff1a;\u4e3a\u4ec0\u4e48&#034;\u8f6f\u4ef6\u80fd\u6a21\u62df I2C&#034;&#xff1f;<\/h3>\n<p>\u901a\u4fe1&#xff0c;\u662f\u8fd9\u4e2a\u65f6\u4ee3\u6700\u5bb9\u6613\u88ab\u5ffd\u7565\u3001\u5374\u53c8\u6700\u4e0d\u53ef\u6216\u7f3a\u7684\u57fa\u7840\u8bbe\u65bd\u3002<\/p>\n<p>\u65e9\u4e0a\u4f60\u626b\u7801\u8fdb\u5730\u94c1&#xff0c;\u95f8\u673a\u5728\u96f6\u70b9\u51e0\u79d2\u5185\u5b8c\u6210\u4e86\u4e0e\u540e\u53f0\u670d\u52a1\u5668\u7684\u63e1\u624b&#xff1b;\u624b\u673a\u5237\u77ed\u89c6\u9891&#xff0c;\u6bcf\u4e00\u5e27\u753b\u9762\u90fd\u7ecf\u8fc7\u57fa\u7ad9\u3001\u5149\u7ea4\u3001CDN \u7684\u5c42\u5c42\u63a5\u529b&#xff1b;\u5c31\u8fde\u4f60\u624b\u91cc\u8fd9\u5757\u5f00\u53d1\u677f&#xff0c;\u4e5f\u8981\u9760 UART \u628a\u8c03\u8bd5\u4fe1\u606f\u5410\u5230\u7535\u8111\u5c4f\u5e55\u4e0a\u3002\u53ef\u4ee5\u8bf4&#xff0c;\u6ca1\u6709\u901a\u4fe1&#xff0c;\u5c31\u6ca1\u6709\u73b0\u4ee3\u751f\u6d3b&#xff0c;\u66f4\u6ca1\u6709\u73b0\u4ee3\u5de5\u4e1a\u3002<\/p>\n<p>\u800c\u5728\u5d4c\u5165\u5f0f\u4e16\u754c\u91cc&#xff0c;\u901a\u4fe1\u7684\u91cd\u8981\u6027\u88ab\u653e\u5f97\u66f4\u5927\u3002\u4e00\u4e2a\u667a\u80fd\u5bb6\u5c45\u7f51\u5173&#xff0c;\u8981\u540c\u65f6\u8ddf\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\u3001\u95e8\u9501\u3001\u6444\u50cf\u5934\u6253\u4ea4\u9053&#xff1b;\u4e00\u53f0\u533b\u7597\u8bbe\u5907&#xff0c;\u8981\u628a\u91c7\u96c6\u5230\u7684\u751f\u7406\u4fe1\u53f7\u5b9e\u65f6\u4f20\u7ed9\u4e0a\u4f4d\u673a&#xff1b;\u4e00\u8f86\u6c7d\u8f66\u91cc&#xff0c;\u51e0\u5341\u4e2a ECU \u901a\u8fc7 CAN \u603b\u7ebf\u534f\u540c\u5de5\u4f5c\u3002\u901a\u4fe1\u534f\u8bae&#xff0c;\u5c31\u662f\u8fd9\u4e9b\u8bbe\u5907\u4e4b\u95f4\u552f\u4e00\u7684&#034;\u8bed\u8a00&#034;\u2014\u2014\u534f\u8bae\u9009\u5f97\u5bf9\u4e0d\u5bf9\u3001\u9a71\u52a8\u5199\u5f97\u597d\u4e0d\u597d&#xff0c;\u76f4\u63a5\u51b3\u5b9a\u6574\u4e2a\u7cfb\u7edf\u80fd\u4e0d\u80fd\u7a33\u5b9a\u8dd1\u8d77\u6765\u3002<\/p>\n<p>\u4e5f\u6b63\u56e0\u4e3a\u5982\u6b64&#xff0c;\u7406\u89e3\u901a\u4fe1\u7684\u5e95\u5c42\u539f\u7406&#xff0c;\u624d\u4e0d\u662f\u4e00\u4e2a&#034;\u53ef\u9009\u9879&#034;&#xff0c;\u800c\u662f\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u7684\u5fc5\u4fee\u8bfe\u3002\u4eca\u5929\u8fd9\u7bc7\u6587\u7ae0&#xff0c;\u6211\u4eec\u5c31\u4ece\u6700\u6734\u7d20\u7684\u95ee\u9898\u51fa\u53d1&#xff0c;\u628a\u901a\u4fe1\u8fd9\u4ef6\u4e8b\u5f7b\u5e95\u8bb2\u900f\u3002<\/p>\n<hr \/>\n<p>\u5148\u8bb2\u4e00\u4e2a\u6211\u4eb2\u773c\u89c1\u8fc7\u7684\u573a\u666f\u3002<\/p>\n<p>\u65b0\u6765\u7684\u540c\u4e8b\u63a5\u624b\u4e00\u4e2a\u8001\u9879\u76ee&#xff0c;\u7ffb\u5230 bsp_iic.c&#xff0c;\u770b\u5230\u91cc\u9762\u5199\u7740&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">MyI2C_Start<\/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 function\">SDA_Write<\/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\">SCL_Write<\/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\">delay_us<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">SDA_Write<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">delay_us<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">SCL_Write<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4ed6\u6123\u4e86\u534a\u5929&#xff0c;\u8f6c\u5934\u95ee\u6211&#xff1a;\u201c\u8fd9\u4e5f\u53eb I2C&#xff1f;I2C \u4e0d\u662f STM32 \u7247\u4e0a\u7684\u4e00\u4e2a\u5916\u8bbe\u5417&#xff1f;\u201d<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u95ee\u5f97\u7279\u522b\u597d\u3002\u5b83\u6233\u4e2d\u4e86\u5f88\u591a\u5d4c\u5165\u5f0f\u5de5\u7a0b\u5e08\u5fc3\u91cc\u90a3\u4e2a\u6a21\u7cca\u7684\u89d2\u843d&#xff1a;\u534f\u8bae\u5230\u5e95\u662f\u786c\u4ef6&#xff0c;\u8fd8\u662f\u4e00\u4efd\u8bf4\u660e\u4e66&#xff1f;<\/p>\n<p>\u7b54\u6848\u662f&#xff1a;\u534f\u8bae\u4e0d\u662f\u786c\u4ef6&#xff0c;\u534f\u8bae\u662f\u4e00\u4efd&#034;\u7535\u5e73\u600e\u4e48\u53d8\u3001\u53d8\u591a\u5feb&#034;\u7684\u8bf4\u660e\u4e66\u3002CPU \u7ffb GPIO \u80fd\u62fc\u51fa\u6765&#xff0c;\u4e13\u7528\u7535\u8def\u4e5f\u80fd\u62fc\u51fa\u6765\u3002\u4e24\u8005\u53ea\u662f&#034;\u8c01\u6765\u6267\u884c\u8fd9\u4efd\u8bf4\u660e\u4e66&#034;\u7684\u533a\u522b\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0&#xff0c;\u6211\u4eec\u5c31\u4ece&#034;\u7535\u5e73 &#043; \u65f6\u95f4&#034;\u8fd9\u4e2a\u6700\u6734\u7d20\u7684\u89d2\u5ea6&#xff0c;\u628a UART\u3001I2C\u3001SPI \u4e09\u5927\u534f\u8bae\u3001\u786c\u4ef6\u5916\u8bbe\u4e0e\u8f6f\u4ef6\u6a21\u62df\u7684\u53d6\u820d\u3001\u9a71\u52a8\u7684\u5206\u5c42\u672c\u8d28\u4e00\u6b21\u8bb2\u900f&#xff0c;\u6700\u540e\u843d\u5230 STM32CubeMX \u7684\u5de5\u7a0b\u914d\u7f6e\u4e0e\u8840\u6cea\u6392\u5751\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u901a\u4fe1\u7684\u672c\u8d28&#xff1a;\u7535\u5e73 &#043; \u65f6\u95f4 &#061; \u534f\u8bae<\/h3>\n<h4>2.1 \u4e00\u6839\u7ebf\u53ea\u6709 0 \u548c 1&#xff0c;\u610f\u4e49\u6765\u81ea&#034;\u4f55\u65f6\u53d8&#034;<\/h4>\n<p>\u4e00\u6839\u5bfc\u7ebf&#xff0c;\u5728\u6570\u5b57\u4e16\u754c\u91cc\u53ea\u6709\u4e24\u79cd\u72b6\u6001&#xff1a;\u9ad8\u7535\u5e73&#xff08;1&#xff09;\u548c\u4f4e\u7535\u5e73&#xff08;0&#xff09;\u3002\u5355\u770b\u67d0\u4e00\u77ac\u95f4&#xff0c;\u8fd9\u6839\u7ebf\u4ec0\u4e48\u4fe1\u606f\u90fd\u8868\u8fbe\u4e0d\u4e86\u2014\u2014\u5b83\u53ea\u662f\u4e00\u4e2a\u7535\u5e73\u3002<\/p>\n<p>\u4fe1\u606f\u7684\u542b\u4e49&#xff0c;\u6765\u81ea\u65f6\u95f4\u8f74\u4e0a\u7684\u6392\u5217\u3002<\/p>\n<p>\u4e3e\u4e2a\u6700\u5c0f\u4f8b\u5b50\u3002\u6211\u8ddf\u4f60\u7ea6\u5b9a&#xff1a;<\/p>\n<p>\u7ebf\u62c9\u4f4e 10\u03bcs&#xff0c;\u518d\u62c9\u9ad8&#xff0c;\u8868\u793a&#034;START&#034;\u3002<\/p>\n<p>\u90a3\u4e48\u5f53\u6211\u5728\u67d0\u4e2a\u65f6\u523b\u628a\u7ebf\u62c9\u4f4e 10\u03bcs \u518d\u62c9\u9ad8&#xff0c;\u4f60\u5c31\u77e5\u9053&#xff1a;\u54e6&#xff0c;\u901a\u4fe1\u5f00\u59cb\u4e86\u3002<\/p>\n<p>\u518d\u7ea6\u5b9a&#xff1a;<\/p>\n<p>\u62c9\u4f4e 20\u03bcs \u8868\u793a&#034;0&#034;&#xff0c;\u62c9\u9ad8 20\u03bcs \u8868\u793a&#034;1&#034;\u3002<\/p>\n<p>\u4e8e\u662f\u8fd9\u6839\u7ebf\u5c31\u80fd\u4f20\u6570\u636e\u4e86\u3002<\/p>\n<p>\u4f60\u770b&#xff0c;\u6240\u8c13\u534f\u8bae&#xff0c;\u672c\u8d28\u5c31\u662f\u65f6\u5e8f &#043; \u7535\u5e73\u7684\u6392\u5217\u89c4\u5219\u30020 \u548c 1 \u672c\u8eab\u6ca1\u6709\u610f\u4e49&#xff0c;\u610f\u4e49\u6765\u81ea\u5b83\u4eec&#034;\u4ec0\u4e48\u65f6\u5019\u53d8\u3001\u53d8\u591a\u5feb\u3001\u6309\u4ec0\u4e48\u987a\u5e8f\u53d8&#034;\u3002<\/p>\n<p>&#x1f4a1; \u8fd9\u4e00\u53e5\u8bdd&#xff0c;\u662f\u7406\u89e3\u5168\u6587\u7684\u94a5\u5319\u3002\u540e\u9762\u6240\u6709\u534f\u8bae\u3001\u6240\u6709\u9a71\u52a8\u3001\u6240\u6709\u6392\u5751&#xff0c;\u90fd\u662f\u8fd9\u53e5\u8bdd\u7684\u5c55\u5f00\u3002<\/p>\n<h4>2.2 \u540c\u6b65\u4e0e\u5f02\u6b65&#xff1a;\u6709\u6ca1\u6709\u90a3\u6839\u65f6\u949f\u7ebf<\/h4>\n<p>\u901a\u4fe1\u53cc\u65b9\u8981\u8bfb\u61c2&#034;\u4f55\u65f6\u53d8&#034;&#xff0c;\u5c31\u5fc5\u987b\u6709\u4e00\u4e2a\u5171\u540c\u7684\u65f6\u95f4\u57fa\u51c6\u3002\u6839\u636e\u8fd9\u4e2a\u57fa\u51c6\u4ece\u54ea\u6765&#xff0c;\u901a\u4fe1\u5206\u6210\u4e24\u5927\u7c7b&#xff1a;<\/p>\n<ul>\n<li>\u540c\u6b65\u901a\u4fe1&#xff1a;\u53d1\u9001\u65b9\u989d\u5916\u62c9\u4e00\u6839\u65f6\u949f\u7ebf&#xff08;SCL \/ SCLK&#xff09;&#xff0c;\u544a\u8bc9\u63a5\u6536\u65b9&#034;\u6bcf\u4e2a\u65f6\u949f\u6cbf&#xff0c;\u4f60\u91c7\u6837\u4e00\u6b21&#034;\u3002I2C\u3001SPI \u90fd\u5c5e\u4e8e\u8fd9\u4e00\u7c7b\u3002<\/li>\n<li>\u5f02\u6b65\u901a\u4fe1&#xff1a;\u6ca1\u6709\u65f6\u949f\u7ebf&#xff0c;\u53cc\u65b9\u5404\u81ea\u6309\u7ea6\u5b9a\u7684\u6ce2\u7279\u7387&#xff08;\u6bcf\u79d2\u591a\u5c11\u4f4d&#xff09;\u786c\u5bf9\u9f50\u3002UART \u5c5e\u4e8e\u8fd9\u4e00\u7c7b\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e2a\u533a\u522b\u6781\u5176\u5173\u952e&#xff0c;\u5b83\u76f4\u63a5\u51b3\u5b9a\u4e86&#034;\u4e3a\u4ec0\u4e48 UART \u96be\u6a21\u62df\u3001I2C\/SPI \u597d\u6a21\u62df&#034;\u2014\u2014\u6211\u4eec\u5230\u7b2c\u56db\u7ae0\u7ec6\u8bb2\u3002<\/p>\n<h4>2.3 \u63a8\u633d\u3001\u5f00\u6f0f\u3001\u4e09\u6001&#xff1a;\u7535\u6c14\u5c42\u7684\u4e09\u79cd&#034;\u6027\u683c&#034;<\/h4>\n<p>\u534f\u8bae\u8dd1\u5728\u54ea\u6839\u7ebf\u4e0a&#xff0c;\u8fd8\u53d6\u51b3\u4e8e\u8fd9\u6839\u7ebf\u7684\u7535\u6c14\u7279\u6027\u3002\u4e09\u79cd\u6700\u5e38\u89c1\u7684\u8f93\u51fa\u7ed3\u6784&#xff1a;<\/p>\n<table>\n<tr>\u7c7b\u578b\u7279\u70b9\u5178\u578b\u5e94\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u63a8\u633d&#xff08;Push-Pull&#xff09;<\/td>\n<td>\u80fd\u4e3b\u52a8\u62c9\u9ad8\u3001\u4e5f\u80fd\u4e3b\u52a8\u62c9\u4f4e&#xff0c;\u9a71\u52a8\u80fd\u529b\u5f3a<\/td>\n<td>UART \u7684 TX\u3001SPI \u7684 MOSI\/MISO\/SCLK<\/td>\n<\/tr>\n<tr>\n<td>\u5f00\u6f0f&#xff08;Open-Drain&#xff09;<\/td>\n<td>\u53ea\u80fd\u4e3b\u52a8\u62c9\u4f4e&#xff0c;\u62c9\u9ad8\u9760\u5916\u90e8\u4e0a\u62c9\u7535\u963b<\/td>\n<td>I2C \u7684 SCL\/SDA&#xff08;\u5fc5\u987b\u4e0a\u62c9&#xff01;&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u4e09\u6001&#xff08;Tri-state&#xff09;<\/td>\n<td>\u53ef\u8f93\u51fa\u9ad8\/\u4f4e&#xff0c;\u4e5f\u53ef\u91ca\u653e\u4e3a\u9ad8\u963b<\/td>\n<td>SPI \u591a\u4ece\u673a\u5171\u4eab MISO \u65f6&#xff0c;\u672a\u9009\u4e2d\u7684\u4ece\u673a\u8f93\u51fa\u9ad8\u963b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u26a0\ufe0f \u5f00\u6f0f &#043; \u65e0\u4e0a\u62c9 &#061; \u603b\u7ebf\u6c38\u8fdc\u62c9\u4e0d\u9ad8\u3002\u8fd9\u662f I2C \u8bfb\u4e0d\u5230\u5668\u4ef6\u7684\u7b2c\u4e00\u5927\u5143\u51f6&#xff0c;\u7b2c\u516b\u7ae0\u6392\u5751\u4f1a\u91cd\u70b9\u8bb2\u3002<\/p>\n<hr \/>\n<h4>2.4 \u6211\u4eec\u770b\u5230\u7684\u5b57\u7b26&#xff0c;\u548c\u7ebf\u4e0a\u90a3\u4e32 0\/1 \u662f\u600e\u4e48\u5bf9\u5e94\u8d77\u6765\u7684&#xff1f;<\/h4>\n<p>\u524d\u9762\u8bb2\u4e86&#034;\u7535\u5e73 &#043; \u65f6\u95f4 &#061; \u534f\u8bae&#034;&#xff0c;\u4f46\u4f60\u53ef\u80fd\u8fd8\u6709\u4e00\u4e2a\u66f4\u6734\u7d20\u7684\u7591\u95ee&#xff1a;\u6211\u5728\u7535\u8111\u4e0a\u6572\u4e00\u4e2a\u5b57\u6bcd A&#xff0c;\u5b83\u600e\u4e48\u5c31\u6210\u4e86\u7ebf\u4e0a\u7684\u4e00\u4e32 0 \u548c 1&#xff1f;\u8fd9\u4e2d\u95f4\u5230\u5e95\u7ecf\u5386\u4e86\u4ec0\u4e48&#xff1f;<\/p>\n<p>\u7b54\u6848\u662f&#xff1a;\u9760\u4e00\u5f20&#034;\u7ffb\u8bd1\u8868&#034;\u2014\u2014\u5b57\u7b26\u7f16\u7801\u8868&#xff08;Character Encoding&#xff09;\u3002\u5b83\u89c4\u5b9a\u4e86&#034;\u54ea\u4e2a\u5b57\u7b26\u5bf9\u5e94\u54ea\u4e2a\u4e8c\u8fdb\u5236\u6570&#034;\u3002<\/p>\n<h5>2.4.1 \u5b57\u7b26\u7f16\u7801\u8868&#xff1a;\u5b57\u7b26 \u2194 \u4e8c\u8fdb\u5236\u6570\u7684&#034;\u5b57\u5178&#034;<\/h5>\n<p>\u6700\u7ecf\u5178\u7684\u662f ASCII \u7801&#xff08;American Standard Code for Information Interchange&#xff0c;\u7f8e\u56fd\u4fe1\u606f\u4ea4\u6362\u6807\u51c6\u4ee3\u7801&#xff09;\u3002\u5b83\u7528 7 \u4f4d\u4e8c\u8fdb\u5236&#xff08;0~127&#xff09;\u7ed9 128 \u4e2a\u5b57\u7b26\u7f16\u53f7&#xff1a;<\/p>\n<table>\n<tr>\u5b57\u7b26\u5341\u8fdb\u5236\u4e8c\u8fdb\u5236&#xff08;7\u4f4d&#xff09;\u5341\u516d\u8fdb\u5236<\/tr>\n<tbody>\n<tr>\n<td>A<\/td>\n<td>65<\/td>\n<td>1000001<\/td>\n<td>0x41<\/td>\n<\/tr>\n<tr>\n<td>B<\/td>\n<td>66<\/td>\n<td>1000010<\/td>\n<td>0x42<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>97<\/td>\n<td>1100001<\/td>\n<td>0x61<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>48<\/td>\n<td>0110000<\/td>\n<td>0x30<\/td>\n<\/tr>\n<tr>\n<td>\\\\n&#xff08;\u6362\u884c&#xff09;<\/td>\n<td>10<\/td>\n<td>0001010<\/td>\n<td>0x0A<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6240\u4ee5&#xff0c;\u5f53\u4f60\u5728\u4e32\u53e3\u52a9\u624b\u91cc\u53d1\u9001\u5b57\u7b26 A \u65f6&#xff0c;\u5b83\u5148\u88ab\u67e5\u8868\u7ffb\u8bd1\u6210\u4e8c\u8fdb\u5236 01000001&#xff08;\u5b9e\u9645\u4f20\u8f93\u5e38\u8865\u8db3 8 \u4f4d&#xff09;&#xff0c;\u7136\u540e\u8fd9 8 \u4e2a bit \u624d\u88ab UART \u6309\u6ce2\u7279\u7387\u4e00\u4f4d\u4e00\u4f4d\u5730\u53d8\u6210 TX \u5f15\u811a\u4e0a\u7684\u7535\u5e73\u53d8\u5316\u3002<\/p>\n<h5>2.4.2 \u8fd9\u5f20\u8868\u5b9a\u4e49\u5728\u54ea\u91cc&#xff1f;\u7531\u8c01\u5b8c\u6210\u7ffb\u8bd1&#xff1f;<\/h5>\n<ul>\n<li>\u5b9a\u4e49&#xff1a;ASCII \u8868\u662f\u56fd\u9645\u6807\u51c6&#xff0c;\u7531\u7f8e\u56fd\u56fd\u5bb6\u6807\u51c6\u5b66\u4f1a&#xff08;ANSI&#xff09;\u5236\u5b9a&#xff0c;\u540e\u6765\u88ab\u56fd\u9645\u6807\u51c6\u5316\u7ec4\u7ec7&#xff08;ISO&#xff09;\u91c7\u7eb3\u4e3a ISO\/IEC 646 \u6807\u51c6\u3002\u5b83\u4e0d\u4f9d\u8d56\u4efb\u4f55\u786c\u4ef6\u5382\u5546&#xff0c;\u662f\u5168\u4e16\u754c\u901a\u7528\u7684&#034;\u5b57\u5178&#034;\u3002<\/li>\n<li>\u7ffb\u8bd1\u6267\u884c\u8005&#xff1a;\u7ffb\u8bd1\u52a8\u4f5c\u53d1\u751f\u5728\u8f6f\u4ef6\u5c42&#xff0c;\u7531\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f &#043; \u64cd\u4f5c\u7cfb\u7edf &#043; \u7f16\u8bd1\u5668\/\u5e93\u5171\u540c\u5b8c\u6210\u3002\u6bd4\u5982\u4f60\u5728 C \u8bed\u8a00\u91cc\u5199 char c &#061; &#039;A&#039;;&#xff0c;\u7f16\u8bd1\u5668\u628a\u5b57\u7b26\u5b57\u9762\u91cf &#039;A&#039; \u76f4\u63a5\u7f16\u8bd1\u6210\u6570\u503c 65&#xff1b;\u4f60\u5728\u4e32\u53e3\u52a9\u624b\u91cc\u8f93\u5165 A&#xff0c;\u662f\u4e0a\u4f4d\u673a\u8f6f\u4ef6\u67e5\u8868\u628a\u5b83\u8f6c\u6210 0x41\u3002CPU \u548c UART \u5916\u8bbe\u672c\u8eab\u5b8c\u5168\u4e0d\u8ba4\u8bc6\u5b57\u7b26&#xff0c;\u5b83\u4eec\u53ea\u8ba4\u4e8c\u8fdb\u5236\u6570\u3002<\/li>\n<\/ul>\n<h5>2.4.3 \u4ece\u5b57\u7b26\u5230\u7ebf\u4e0a\u6ce2\u5f62\u7684\u5b8c\u6574\u94fe\u8def<\/h5>\n<p>\u4ee5 UART \u53d1\u9001\u4e00\u4e2a\u5b57\u7b26 A \u4e3a\u4f8b&#xff0c;\u5b8c\u6574\u6d41\u7a0b\u662f&#xff1a;<\/p>\n<p>\u4f60\u5728\u7535\u8111\u4e0a\u6572 &#039;A&#039;<br \/>\n        \u2193<br \/>\n\u2460 \u4e0a\u4f4d\u673a\u8f6f\u4ef6\u67e5 ASCII \u8868&#xff1a;&#039;A&#039; \u2192 0x41&#xff08;\u4e8c\u8fdb\u5236 01000001&#xff09;<br \/>\n        \u2193<br \/>\n\u2461 \u8f6f\u4ef6\u628a 0x41 \u5199\u5165 UART \u5916\u8bbe\u7684\u53d1\u9001\u6570\u636e\u5bc4\u5b58\u5668&#xff08;TDR&#xff09;<br \/>\n        \u2193<br \/>\n\u2462 UART \u5916\u8bbe\u786c\u4ef6\u81ea\u52a8\u52a0\u4e0a\u8d77\u59cb\u4f4d(0)\u3001\u53ef\u9009\u7684\u6821\u9a8c\u4f4d\u3001\u505c\u6b62\u4f4d(1)<br \/>\n        \u2193<br \/>\n\u2463 \u5916\u8bbe\u6309\u6ce2\u7279\u7387\u628a\u6bcf\u4e00\u4f4d\u4f9d\u6b21\u8f93\u51fa\u5230 TX \u5f15\u811a&#xff1a;\u4f4e\u7535\u5e73&#061;0&#xff0c;\u9ad8\u7535\u5e73&#061;1<br \/>\n        \u2193<br \/>\n\u7ebf\u4e0a\u51fa\u73b0\u4e00\u4e32\u7535\u5e73\u53d8\u5316&#xff1a;\u8d77\u59cb\u4f4d &#043; 01000001 &#043; \u505c\u6b62\u4f4d<\/p>\n<p>\u63a5\u6536\u7aef\u5219\u5b8c\u5168\u53cd\u8fc7\u6765&#xff1a;RX \u5f15\u811a\u6536\u5230\u7535\u5e73\u53d8\u5316 \u2192 UART \u5916\u8bbe\u6309\u6ce2\u7279\u7387\u91c7\u6837\u3001\u53bb\u6389\u8d77\u59cb\/\u505c\u6b62\u4f4d\u3001\u62fc\u56de 0x41 \u2192 \u5b58\u5165\u63a5\u6536\u5bc4\u5b58\u5668 \u2192 \u8f6f\u4ef6\u8bfb\u51fa 0x41 \u2192 \u67e5 ASCII \u8868\u7ffb\u8bd1\u56de\u5b57\u7b26 A \u2192 \u663e\u793a\u5728\u5c4f\u5e55\u4e0a\u3002<\/p>\n<h5>2.4.4 \u4e2d\u6587\u600e\u4e48\u529e&#xff1f;\u2014\u2014ASCII \u4e0d\u591f\u7528&#xff0c;\u8fd8\u6709 UTF-8<\/h5>\n<p>ASCII \u53ea\u6709 128 \u4e2a\u5b57\u7b26&#xff0c;\u8fde\u4e2d\u6587\u90fd\u88c5\u4e0d\u4e0b\u3002\u6240\u4ee5\u540e\u6765\u53c8\u6709\u4e86 GB2312\/GBK&#xff08;\u7b80\u4f53\u4e2d\u6587\u7f16\u7801&#xff09;\u3001UTF-8&#xff08;Unicode \u7684\u53ef\u53d8\u957f\u7f16\u7801&#xff09;\u7b49\u3002UTF-8 \u7528 1~4 \u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u5b57\u7b26&#xff0c;\u6bd4\u5982\u6c49\u5b57&#034;\u901a&#034;\u7684 UTF-8 \u7f16\u7801\u662f E9 80 9A&#xff08;\u4e09\u4e2a\u5b57\u8282&#xff09;\u3002\u7f16\u7801\u8868\u4e0d\u540c&#xff0c;\u540c\u4e00\u4e2a\u5b57\u7b26\u5bf9\u5e94\u7684\u4e8c\u8fdb\u5236\u4e32\u5c31\u4e0d\u540c\u2014\u2014\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u4e32\u53e3\u6536\u5230\u4e2d\u6587\u4e71\u7801\u65f6&#xff0c;\u5f80\u5f80\u662f\u53d1\u9001\u7aef\u548c\u63a5\u6536\u7aef\u7528\u7684\u7f16\u7801\u8868\u4e0d\u4e00\u81f4\u3002<\/p>\n<p>&#x1f4a1; \u4e00\u53e5\u8bdd\u603b\u7ed3&#xff1a;\u5b57\u7b26\u7f16\u7801\u8868\u5c31\u662f&#034;\u5b57\u7b26 \u2194 \u4e8c\u8fdb\u5236&#034;\u7684\u5b57\u5178&#xff0c;\u5b9a\u4e49\u5728\u6807\u51c6\u91cc&#xff0c;\u7ffb\u8bd1\u7531\u8f6f\u4ef6\u5b8c\u6210&#xff0c;\u6700\u7ec8\u7531\u786c\u4ef6\u5916\u8bbe\u628a\u4e8c\u8fdb\u5236\u53d8\u6210\u7ebf\u4e0a\u7535\u5e73\u3002 \u534f\u8bae\u7ba1\u7684\u662f&#034;\u4e8c\u8fdb\u5236\u600e\u4e48\u5728\u7ebf\u4e0a\u4f20&#034;&#xff0c;\u7f16\u7801\u8868\u7ba1\u7684\u662f&#034;\u5b57\u7b26\u600e\u4e48\u53d8\u6210\u4e8c\u8fdb\u5236&#034;&#xff0c;\u4e24\u8005\u5404\u53f8\u5176\u804c\u3002<\/p>\n<h4>2.5 \u4e00\u5f20\u56fe\u770b\u61c2&#xff1a;\u5b57\u7b26 \u2192 \u4e8c\u8fdb\u5236 \u2192 \u7ebf\u4e0a\u7535\u5e73<\/h4>\n<p>  #mermaid-svg-kcwRx6dPsNuJ090I{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-kcwRx6dPsNuJ090I .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-kcwRx6dPsNuJ090I .error-icon{fill:#552222;}#mermaid-svg-kcwRx6dPsNuJ090I .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-kcwRx6dPsNuJ090I .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-kcwRx6dPsNuJ090I .marker{fill:#333333;stroke:#333333;}#mermaid-svg-kcwRx6dPsNuJ090I .marker.cross{stroke:#333333;}#mermaid-svg-kcwRx6dPsNuJ090I svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-kcwRx6dPsNuJ090I p{margin:0;}#mermaid-svg-kcwRx6dPsNuJ090I .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-kcwRx6dPsNuJ090I .cluster-label text{fill:#333;}#mermaid-svg-kcwRx6dPsNuJ090I .cluster-label span{color:#333;}#mermaid-svg-kcwRx6dPsNuJ090I .cluster-label span p{background-color:transparent;}#mermaid-svg-kcwRx6dPsNuJ090I .label text,#mermaid-svg-kcwRx6dPsNuJ090I span{fill:#333;color:#333;}#mermaid-svg-kcwRx6dPsNuJ090I .node rect,#mermaid-svg-kcwRx6dPsNuJ090I .node circle,#mermaid-svg-kcwRx6dPsNuJ090I .node ellipse,#mermaid-svg-kcwRx6dPsNuJ090I .node polygon,#mermaid-svg-kcwRx6dPsNuJ090I .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-kcwRx6dPsNuJ090I .rough-node .label text,#mermaid-svg-kcwRx6dPsNuJ090I .node .label text,#mermaid-svg-kcwRx6dPsNuJ090I .image-shape .label,#mermaid-svg-kcwRx6dPsNuJ090I .icon-shape .label{text-anchor:middle;}#mermaid-svg-kcwRx6dPsNuJ090I .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-kcwRx6dPsNuJ090I .rough-node .label,#mermaid-svg-kcwRx6dPsNuJ090I .node .label,#mermaid-svg-kcwRx6dPsNuJ090I .image-shape .label,#mermaid-svg-kcwRx6dPsNuJ090I .icon-shape .label{text-align:center;}#mermaid-svg-kcwRx6dPsNuJ090I .node.clickable{cursor:pointer;}#mermaid-svg-kcwRx6dPsNuJ090I .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-kcwRx6dPsNuJ090I .arrowheadPath{fill:#333333;}#mermaid-svg-kcwRx6dPsNuJ090I .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-kcwRx6dPsNuJ090I .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-kcwRx6dPsNuJ090I .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-kcwRx6dPsNuJ090I .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-kcwRx6dPsNuJ090I .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-kcwRx6dPsNuJ090I .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-kcwRx6dPsNuJ090I .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-kcwRx6dPsNuJ090I .cluster text{fill:#333;}#mermaid-svg-kcwRx6dPsNuJ090I .cluster span{color:#333;}#mermaid-svg-kcwRx6dPsNuJ090I div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-kcwRx6dPsNuJ090I .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-kcwRx6dPsNuJ090I rect.text{fill:none;stroke-width:0;}#mermaid-svg-kcwRx6dPsNuJ090I .icon-shape,#mermaid-svg-kcwRx6dPsNuJ090I .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-kcwRx6dPsNuJ090I .icon-shape p,#mermaid-svg-kcwRx6dPsNuJ090I .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-kcwRx6dPsNuJ090I .icon-shape .label rect,#mermaid-svg-kcwRx6dPsNuJ090I .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-kcwRx6dPsNuJ090I .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-kcwRx6dPsNuJ090I .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-kcwRx6dPsNuJ090I :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b57\u7b26 &#039;A&#039;<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u67e5 ASCII \u8868<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>0x41 &#061; 01000001<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>UART \u5916\u8bbe\u52a0\u8d77\u59cb\/\u505c\u6b62\u4f4d<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>TX \u5f15\u811a\u7535\u5e73\u53d8\u5316<\/p>\n<p><\/span><\/p>\n<h3>\u4e09\u3001\u4e09\u5927\u534f\u8bae\u4e00\u53e5\u8bdd\u5b9a\u6027<\/h3>\n<h4>3.1 UART&#xff1a;\u5f02\u6b65\u3001\u70b9\u5bf9\u70b9\u3001\u4e24\u6839\u7ebf<\/h4>\n<ul>\n<li>\u4e24\u6839\u7ebf&#xff1a;TX&#xff08;\u53d1\u9001&#xff09;\u3001RX&#xff08;\u63a5\u6536&#xff09;<\/li>\n<li>\u5f02\u6b65&#xff0c;\u65e0\u65f6\u949f\u7ebf&#xff0c;\u9760\u6ce2\u7279\u7387\u5bf9\u9f50<\/li>\n<li>\u5168\u53cc\u5de5&#xff1a;TX\/RX \u540c\u65f6\u6536\u53d1<\/li>\n<li>\u65e0\u5bfb\u5740&#xff1a;\u70b9\u5bf9\u70b9&#xff0c;\u4e00\u6839\u7ebf\u53ea\u80fd\u63a5\u4e00\u4e2a\u5bf9\u7aef<\/li>\n<li>\u5178\u578b\u901f\u7387&#xff1a;110 ~ 921600 baud<\/li>\n<li>\u5178\u578b\u5e94\u7528&#xff1a;\u8c03\u8bd5\u6253\u5370\u3001GPS\u3001\u84dd\u7259\u900f\u4f20\u3001WiFi AT \u6307\u4ee4&#xff08;ESP8266&#xff09;<\/li>\n<\/ul>\n<h4>3.2 I2C&#xff1a;\u540c\u6b65\u3001\u534a\u53cc\u5de5\u3001\u591a\u8bbe\u5907\u3001\u4e24\u6839\u7ebf<\/h4>\n<ul>\n<li>\u4e24\u6839\u7ebf&#xff1a;SCL&#xff08;\u65f6\u949f&#xff09;\u3001SDA&#xff08;\u6570\u636e&#xff09;<\/li>\n<li>\u540c\u6b65&#xff0c;\u6709\u65f6\u949f\u7ebf<\/li>\n<li>\u534a\u53cc\u5de5&#xff1a;\u540c\u4e00\u65f6\u523b\u53ea\u80fd\u4e00\u4e2a\u65b9\u5411<\/li>\n<li>7-bit \/ 10-bit \u5730\u5740\u5bfb\u5740&#xff0c;\u4e00\u6761\u603b\u7ebf\u53ef\u6302\u591a\u4e2a\u8bbe\u5907<\/li>\n<li>\u5178\u578b\u901f\u7387&#xff1a;100kHz&#xff08;\u6807\u51c6&#xff09;~ 3.4MHz&#xff08;\u9ad8\u901f&#xff09;<\/li>\n<li>\u5178\u578b\u5e94\u7528&#xff1a;BMP280 \u6c14\u538b\u4f20\u611f\u5668\u3001SHT30 \u6e29\u6e7f\u5ea6\u3001AT24C02 EEPROM\u3001OLED \u5c4f<\/li>\n<\/ul>\n<h4>3.3 SPI&#xff1a;\u540c\u6b65\u3001\u5168\u53cc\u5de5\u3001\u56db\u6839\u7ebf\u3001\u6700\u5feb<\/h4>\n<ul>\n<li>\u56db\u6839\u7ebf&#xff1a;SCLK&#xff08;\u65f6\u949f&#xff09;\u3001MOSI&#xff08;\u4e3b\u51fa\u4ece\u5165&#xff09;\u3001MISO&#xff08;\u4e3b\u5165\u4ece\u51fa&#xff09;\u3001CS&#xff08;\u7247\u9009&#xff09;<\/li>\n<li>\u540c\u6b65&#xff0c;\u6709\u65f6\u949f\u7ebf<\/li>\n<li>\u5168\u53cc\u5de5&#xff1a;MOSI\/MISO \u540c\u65f6\u6536\u53d1<\/li>\n<li>CS \u7247\u9009\u5bfb\u5740&#xff1a;\u6bcf\u4e2a\u4ece\u673a\u4e00\u6839 CS&#xff0c;\u8c01\u88ab\u62c9\u4f4e\u8c01\u5e94\u7b54<\/li>\n<li>\u5178\u578b\u901f\u7387&#xff1a;\u53ef\u8fbe 100M&#043;&#xff0c;\u4e09\u5927\u534f\u8bae\u4e2d\u6700\u5feb<\/li>\n<li>\u5178\u578b\u5e94\u7528&#xff1a;W25Q128 \u5b57\u5e93 Flash\u3001ILI9341 LCD\u3001SD \u5361\u3001\u9ad8\u901f ADC<\/li>\n<\/ul>\n<h4>3.4 \u5bf9\u6bd4\u4e00\u89c8\u8868<\/h4>\n<table>\n<tr>\u534f\u8bae\u7ebf\u6570\u540c\u6b65\u53cc\u5de5\u5bfb\u5740\u901f\u7387\u5178\u578b\u5e94\u7528<\/tr>\n<tbody>\n<tr>\n<td>UART<\/td>\n<td>2&#xff08;TX\/RX&#xff09;<\/td>\n<td>\u5f02\u6b65<\/td>\n<td>\u5168\u53cc\u5de5<\/td>\n<td>\u65e0&#xff08;\u70b9\u5bf9\u70b9&#xff09;<\/td>\n<td>110~921600 baud<\/td>\n<td>\u8c03\u8bd5\u3001GPS\u3001\u84dd\u7259\u3001WiFi AT<\/td>\n<\/tr>\n<tr>\n<td>I2C<\/td>\n<td>2&#xff08;SCL\/SDA&#xff09;<\/td>\n<td>\u540c\u6b65<\/td>\n<td>\u534a\u53cc\u5de5<\/td>\n<td>7\/10-bit \u5730\u5740<\/td>\n<td>100k~3.4M<\/td>\n<td>\u4f20\u611f\u5668\u3001EEPROM\u3001OLED<\/td>\n<\/tr>\n<tr>\n<td>SPI<\/td>\n<td>4&#xff08;SCLK\/MOSI\/MISO\/CS&#xff09;<\/td>\n<td>\u540c\u6b65<\/td>\n<td>\u5168\u53cc\u5de5<\/td>\n<td>CS \u7247\u9009<\/td>\n<td>\u53ef\u8fbe 100M&#043;<\/td>\n<td>Flash\u3001LCD\u3001SD \u5361\u3001ADC<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>3.5 \u4e09\u5927\u534f\u8bae\u4e00\u56fe\u5bf9\u6bd4<\/h4>\n<p>  #mermaid-svg-g4e26FzIYUA8otuU{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-g4e26FzIYUA8otuU .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-g4e26FzIYUA8otuU .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-g4e26FzIYUA8otuU .error-icon{fill:#552222;}#mermaid-svg-g4e26FzIYUA8otuU .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-g4e26FzIYUA8otuU .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-g4e26FzIYUA8otuU .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-g4e26FzIYUA8otuU .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-g4e26FzIYUA8otuU .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-g4e26FzIYUA8otuU .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-g4e26FzIYUA8otuU .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-g4e26FzIYUA8otuU .marker{fill:#333333;stroke:#333333;}#mermaid-svg-g4e26FzIYUA8otuU .marker.cross{stroke:#333333;}#mermaid-svg-g4e26FzIYUA8otuU svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-g4e26FzIYUA8otuU p{margin:0;}#mermaid-svg-g4e26FzIYUA8otuU .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-g4e26FzIYUA8otuU .cluster-label text{fill:#333;}#mermaid-svg-g4e26FzIYUA8otuU .cluster-label span{color:#333;}#mermaid-svg-g4e26FzIYUA8otuU .cluster-label span p{background-color:transparent;}#mermaid-svg-g4e26FzIYUA8otuU .label text,#mermaid-svg-g4e26FzIYUA8otuU span{fill:#333;color:#333;}#mermaid-svg-g4e26FzIYUA8otuU .node rect,#mermaid-svg-g4e26FzIYUA8otuU .node circle,#mermaid-svg-g4e26FzIYUA8otuU .node ellipse,#mermaid-svg-g4e26FzIYUA8otuU .node polygon,#mermaid-svg-g4e26FzIYUA8otuU .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-g4e26FzIYUA8otuU .rough-node .label text,#mermaid-svg-g4e26FzIYUA8otuU .node .label text,#mermaid-svg-g4e26FzIYUA8otuU .image-shape .label,#mermaid-svg-g4e26FzIYUA8otuU .icon-shape .label{text-anchor:middle;}#mermaid-svg-g4e26FzIYUA8otuU .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-g4e26FzIYUA8otuU .rough-node .label,#mermaid-svg-g4e26FzIYUA8otuU .node .label,#mermaid-svg-g4e26FzIYUA8otuU .image-shape .label,#mermaid-svg-g4e26FzIYUA8otuU .icon-shape .label{text-align:center;}#mermaid-svg-g4e26FzIYUA8otuU .node.clickable{cursor:pointer;}#mermaid-svg-g4e26FzIYUA8otuU .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-g4e26FzIYUA8otuU .arrowheadPath{fill:#333333;}#mermaid-svg-g4e26FzIYUA8otuU .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-g4e26FzIYUA8otuU .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-g4e26FzIYUA8otuU .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-g4e26FzIYUA8otuU .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-g4e26FzIYUA8otuU .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-g4e26FzIYUA8otuU .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-g4e26FzIYUA8otuU .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-g4e26FzIYUA8otuU .cluster text{fill:#333;}#mermaid-svg-g4e26FzIYUA8otuU .cluster span{color:#333;}#mermaid-svg-g4e26FzIYUA8otuU div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-g4e26FzIYUA8otuU .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-g4e26FzIYUA8otuU rect.text{fill:none;stroke-width:0;}#mermaid-svg-g4e26FzIYUA8otuU .icon-shape,#mermaid-svg-g4e26FzIYUA8otuU .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-g4e26FzIYUA8otuU .icon-shape p,#mermaid-svg-g4e26FzIYUA8otuU .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-g4e26FzIYUA8otuU .icon-shape .label rect,#mermaid-svg-g4e26FzIYUA8otuU .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-g4e26FzIYUA8otuU .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-g4e26FzIYUA8otuU .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-g4e26FzIYUA8otuU :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>SPI<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>SCLK\/MOSI\/MISO\/CS \u56db\u6839\u7ebf<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u540c\u6b65 \u00b7 \u5168\u53cc\u5de5 \u00b7 \u6700\u5feb<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>I2C<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>SCL\/SDA \u4e24\u6839\u7ebf<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u540c\u6b65 \u00b7 \u591a\u8bbe\u5907<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>UART<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>TX\/RX \u4e24\u6839\u7ebf<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u5f02\u6b65 \u00b7 \u70b9\u5bf9\u70b9<\/p>\n<p><\/span><\/p>\n<h3>\u56db\u3001\u786c\u4ef6\u5916\u8bbe vs \u8f6f\u4ef6\u6a21\u62df&#xff1a;\u6ce2\u5f62\u7531\u8c01\u4ea7\u751f&#xff1f;<\/h3>\n<p>\u8fd9\u662f\u672c\u6587\u7684\u5dee\u5f02\u5316\u91cd\u70b9\u3002\u540c\u6837\u4e00\u4efd&#034;\u7535\u5e73&#043;\u65f6\u95f4&#034;\u7684\u8bf4\u660e\u4e66&#xff0c;\u53ef\u4ee5\u7531\u4e24\u79cd&#034;\u6267\u884c\u8005&#034;\u6765\u8dd1\u3002<\/p>\n<h4>4.1 \u786c\u4ef6\u5916\u8bbe&#xff1a;\u4e13\u7528\u7535\u8def\u81ea\u52a8\u53d1\u6ce2\u5f62<\/h4>\n<p>\u4ee5 STM32 \u7684 I2C1 \u4e3a\u4f8b\u3002\u4f60\u8c03\u7528&#xff1a;<\/p>\n<p><span class=\"token function\">HAL_I2C_Mem_Read<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">&amp;<\/span>hi2c1<span class=\"token punctuation\">,<\/span> <span class=\"token number\">0x76<\/span> <span class=\"token operator\">&lt;&lt;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0xF7<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> data<span class=\"token punctuation\">,<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">100<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u4e00\u6761\u547d\u4ee4\u80cc\u540e&#xff0c;START\u3001\u4ece\u673a\u5730\u5740\u3001\u5bc4\u5b58\u5668\u5730\u5740\u3001\u91cd\u542f\u3001\u8bfb\u6570\u636e\u3001ACK\u3001STOP\u2014\u2014\u5168\u90e8\u7531 I2C \u5916\u8bbe\u7684\u786c\u4ef6\u72b6\u6001\u673a\u81ea\u52a8\u5728 PB6\/PB7 \u4e0a\u53d1\u51fa\u3002CPU \u53ea\u8d1f\u8d23\u53d1\u8d77\u547d\u4ee4&#xff0c;\u7136\u540e\u7b49\u5b8c\u6210\u6807\u5fd7&#xff0c;\u671f\u95f4\u53ef\u4ee5\u53bb\u5e72\u522b\u7684&#xff08;\u914d\u5408\u4e2d\u65ad\/DMA \u66f4\u662f\u5982\u6b64&#xff09;\u3002<\/p>\n<h4>4.2 \u8f6f\u4ef6\u6a21\u62df&#xff08;Bit-Banging&#xff09;&#xff1a;CPU \u624b\u5de5\u7ffb GPIO<\/h4>\n<p>\u800c\u540c\u4e8b\u7684 MyI2C_Start() \u5462&#xff1f;\u5b83\u662f\u7528 GPIO_WriteBit &#043; delay_us(10) \u624b\u5de5\u62fc\u6ce2\u5f62&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">MyI2C_Start<\/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 function\">SDA_Write<\/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\">SCL_Write<\/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\">delay_us<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">SDA_Write<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">delay_us<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token function\">SCL_Write<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5f15\u811a\u968f\u4fbf\u9009&#xff08;PB10\/PB11 \u4e5f\u884c&#xff09;&#xff0c;\u7075\u6d3b\u6027\u6781\u9ad8\u3002\u4f46\u4ee3\u4ef7\u662f&#xff1a;CPU \u5168\u7a0b\u88ab\u5360\u7528&#xff0c;\u800c\u4e14\u6700\u6015\u4e2d\u65ad\u6253\u65ad\u2014\u2014\u4e00\u65e6 delay_us \u4e2d\u95f4\u88ab\u4e2d\u65ad\u63d2\u4e00\u811a&#xff0c;SCL \u4f4e\u7535\u5e73\u88ab\u62c9\u957f&#xff0c;\u4ece\u673a\u5c31\u8ba4\u4e3a\u8d85\u65f6\u4e86\u3002<\/p>\n<h4>4.3 \u4e3a\u4ec0\u4e48 I2C\/SPI \u9002\u5408\u6a21\u62df&#xff0c;UART \u4e0d\u9002\u5408<\/h4>\n<p>\u5173\u952e\u5c31\u5728\u7b2c\u4e8c\u7ae0\u8bf4\u7684\u540c\u6b65\/\u5f02\u6b65\u4e4b\u5206&#xff1a;<\/p>\n<ul>\n<li>I2C\/SPI \u662f\u540c\u6b65\u534f\u8bae&#xff0c;\u6709\u65f6\u949f\u7ebf\u638c\u63a7\u8282\u594f\u3002SCL \u62c9\u9ad8\u591a\u4e45\u3001\u62c9\u4f4e\u591a\u4e45&#xff0c;\u53ea\u8981\u4ece\u673a\u80fd\u91c7\u5230\u6cbf&#xff0c;\u5ef6\u65f6\u957f\u77ed\u4e0d\u81f4\u547d\u3002CPU \u6162\u4e00\u70b9\u3001\u5feb\u4e00\u70b9&#xff0c;\u4ece\u673a\u90fd\u8ddf\u7740\u65f6\u949f\u8d70\u3002<\/li>\n<li>UART \u662f\u5f02\u6b65\u534f\u8bae&#xff0c;\u6ca1\u6709\u65f6\u949f\u7ebf\u3002\u63a5\u6536\u65b9\u9760\u6ce2\u7279\u7387\u786c\u5bf9\u9f50&#xff0c;\u6bcf\u4e00\u4f4d\u7684\u65f6\u95f4\u7cbe\u5ea6\u8981\u6c42\u6781\u9ad8\u3002CPU \u624b\u5de5\u7ffb GPIO \u6a21\u62df UART&#xff0c;\u7a0d\u6709\u6296\u52a8\u5c31\u4e71\u7801&#xff0c;\u51e0\u4e4e\u4e0d\u53ef\u7528\u3002<\/li>\n<\/ul>\n<p>\u6240\u4ee5\u4f60\u4f1a\u770b\u5230&#xff1a;\u8f6f\u4ef6\u6a21\u62df I2C\u3001\u8f6f\u4ef6\u6a21\u62df SPI \u5728\u5de5\u7a0b\u91cc\u5f88\u5e38\u89c1&#xff0c;\u4f46\u51e0\u4e4e\u6ca1\u4eba\u8f6f\u4ef6\u6a21\u62df UART\u3002<\/p>\n<h4>4.4 \u5de5\u7a0b\u9009\u578b&#xff1a;\u80fd\u7528\u786c\u4ef6\u5c31\u522b\u6a21\u62df<\/h4>\n<p>\u4ec0\u4e48\u60c5\u51b5\u624d\u8003\u8651\u8f6f\u4ef6\u6a21\u62df&#xff1f;<\/p>\n<ul>\n<li>\u5f15\u811a\u88ab\u5360\u7528&#xff0c;\u786c\u4ef6\u5916\u8bbe\u7684\u56fa\u5b9a\u5f15\u811a\u4e0d\u591f\u7528&#xff1b;<\/li>\n<li>\u82af\u7247\u4e0a\u6ca1\u6709\u5bf9\u5e94\u7684\u786c\u4ef6\u5916\u8bbe&#xff1b;<\/li>\n<li>\u9700\u8981\u7075\u6d3b\u6362\u811a\u3001\u5feb\u901f\u9a8c\u8bc1\u3002<\/li>\n<\/ul>\n<p>\u9664\u6b64\u4e4b\u5916&#xff0c;\u4e00\u5f8b\u7528\u786c\u4ef6\u5916\u8bbe\u3002\u786c\u4ef6\u5916\u8bbe\u4e0d\u5360 CPU\u3001\u65f6\u5e8f\u7a33\u5b9a\u3001\u6709\u4e2d\u65ad\/DMA \u52a0\u6301&#xff0c;\u662f\u5de5\u7a0b\u9996\u9009\u3002<\/p>\n<p>\u26a0\ufe0f \u7279\u522b\u63d0\u9192&#xff1a;\u7f51\u4e0a\u5f88\u591a\u8f6f\u4ef6\u6a21\u62df I2C \u7684\u4ee3\u7801\u662f SPL \u6807\u51c6\u5e93\u5199\u7684&#xff08;GPIO_WriteBit &#043; delay_us&#xff09;&#xff0c;\u7528\u7684\u662f PB10\/PB11\u3002\u5728\u4f60\u7684 HAL \u5de5\u7a0b\u91cc\u4e0d\u80fd\u76f4\u63a5\u62f7\u2014\u2014\u5e93\u4e0d\u517c\u5bb9\u3001\u5f15\u811a\u51b2\u7a81\u3001SysTick \u6253\u67b6&#xff0c;\u4e09\u5ea7\u5927\u5c71\u7b49\u7740\u4f60\u3002<\/p>\n<hr \/>\n<h4>4.5 \u786c\u4ef6\u5916\u8bbe vs \u8f6f\u4ef6\u6a21\u62df<\/h4>\n<p>  #mermaid-svg-cxygQ62h3Ty5N87x{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-cxygQ62h3Ty5N87x .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-cxygQ62h3Ty5N87x .error-icon{fill:#552222;}#mermaid-svg-cxygQ62h3Ty5N87x .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-cxygQ62h3Ty5N87x .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-cxygQ62h3Ty5N87x .marker{fill:#333333;stroke:#333333;}#mermaid-svg-cxygQ62h3Ty5N87x .marker.cross{stroke:#333333;}#mermaid-svg-cxygQ62h3Ty5N87x svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-cxygQ62h3Ty5N87x p{margin:0;}#mermaid-svg-cxygQ62h3Ty5N87x .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-cxygQ62h3Ty5N87x .cluster-label text{fill:#333;}#mermaid-svg-cxygQ62h3Ty5N87x .cluster-label span{color:#333;}#mermaid-svg-cxygQ62h3Ty5N87x .cluster-label span p{background-color:transparent;}#mermaid-svg-cxygQ62h3Ty5N87x .label text,#mermaid-svg-cxygQ62h3Ty5N87x span{fill:#333;color:#333;}#mermaid-svg-cxygQ62h3Ty5N87x .node rect,#mermaid-svg-cxygQ62h3Ty5N87x .node circle,#mermaid-svg-cxygQ62h3Ty5N87x .node ellipse,#mermaid-svg-cxygQ62h3Ty5N87x .node polygon,#mermaid-svg-cxygQ62h3Ty5N87x .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-cxygQ62h3Ty5N87x .rough-node .label text,#mermaid-svg-cxygQ62h3Ty5N87x .node .label text,#mermaid-svg-cxygQ62h3Ty5N87x .image-shape .label,#mermaid-svg-cxygQ62h3Ty5N87x .icon-shape .label{text-anchor:middle;}#mermaid-svg-cxygQ62h3Ty5N87x .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-cxygQ62h3Ty5N87x .rough-node .label,#mermaid-svg-cxygQ62h3Ty5N87x .node .label,#mermaid-svg-cxygQ62h3Ty5N87x .image-shape .label,#mermaid-svg-cxygQ62h3Ty5N87x .icon-shape .label{text-align:center;}#mermaid-svg-cxygQ62h3Ty5N87x .node.clickable{cursor:pointer;}#mermaid-svg-cxygQ62h3Ty5N87x .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-cxygQ62h3Ty5N87x .arrowheadPath{fill:#333333;}#mermaid-svg-cxygQ62h3Ty5N87x .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-cxygQ62h3Ty5N87x .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-cxygQ62h3Ty5N87x .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cxygQ62h3Ty5N87x .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-cxygQ62h3Ty5N87x .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cxygQ62h3Ty5N87x .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-cxygQ62h3Ty5N87x .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-cxygQ62h3Ty5N87x .cluster text{fill:#333;}#mermaid-svg-cxygQ62h3Ty5N87x .cluster span{color:#333;}#mermaid-svg-cxygQ62h3Ty5N87x div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-cxygQ62h3Ty5N87x .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-cxygQ62h3Ty5N87x rect.text{fill:none;stroke-width:0;}#mermaid-svg-cxygQ62h3Ty5N87x .icon-shape,#mermaid-svg-cxygQ62h3Ty5N87x .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cxygQ62h3Ty5N87x .icon-shape p,#mermaid-svg-cxygQ62h3Ty5N87x .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-cxygQ62h3Ty5N87x .icon-shape .label rect,#mermaid-svg-cxygQ62h3Ty5N87x .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cxygQ62h3Ty5N87x .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-cxygQ62h3Ty5N87x .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-cxygQ62h3Ty5N87x :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u540c\u4e00\u4efd\u534f\u8bae\u8bf4\u660e\u4e66<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u786c\u4ef6\u5916\u8bbe<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8f6f\u4ef6\u6a21\u62df<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e13\u7528\u7535\u8def\u81ea\u52a8\u53d1\u6ce2\u5f62<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>CPU \u624b\u5de5\u7ffb GPIO<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u4e0d\u5360 CPU \u00b7 \u65f6\u5e8f\u7a33\u5b9a<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5360 CPU \u00b7 \u6015\u4e2d\u65ad<\/p>\n<p><\/span><\/p>\n<h3>\u4e94\u3001\u9a71\u52a8\u7684\u672c\u8d28&#xff1a;\u628a&#034;\u6211\u8981\u6570\u636e&#034;\u7ffb\u8bd1\u6210&#034;\u7ebf\u4e0a\u600e\u4e48\u52a8&#034;<\/h3>\n<h4>5.1 \u9a71\u52a8 &#061; \u5206\u5c42\u7ffb\u8bd1\u5668<\/h4>\n<p>\u9a71\u52a8\u662f\u4ec0\u4e48&#xff1f;\u4e00\u53e5\u8bdd&#xff1a;\u9a71\u52a8 &#061; \u628a&#034;\u6211\u8981\u6570\u636e&#034;\u7ffb\u8bd1\u6210&#034;\u7ebf\u4e0a\u600e\u4e48\u52a8&#034;\u7684\u5206\u5c42\u7ffb\u8bd1\u5668\u3002<\/p>\n<p>\u4e0a\u5c42\u5e94\u7528\u8bf4&#034;\u6211\u8981\u5ba4\u5185\u5916\u538b\u5dee&#034;&#xff0c;\u5e95\u5c42\u786c\u4ef6\u53ea\u542c\u5f97\u61c2&#034;PB6 \u62c9\u4f4e\u3001PB7 \u62c9\u9ad8&#034;\u3002\u4e2d\u95f4\u8fd9\u4e00\u5c42\u5c42\u7ffb\u8bd1&#xff0c;\u5c31\u662f\u9a71\u52a8\u3002<\/p>\n<h4>5.2 \u4ee5 BMP280 \u53cc\u4f20\u611f\u5668\u4e3a\u4f8b\u7684\u56db\u5c42\u9a71\u52a8<\/h4>\n<p>\u6211\u505a\u8fc7\u4e00\u4e2a&#034;\u53cc BMP280 \u6d4b\u538b\u5dee&#034;\u7684\u9879\u76ee&#xff0c;\u6b63\u597d\u662f\u56db\u5c42\u9a71\u52a8\u7684\u5178\u578b&#xff1a;<\/p>\n<p>\u5e94\u7528\u5c42&#xff08;negpress.c&#xff09;        &#034;\u6211\u8981\u5ba4\u5185\u5916\u538b\u5dee&#034;<br \/>\n        \u2193<br \/>\n\u82af\u7247\u9a71\u52a8\u5c42&#xff08;BMP280.c&#xff09;      \u5206\u522b\u8bfb 0x76\/0x77&#xff0c;\u5148\u6e29\u5ea6\u540e\u6c14\u538b\u5237\u65b0 t_fine<br \/>\n        \u2193<br \/>\n\u603b\u7ebf\u9a71\u52a8\u5c42&#xff08;bsp_iic.c&#xff09;     HAL_I2C_Mem_Read \u5c01\u88c5<br \/>\n        \u2193<br \/>\n\u786c\u4ef6\u5c42&#xff08;I2C1 \u5916\u8bbe&#xff09;         PB6\/PB7 \u4e0a\u771f\u5b9e\u6ce2\u5f62<\/p>\n<ul>\n<li>\u5e94\u7528\u5c42&#xff1a;\u53ea\u5173\u5fc3\u4e1a\u52a1&#xff0c;\u6bd4\u5982&#034;\u7b97\u538b\u5dee\u3001\u5224\u65ad\u8d1f\u538b\u662f\u5426\u8fbe\u6807&#034;\u3002<\/li>\n<li>\u82af\u7247\u9a71\u52a8\u5c42&#xff1a;\u77e5\u9053 BMP280 \u7684\u5bc4\u5b58\u5668\u5730\u5740\u3001\u6821\u51c6\u7cfb\u6570\u3001\u8bfb\u65f6\u5e8f\u3002\u5b83\u8c03\u7528\u603b\u7ebf\u5c42&#xff0c;\u4e0d\u5173\u5fc3\u5e95\u5c42\u662f\u786c\u4ef6 I2C \u8fd8\u662f\u8f6f\u4ef6\u6a21\u62df\u3002<\/li>\n<li>\u603b\u7ebf\u9a71\u52a8\u5c42&#xff1a;\u628a HAL_I2C_Mem_Read \u8fd9\u7c7b\u64cd\u4f5c\u5c01\u88c5\u6210 I2C_ReadReg(addr, reg, buf, len)\u3002<\/li>\n<li>\u786c\u4ef6\u5c42&#xff1a;\u771f\u6b63\u7684\u7535\u5e73\u7ffb\u8f6c\u3002<\/li>\n<\/ul>\n<h4>5.3 \u597d\u7684\u9a71\u52a8\u8ba9\u4e0a\u5c42&#034;\u5fd8\u4e86&#034;\u5e95\u5c42\u662f\u786c\u4ef6\u8fd8\u662f\u8f6f\u4ef6<\/h4>\n<p>\u5206\u5c42\u7684\u5a01\u529b\u5728\u4e8e&#xff1a;\u6362\u5e95\u5c42\u65f6&#xff0c;\u4e0a\u5c42\u4ee3\u7801\u96f6\u6539\u52a8\u3002<\/p>\n<p>\u4eca\u5929\u6211\u7528\u786c\u4ef6 I2C1&#xff08;PB6\/PB7&#xff09;&#xff0c;\u660e\u5929\u6211\u6539\u6210\u8f6f\u4ef6\u6a21\u62df&#xff08;PB10\/PB11&#xff09;&#xff0c;\u53ea\u8981\u603b\u7ebf\u9a71\u52a8\u5c42\u5bf9\u5916\u63a5\u53e3\u4e0d\u53d8&#xff0c;BMP280.c \u548c negpress.c \u4e00\u884c\u90fd\u4e0d\u7528\u52a8\u3002\u8fd9\u5c31\u662f&#034;\u597d\u7684\u9a71\u52a8\u8ba9\u4e0a\u5c42\u5fd8\u4e86\u5e95\u5c42&#034;\u3002<\/p>\n<p>&#x1f4cc; \u7279\u522b\u70b9\u51fa BMP280 \u7684\u7ecf\u5178\u5751&#xff1a;\u8bfb\u6c14\u538b\u524d\u5fc5\u987b\u5148\u8bfb\u6e29\u5ea6\u5237\u65b0 t_fine&#xff08;\u6e29\u5ea6\u8865\u507f\u7cfb\u6570&#xff09;\u3002\u53cc\u4f20\u611f\u5668\u65f6&#xff0c;t_fine \u5fc5\u987b\u5b58\u5728\u5404\u81ea\u7684\u7ed3\u6784\u4f53\u91cc&#xff0c;\u5426\u5219\u5ba4\u5185\u6e29\u5ea6\u4f1a\u53bb\u8865\u507f\u5ba4\u5916\u6c14\u538b\u2014\u2014\u5dee\u5206\u7ed3\u679c\u5168\u9519\u3002\u8fd9\u4e2a\u5751\u6211\u8e29\u8fc7&#xff0c;\u8840\u6cea\u3002<\/p>\n<p>\u2013<\/p>\n<h4>5.4 \u56db\u5c42\u9a71\u52a8\u4e00\u56fe\u770b\u61c2<\/h4>\n<p>  #mermaid-svg-xfTFZojX5KpG9Z2o{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-xfTFZojX5KpG9Z2o .error-icon{fill:#552222;}#mermaid-svg-xfTFZojX5KpG9Z2o .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-xfTFZojX5KpG9Z2o .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-xfTFZojX5KpG9Z2o .marker{fill:#333333;stroke:#333333;}#mermaid-svg-xfTFZojX5KpG9Z2o .marker.cross{stroke:#333333;}#mermaid-svg-xfTFZojX5KpG9Z2o svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-xfTFZojX5KpG9Z2o p{margin:0;}#mermaid-svg-xfTFZojX5KpG9Z2o .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster-label text{fill:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster-label span{color:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster-label span p{background-color:transparent;}#mermaid-svg-xfTFZojX5KpG9Z2o .label text,#mermaid-svg-xfTFZojX5KpG9Z2o span{fill:#333;color:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o .node rect,#mermaid-svg-xfTFZojX5KpG9Z2o .node circle,#mermaid-svg-xfTFZojX5KpG9Z2o .node ellipse,#mermaid-svg-xfTFZojX5KpG9Z2o .node polygon,#mermaid-svg-xfTFZojX5KpG9Z2o .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-xfTFZojX5KpG9Z2o .rough-node .label text,#mermaid-svg-xfTFZojX5KpG9Z2o .node .label text,#mermaid-svg-xfTFZojX5KpG9Z2o .image-shape .label,#mermaid-svg-xfTFZojX5KpG9Z2o .icon-shape .label{text-anchor:middle;}#mermaid-svg-xfTFZojX5KpG9Z2o .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-xfTFZojX5KpG9Z2o .rough-node .label,#mermaid-svg-xfTFZojX5KpG9Z2o .node .label,#mermaid-svg-xfTFZojX5KpG9Z2o .image-shape .label,#mermaid-svg-xfTFZojX5KpG9Z2o .icon-shape .label{text-align:center;}#mermaid-svg-xfTFZojX5KpG9Z2o .node.clickable{cursor:pointer;}#mermaid-svg-xfTFZojX5KpG9Z2o .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-xfTFZojX5KpG9Z2o .arrowheadPath{fill:#333333;}#mermaid-svg-xfTFZojX5KpG9Z2o .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-xfTFZojX5KpG9Z2o .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-xfTFZojX5KpG9Z2o .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-xfTFZojX5KpG9Z2o .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-xfTFZojX5KpG9Z2o .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-xfTFZojX5KpG9Z2o .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster text{fill:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o .cluster span{color:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-xfTFZojX5KpG9Z2o .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-xfTFZojX5KpG9Z2o rect.text{fill:none;stroke-width:0;}#mermaid-svg-xfTFZojX5KpG9Z2o .icon-shape,#mermaid-svg-xfTFZojX5KpG9Z2o .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-xfTFZojX5KpG9Z2o .icon-shape p,#mermaid-svg-xfTFZojX5KpG9Z2o .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-xfTFZojX5KpG9Z2o .icon-shape .label rect,#mermaid-svg-xfTFZojX5KpG9Z2o .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-xfTFZojX5KpG9Z2o .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-xfTFZojX5KpG9Z2o .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-xfTFZojX5KpG9Z2o :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5e94\u7528\u5c42 negpress.c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u82af\u7247\u9a71\u52a8\u5c42 BMP280.c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u603b\u7ebf\u9a71\u52a8\u5c42 bsp_iic.c<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u786c\u4ef6\u5c42 I2C1 \u5916\u8bbe<\/p>\n<p><\/span><\/p>\n<ul>\n<li><\/li>\n<\/ul>\n<h3>\u516d\u3001CubeMX \u5de5\u7a0b\u914d\u7f6e\u5b9e\u6218&#xff08;STM32 \u4e3a\u4f8b&#xff09;<\/h3>\n<h4>6.1 UART \u914d\u7f6e&#xff08;\u4ee5 USART3 \u63a5 ESP8266 \u4e3a\u4f8b&#xff09;<\/h4>\n<ul>\n<li>Mode&#xff1a;Asynchronous<\/li>\n<li>\u6ce2\u7279\u7387&#xff1a;115200<\/li>\n<li>\u6570\u636e\u4f4d&#xff1a;8&#xff0c;\u6821\u9a8c&#xff1a;None&#xff0c;\u505c\u6b62\u4f4d&#xff1a;1&#xff08;\u5373 8N1&#xff09;<\/li>\n<li>\u5f15\u811a&#xff1a;TX &#043; RX<\/li>\n<li>NVIC&#xff1a;\u5f00\u542f\u5168\u5c40\u4e2d\u65ad&#xff08;\u63a5\u6536&#034;\u7eed\u676f&#034;\u5fc5\u987b&#xff09;<\/li>\n<li>\u9ad8\u901f\u6570\u636e\u6d41\u53ef\u9009 DMA<\/li>\n<\/ul>\n<p>\u5173\u952e\u70b9&#xff1a;<\/p>\n<ul>\n<li>TX\/RX \u5fc5\u987b\u4ea4\u53c9\u63a5&#xff1a;STM32 \u7684 TX \u63a5 ESP8266 \u7684 RX&#xff0c;\u53cd\u4e4b\u4ea6\u7136\u3002<\/li>\n<li>3.3V \u4e0e 5V \u76f4\u8fde\u4f1a\u70e7 IO&#xff0c;\u6ce8\u610f\u7535\u5e73\u5339\u914d\u3002<\/li>\n<li>\u6ce2\u7279\u7387\u8bef\u5dee\u8981 &lt; 2%&#xff0c;\u5426\u5219\u957f\u5e27\u5fc5\u4e71\u7801\u3002<\/li>\n<\/ul>\n<h4>6.2 I2C \u914d\u7f6e&#xff08;\u4ee5 I2C1 \u63a5\u53cc BMP280 \u4e3a\u4f8b&#xff09;<\/h4>\n<ul>\n<li>Mode&#xff1a;I2C<\/li>\n<li>Speed Mode&#xff1a;Standard Mode&#xff0c;100kHz<\/li>\n<li>\u5bfb\u5740&#xff1a;7-bit<\/li>\n<li>PB6\/PB7 \u81ea\u52a8\u5206\u914d\u4e3a SCL\/SDA&#xff0c;\u5f00\u6f0f\u8f93\u51fa<\/li>\n<li>\u786c\u4ef6\u7535\u8def\u5fc5\u987b\u5916\u63a5 4.7k\u03a9~10k\u03a9 \u4e0a\u62c9\u5230 VCC&#xff08;ST \u5b98\u65b9\u914d\u7f6e\u754c\u9762\u4e5f\u63d0\u793a enable pull-ups&#xff09;<\/li>\n<\/ul>\n<p>\u5173\u952e\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u8bfb\u4e0d\u5230\u5668\u4ef6&#xff0c;\u5148\u91cf SCL\/SDA \u7a7a\u95f2\u662f\u4e0d\u662f\u9ad8\u7535\u5e73\u3002<\/li>\n<li>\u53cc\u8bbe\u5907\u5730\u5740 0x76\/0x77 \u9760 SDO \u5f15\u811a\u7535\u5e73\u533a\u5206&#xff1a;SDO \u63a5 GND \u2192 0x76&#xff0c;SDO \u63a5 VCC \u2192 0x77\u3002<\/li>\n<\/ul>\n<h4>6.3 SPI \u914d\u7f6e&#xff08;\u4ee5 SPI \u63a5 W25Q128 \u4e3a\u4f8b&#xff09;<\/h4>\n<ul>\n<li>CPOL\/CPHA \u7ec4\u5408\u6210 4 \u79cd Mode&#xff0c;\u5fc5\u987b\u4e0e\u4ece\u8bbe\u5907 datasheet \u4e25\u683c\u5339\u914d&#xff08;Flash \u591a\u4e3a Mode 0&#xff09;<\/li>\n<li>CS \u5f15\u811a\u6bcf\u4ece\u673a\u4e00\u4e2a&#xff0c;\u672a\u9009\u4e2d\u5fc5\u987b\u9ad8\u963b<\/li>\n<li>\u5173\u952e\u70b9&#xff1a;Mode \u9519 \u2192 \u8bbe\u5907\u5b8c\u5168\u4e0d\u54cd\u5e94&#xff1b;CS \u65f6\u5e8f\u9519 \u2192 \u6570\u636e\u9519\u4e71<\/li>\n<\/ul>\n<p>&#x1f4cc; \u4e09\u5927\u534f\u8bae CubeMX \u914d\u7f6e\u6e05\u5355\u901f\u67e5\u8868&#xff1a;<\/p>\n<table>\n<tr>\u534f\u8bae\u6a21\u5f0f\u5173\u952e\u53c2\u6570\u5fc5\u67e5\u9879<\/tr>\n<tbody>\n<tr>\n<td>UART<\/td>\n<td>Asynchronous<\/td>\n<td>115200 8N1<\/td>\n<td>TX\/RX \u4ea4\u53c9\u3001\u5171\u5730<\/td>\n<\/tr>\n<tr>\n<td>I2C<\/td>\n<td>I2C Standard<\/td>\n<td>100kHz 7-bit<\/td>\n<td>\u4e0a\u62c9\u7535\u963b\u3001\u7a7a\u95f2\u9ad8\u7535\u5e73<\/td>\n<\/tr>\n<tr>\n<td>SPI<\/td>\n<td>SPI Mode 0<\/td>\n<td>CPOL&#061;0 CPHA&#061;0<\/td>\n<td>CS \u62c9\u4f4e\u3001Mode \u5339\u914d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u4e03\u3001\u5e94\u7528\u573a\u666f\u4e0e\u9009\u578b\u51c6\u5219<\/h3>\n<ul>\n<li>\u4f20\u611f\u5668\u591a\u3001IO \u7d27 \u2192 I2C&#xff1a;\u4e00\u6761\u603b\u7ebf\u6302 BMP280\u3001SHT30\u3001OLED&#xff0c;\u53ea\u5360\u4e24\u6839\u7ebf\u3002<\/li>\n<li>\u5c4f\u5e55\u3001Flash\u3001\u9ad8\u901f\u6570\u636e \u2192 SPI&#xff1a;ILI9341 LCD\u3001W25Q128\u3001SD \u5361&#xff0c;\u8981\u7684\u5c31\u662f\u901f\u5ea6\u3002<\/li>\n<li>\u8c03\u8bd5\u6253\u5370\u3001\u6a21\u5757\u901a\u4fe1\u3001\u7b80\u5355\u900f\u4f20 \u2192 UART&#xff1a;ESP8266\u3001\u8bed\u97f3\u6a21\u5757\u3001GPS&#xff0c;\u70b9\u5bf9\u70b9\u6700\u7701\u5fc3\u3002<\/li>\n<\/ul>\n<p>\u9009\u578b\u6ca1\u6709\u7edd\u5bf9\u7684\u5bf9\u9519&#xff0c;\u6838\u5fc3\u662f\u5339\u914d\u9700\u6c42&#xff1a;\u8981\u7701 IO \u9009 I2C&#xff0c;\u8981\u901f\u5ea6\u9009 SPI&#xff0c;\u8981\u7b80\u5355\u9009 UART\u3002<\/p>\n<ul>\n<li><\/li>\n<\/ul>\n<h4>\u9009\u578b\u4e00\u56fe\u6d41<\/h4>\n<p>  #mermaid-svg-VcPzusbZWuy4pqtN{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-VcPzusbZWuy4pqtN .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-VcPzusbZWuy4pqtN .error-icon{fill:#552222;}#mermaid-svg-VcPzusbZWuy4pqtN .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-VcPzusbZWuy4pqtN .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-VcPzusbZWuy4pqtN .marker{fill:#333333;stroke:#333333;}#mermaid-svg-VcPzusbZWuy4pqtN .marker.cross{stroke:#333333;}#mermaid-svg-VcPzusbZWuy4pqtN svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-VcPzusbZWuy4pqtN p{margin:0;}#mermaid-svg-VcPzusbZWuy4pqtN .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-VcPzusbZWuy4pqtN .cluster-label text{fill:#333;}#mermaid-svg-VcPzusbZWuy4pqtN .cluster-label span{color:#333;}#mermaid-svg-VcPzusbZWuy4pqtN .cluster-label span p{background-color:transparent;}#mermaid-svg-VcPzusbZWuy4pqtN .label text,#mermaid-svg-VcPzusbZWuy4pqtN span{fill:#333;color:#333;}#mermaid-svg-VcPzusbZWuy4pqtN .node rect,#mermaid-svg-VcPzusbZWuy4pqtN .node circle,#mermaid-svg-VcPzusbZWuy4pqtN .node ellipse,#mermaid-svg-VcPzusbZWuy4pqtN .node polygon,#mermaid-svg-VcPzusbZWuy4pqtN .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-VcPzusbZWuy4pqtN .rough-node .label text,#mermaid-svg-VcPzusbZWuy4pqtN .node .label text,#mermaid-svg-VcPzusbZWuy4pqtN .image-shape .label,#mermaid-svg-VcPzusbZWuy4pqtN .icon-shape .label{text-anchor:middle;}#mermaid-svg-VcPzusbZWuy4pqtN .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-VcPzusbZWuy4pqtN .rough-node .label,#mermaid-svg-VcPzusbZWuy4pqtN .node .label,#mermaid-svg-VcPzusbZWuy4pqtN .image-shape .label,#mermaid-svg-VcPzusbZWuy4pqtN .icon-shape .label{text-align:center;}#mermaid-svg-VcPzusbZWuy4pqtN .node.clickable{cursor:pointer;}#mermaid-svg-VcPzusbZWuy4pqtN .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-VcPzusbZWuy4pqtN .arrowheadPath{fill:#333333;}#mermaid-svg-VcPzusbZWuy4pqtN .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-VcPzusbZWuy4pqtN .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-VcPzusbZWuy4pqtN .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-VcPzusbZWuy4pqtN .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-VcPzusbZWuy4pqtN .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-VcPzusbZWuy4pqtN .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-VcPzusbZWuy4pqtN .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-VcPzusbZWuy4pqtN .cluster text{fill:#333;}#mermaid-svg-VcPzusbZWuy4pqtN .cluster span{color:#333;}#mermaid-svg-VcPzusbZWuy4pqtN div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-VcPzusbZWuy4pqtN .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-VcPzusbZWuy4pqtN rect.text{fill:none;stroke-width:0;}#mermaid-svg-VcPzusbZWuy4pqtN .icon-shape,#mermaid-svg-VcPzusbZWuy4pqtN .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-VcPzusbZWuy4pqtN .icon-shape p,#mermaid-svg-VcPzusbZWuy4pqtN .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-VcPzusbZWuy4pqtN .icon-shape .label rect,#mermaid-svg-VcPzusbZWuy4pqtN .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-VcPzusbZWuy4pqtN .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-VcPzusbZWuy4pqtN .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-VcPzusbZWuy4pqtN :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8981\u7701 IO<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>I2C<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8981\u901f\u5ea6<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>SPI<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u8981\u7b80\u5355<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>UART<\/p>\n<p><\/span><\/p>\n<h3>\u516b\u3001\u9ad8\u9891\u6392\u5751\u6307\u5357&#xff08;\u8840\u6cea\u7ecf\u9a8c&#xff09;<\/h3>\n<p>\u5e73\u65f6\u603b\u542c\u8bf4&#034;\u7ec8\u4e8e\u628a\u67d0\u67d0\u901a\u4fe1\u8c03\u597d\u4e86&#034;\u2014\u2014\u8fd9\u53e5\u8bdd\u80cc\u540e&#xff0c;\u662f\u65e0\u6570\u4e2a\u6df1\u591c\u5bf9\u7740\u793a\u6ce2\u5668\u53d1\u5446\u7684\u5de5\u7a0b\u5e08\u3002\u4f60\u53ef\u80fd\u4f1a\u95ee&#xff1a;\u534f\u8bae\u4e0d\u662f\u4e00\u5957\u660e\u660e\u767d\u767d\u3001\u767d\u7eb8\u9ed1\u5b57\u5199\u597d\u7684\u65b9\u6848\u5417&#xff1f;\u4e3a\u4ec0\u4e48\u8fd9\u4e48&#034;\u786e\u5b9a&#034;\u7684\u4e1c\u897f&#xff0c;\u8fd8\u662f\u8fd9\u4e48\u5bb9\u6613\u51fa\u9519&#xff1f;<\/p>\n<p>\u7b54\u6848\u6070\u6070\u85cf\u5728\u524d\u9762\u51e0\u7ae0\u91cc&#xff1a;\u534f\u8bae\u662f\u786e\u5b9a\u7684&#xff0c;\u4f46&#034;\u6267\u884c\u534f\u8bae&#034;\u7684\u6bcf\u4e00\u73af\u90fd\u4e0d\u786e\u5b9a\u3002<\/p>\n<ul>\n<li>\u7535\u6c14\u5c42\u4e0d\u786e\u5b9a&#xff1a;\u5f00\u6f0f\u6ca1\u4e0a\u62c9\u3001\u7535\u5e73\u4e0d\u5339\u914d\u3001\u5171\u5730\u6ca1\u505a\u597d\u3001\u7ebf\u592a\u957f\u6709\u5e72\u6270\u2014\u2014\u534f\u8bae\u5199\u5f97\u518d\u6e05\u695a&#xff0c;\u7ebf\u4e0a\u7535\u5e73\u4e0d\u5bf9&#xff0c;\u4e00\u5207\u767d\u642d\u3002<\/li>\n<li>\u65f6\u5e8f\u5c42\u4e0d\u786e\u5b9a&#xff1a;\u6ce2\u7279\u7387\u8bef\u5dee\u3001\u65f6\u949f\u6296\u52a8\u3001\u4e2d\u65ad\u6253\u65ad\u5ef6\u65f6\u3001\u4e0a\u7535\u65f6\u5e8f\u4e0d\u5bf9\u2014\u2014\u534f\u8bae\u89c4\u5b9a\u4e86&#034;\u4f55\u65f6\u53d8&#034;&#xff0c;\u4f46&#034;\u53d8&#034;\u7684\u65f6\u673a\u88ab\u5404\u79cd\u56e0\u7d20\u6270\u52a8\u3002<\/li>\n<li>\u914d\u7f6e\u5c42\u4e0d\u786e\u5b9a&#xff1a;CPOL\/CPHA \u914d\u9519\u3001\u5730\u5740\u5f15\u811a\u63a5\u9519\u3001\u5f15\u811a\u590d\u7528\u51b2\u7a81\u2014\u2014\u534f\u8bae\u6ca1\u9519&#xff0c;\u662f&#034;\u4eba&#034;\u628a\u53c2\u6570\u914d\u9519\u4e86\u3002<\/li>\n<li>\u7406\u89e3\u5c42\u4e0d\u786e\u5b9a&#xff1a;datasheet \u6ca1\u8bfb\u900f\u3001\u5bc4\u5b58\u5668\u5730\u5740\u8bb0\u9519\u3001\u7f16\u7801\u8868\u4e0d\u4e00\u81f4\u2014\u2014\u534f\u8bae\u6ca1\u9519&#xff0c;\u662f&#034;\u4eba&#034;\u7406\u89e3\u9519\u4e86\u3002<\/li>\n<\/ul>\n<p>\u6240\u4ee5&#034;\u8c03\u901a\u4fe1&#034;\u8c03\u7684\u4e0d\u662f\u534f\u8bae\u672c\u8eab&#xff0c;\u800c\u662f\u628a\u534f\u8bae\u4e4b\u5916\u7684\u6240\u6709\u4e0d\u786e\u5b9a\u56e0\u7d20&#xff0c;\u4e00\u4e2a\u4e2a\u6392\u67e5\u3001\u5bf9\u9f50\u3001\u6d88\u9664\u3002\u534f\u8bae\u662f\u90a3\u6761&#034;\u5e94\u8be5\u8d70\u7684\u8def&#034;&#xff0c;\u4f46\u8def\u4e0a\u6709\u5751\u3001\u6709\u5c94\u8def\u3001\u6709\u4fe1\u53f7\u706f\u5931\u7075&#xff0c;\u5de5\u7a0b\u5e08\u7684\u5de5\u4f5c\u5c31\u662f\u628a\u8fd9\u4e9b\u5751\u4e00\u4e2a\u4e2a\u586b\u5e73\u3002\u4e0b\u9762\u8fd9\u4e9b\u8840\u6cea\u7ecf\u9a8c&#xff0c;\u5c31\u662f\u6700\u5e38\u89c1\u7684\u5751\u3002<\/p>\n<p>\u2013<\/p>\n<h3>\u516b\u3001\u9ad8\u9891\u6392\u5751\u6307\u5357&#xff08;\u8840\u6cea\u7ecf\u9a8c&#xff09;<\/h3>\n<h4>8.1 I2C \u8bfb\u4e0d\u5230\u5668\u4ef6<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;HAL_I2C_Mem_Read \u8fd4\u56de HAL_BUSY \u6216 HAL_TIMEOUT\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;\u5f00\u6f0f\u8f93\u51fa &#043; \u65e0\u4e0a\u62c9 &#061; \u603b\u7ebf\u6c38\u8fdc\u62c9\u4e0d\u9ad8\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u5148\u522b\u6539\u4ee3\u7801&#xff01;\u7528\u793a\u6ce2\u5668\/\u4e07\u7528\u8868\u91cf SCL\/SDA \u7a7a\u95f2\u662f\u4e0d\u662f\u9ad8\u7535\u5e73\u3002\u4e0d\u662f\u9ad8\u7535\u5e73&#xff0c;\u5148\u8865 4.7k\u03a9~10k\u03a9 \u4e0a\u62c9\u3002<\/li>\n<\/ul>\n<h4>8.2 I2C \u5730\u5740\u51b2\u7a81<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u660e\u660e\u5730\u5740\u5bf9&#xff0c;\u5c31\u662f\u8bfb\u4e0d\u5230\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;A0\/A1\/A2 \u54ea\u6015\u63a5\u4e86\u4e00\u4e2a\u9ad8&#xff0c;\u5730\u5740\u5c31\u4ece 0xA0 \u53d8 0xA2\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u6838\u5bf9\u786c\u4ef6\u5730\u5740\u5f15\u811a&#xff0c;\u786e\u8ba4\u5b9e\u9645\u5730\u5740\u3002<\/li>\n<\/ul>\n<h4>8.3 UART \u4e71\u7801<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u6536\u5230\u4e00\u5806\u4e71\u7801\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;\u6ce2\u7279\u7387\u4e0d\u5339\u914d\u3001TX\/RX \u672a\u4ea4\u53c9\u3001\u672a\u5171\u5730\u30013.3V \u76f4\u8fde 5V\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u9010\u4e00\u6392\u67e5\u2014\u2014\u5148\u91cf\u6ce2\u7279\u7387&#xff0c;\u518d\u67e5\u4ea4\u53c9&#xff0c;\u518d\u67e5\u5171\u5730\u3002<\/li>\n<\/ul>\n<h4>8.4 SPI \u4e0d\u54cd\u5e94<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u8bbe\u5907\u5b8c\u5168\u4e0d\u54cd\u5e94&#xff0c;\u6216\u6570\u636e\u9519\u4e71\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;CPOL\/CPHA Mode \u914d\u9519\u3001CS \u6ca1\u62c9\u4f4e\u3001\u7247\u9009\u5f15\u811a\u641e\u6df7\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u5bf9\u7167 datasheet \u6838\u5bf9 Mode&#xff0c;\u786e\u8ba4 CS \u65f6\u5e8f\u3002<\/li>\n<\/ul>\n<h4>8.5 \u8f6f\u4ef6\u6a21\u62df I2C \u5076\u53d1\u5931\u8d25<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u65f6\u597d\u65f6\u574f&#xff0c;\u5076\u53d1\u5931\u8d25\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;\u4e2d\u65ad\u6253\u65ad\u4e86 delay_us \u65f6\u5e8f&#xff0c;SCL \u4f4e\u7535\u5e73\u88ab\u62c9\u957f&#xff0c;\u4ece\u673a\u8ba4\u4e3a\u8d85\u65f6\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u6a21\u62df\u671f\u95f4\u5173\u4e2d\u65ad&#xff0c;\u6216\u6539\u7528\u786c\u4ef6 I2C\u3002<\/li>\n<\/ul>\n<h4>8.6 EEPROM \u5199\u540e\u7acb\u523b\u8bfb<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u5199\u5b8c\u7acb\u523b\u8bfb&#xff0c;\u8bfb\u51fa\u6765\u662f\u65e7\u6570\u636e\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;AT24C02 \u5185\u90e8\u5199\u5468\u671f\u9700 5ms \u4ee5\u4e0a&#xff0c;\u8de8\u9875\u5199\u5165\u4f1a\u56de\u5377\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;\u5199\u540e\u5ef6\u65f6 5ms&#043;&#xff0c;\u6ce8\u610f\u9875\u8fb9\u754c\u3002<\/li>\n<\/ul>\n<h4>8.7 CubeMX \u751f\u6210\u4ee3\u7801\u540e\u5f15\u811a\u590d\u7528\u51b2\u7a81<\/h4>\n<ul>\n<li>\u73b0\u8c61&#xff1a;\u4e0b\u8f7d\u4e00\u6b21\u540e\u82af\u7247\u9501\u6b7b&#xff0c;\u518d\u4e5f\u8fde\u4e0d\u4e0a\u3002<\/li>\n<li>\u539f\u56e0&#xff1a;SYS \u7684 SWD \u8c03\u8bd5\u53e3\u5fd8\u9009&#xff0c;\u88ab\u590d\u7528\u6210\u666e\u901a IO\u3002<\/li>\n<li>\u89e3\u51b3&#xff1a;CubeMX \u91cc SYS \u2192 Debug<\/li>\n<\/ul>\n<hr \/>\n<hr \/>\n<p>\u611f\u8c22\u60a8\u7684\u9605\u8bfb&#xff01;\u672c\u53f7\u957f\u671f\u6df1\u8015\u7535\u5b50\u4fe1\u606f\u3001\u901a\u4fe1\u4e0e\u5d4c\u5165\u5f0f\u9886\u57df\u7684\u6280\u672f\u5206\u4eab&#xff0c;\u5982\u679c\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u60a8\u6709\u6240\u542f\u53d1&#xff0c;\u6b22\u8fce\u70b9\u8d5e\u3001\u6536\u85cf\u5e76\u5173\u6ce8&#xff0c;\u540e\u7eed\u5c06\u6301\u7eed\u8f93\u51fa\u66f4\u591a\u786c\u6838\u5e72\u8d27&#xff0c;\u4e0e\u60a8\u4e00\u540c\u6210\u957f&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55<br \/>\n\u4e00\u3001\u5f15\u5b50&#xff1a;\u4e3a\u4ec0\u4e48\\&#8221;\u8f6f\u4ef6\u80fd\u6a21\u62df I2C\\&#8221;&#xff1f;\u4e8c\u3001\u901a\u4fe1\u7684\u672c\u8d28&#xff1a;\u7535\u5e73  \u65f6\u95f4  \u534f\u8bae 2.1 \u4e00\u6839\u7ebf\u53ea\u6709 0 \u548c 1&#xff0c;\u610f\u4e49\u6765\u81ea\\&#8221;\u4f55\u65f6\u53d8\\&#8221;2.2 \u540c\u6b65\u4e0e\u5f02\u6b65&#xff1a;\u6709\u6ca1\u6709\u90a3\u6839\u65f6\u949f\u7ebf2.3 \u63a8\u633d\u3001\u5f00\u6f0f\u3001\u4e09\u6001&#xff1a;\u7535\u6c14\u5c42\u7684\u4e09\u79cd\\&#8221;\u6027\u683c\\&#8221;2.4 \u6211\u4eec\u770b\u5230\u7684\u5b57\u7b26&#xff0c;\u548c\u7ebf\u4e0a\u90a3\u4e32 0\/1 \u662f\u600e\u4e48\u5bf9\u5e94\u8d77\u6765\u7684&#xff1f;2.5 \u4e00\u5f20\u56fe\u770b\u61c2&#xff1a;\u5b57\u7b26 \u2192 \u4e8c\u8fdb\u5236 \u2192 \u7ebf\u4e0a\u7535\u5e73 \u4e09\u3001\u4e09\u5927\u534f\u8bae\u4e00\u53e5\u8bdd\u5b9a\u6027<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7880,7164,217,270,219],"topic":[],"class_list":["post-101474","post","type-post","status-publish","format-standard","hentry","category-server","tag-uart","tag-7164","tag-stm32","tag-270","tag-219"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \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\/101474.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00\u3001\u5f15\u5b50&#xff1a;\u4e3a\u4ec0\u4e48&quot;\u8f6f\u4ef6\u80fd\u6a21\u62df I2C&quot;&#xff1f;\u4e8c\u3001\u901a\u4fe1\u7684\u672c\u8d28&#xff1a;\u7535\u5e73 \u65f6\u95f4 \u534f\u8bae 2.1 \u4e00\u6839\u7ebf\u53ea\u6709 0 \u548c 1&#xff0c;\u610f\u4e49\u6765\u81ea&quot;\u4f55\u65f6\u53d8&quot;2.2 \u540c\u6b65\u4e0e\u5f02\u6b65&#xff1a;\u6709\u6ca1\u6709\u90a3\u6839\u65f6\u949f\u7ebf2.3 \u63a8\u633d\u3001\u5f00\u6f0f\u3001\u4e09\u6001&#xff1a;\u7535\u6c14\u5c42\u7684\u4e09\u79cd&quot;\u6027\u683c&quot;2.4 \u6211\u4eec\u770b\u5230\u7684\u5b57\u7b26&#xff0c;\u548c\u7ebf\u4e0a\u90a3\u4e32 0\/1 \u662f\u600e\u4e48\u5bf9\u5e94\u8d77\u6765\u7684&#xff1f;2.5 \u4e00\u5f20\u56fe\u770b\u61c2&#xff1a;\u5b57\u7b26 \u2192 \u4e8c\u8fdb\u5236 \u2192 \u7ebf\u4e0a\u7535\u5e73 \u4e09\u3001\u4e09\u5927\u534f\u8bae\u4e00\u53e5\u8bdd\u5b9a\u6027\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101474.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-06T14:09:00+00:00\" \/>\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=\"20 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101474.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101474.html\",\"name\":\"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-06T14:09:00+00:00\",\"dateModified\":\"2026-09-06T14:09:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101474.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101474.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101474.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f\"}]},{\"@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":"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \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\/101474.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u76ee\u5f55 \u4e00\u3001\u5f15\u5b50&#xff1a;\u4e3a\u4ec0\u4e48\"\u8f6f\u4ef6\u80fd\u6a21\u62df I2C\"&#xff1f;\u4e8c\u3001\u901a\u4fe1\u7684\u672c\u8d28&#xff1a;\u7535\u5e73 \u65f6\u95f4 \u534f\u8bae 2.1 \u4e00\u6839\u7ebf\u53ea\u6709 0 \u548c 1&#xff0c;\u610f\u4e49\u6765\u81ea\"\u4f55\u65f6\u53d8\"2.2 \u540c\u6b65\u4e0e\u5f02\u6b65&#xff1a;\u6709\u6ca1\u6709\u90a3\u6839\u65f6\u949f\u7ebf2.3 \u63a8\u633d\u3001\u5f00\u6f0f\u3001\u4e09\u6001&#xff1a;\u7535\u6c14\u5c42\u7684\u4e09\u79cd\"\u6027\u683c\"2.4 \u6211\u4eec\u770b\u5230\u7684\u5b57\u7b26&#xff0c;\u548c\u7ebf\u4e0a\u90a3\u4e32 0\/1 \u662f\u600e\u4e48\u5bf9\u5e94\u8d77\u6765\u7684&#xff1f;2.5 \u4e00\u5f20\u56fe\u770b\u61c2&#xff1a;\u5b57\u7b26 \u2192 \u4e8c\u8fdb\u5236 \u2192 \u7ebf\u4e0a\u7535\u5e73 \u4e09\u3001\u4e09\u5927\u534f\u8bae\u4e00\u53e5\u8bdd\u5b9a\u6027","og_url":"https:\/\/www.wsisp.com\/helps\/101474.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-06T14:09:00+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"20 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101474.html","url":"https:\/\/www.wsisp.com\/helps\/101474.html","name":"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-06T14:09:00+00:00","dateModified":"2026-09-06T14:09:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101474.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101474.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101474.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5d4c\u5165\u5f0f\u901a\u4fe1\u7684\u672c\u8d28\uff1a\u4ece\u201c\u7ffb GPIO\u201c\u5230\u201c\u5199\u9a71\u52a8\u201c\uff0cUART\/I2C\/SPI \u5230\u5e95\u5728\u5e72\u4ec0\u4e48\uff1f"}]},{"@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\/101474","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=101474"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101474\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101474"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}