[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-700235-105":59,"doc-detail-700235-en":131,"doc-similar-700235":161},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","gpio-registers-gpio-port-mode-register-gpiox_moder-gpio-configuration-bits","GPIO registers - GPIO port mode register (GPIOx_MODER) - GPIO configuration bits","","Detailed specification of GPIO (General Purpose Input/Output) registers, focusing on register layouts, address offsets, reset values, and per-pin bit fields. Covers GPIOx_MODER for configuring I/O direction mode, GPIOx_OTYPER for output type (push-pull vs open-drain), GPIOx_OSPEEDR for output speed levels, GPIOx_PUPDR for pull-up/pull-down selection, GPIOx_IDR for input data readback, and GPIOx_ODR for output data storage, including reserved-bit handling.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/gpio-registers-gpio-port-mode-register-gpiox_moder-gpio-configuration-bits/700235/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/gpio-registers-gpio-port-mode-register-gpiox_moder-gpio-configuration-bits/700235.png","ImageObject",300,407,{"name":92,"@type":93},"AditGamingID","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-29","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",13,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What does GPIOx_MODER control, and how are mode values defined?","Question",{"text":113,"@type":114},"GPIOx_MODER controls the I/O direction mode for each port pin. For each y, bits MODERy[1:0] define 00 input (reset), 01 general purpose output, 10 alternate function, and 11 analog mode.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"How are GPIO output type settings selected in GPIOx_OTYPER?",{"text":118,"@type":114},"GPIOx_OTYPER selects the output type per pin using bits OTy[0..15]. Value 0 sets output push-pull (reset), while value 1 sets output open-drain. Bits 31:16 are reserved and must remain at the reset value.",{"name":120,"@type":111,"acceptedAnswer":121},"How do GPIOx_PUPDR and GPIOx_IDR relate to input behavior?",{"text":122,"@type":114},"GPIOx_PUPDR configures pull-up/pull-down for each pin via PUPDRy[1:0] (00 none, 01 pull-up, 10 pull-down, 11 reserved). GPIOx_IDR provides the read-only input value per pin (IDRy[0..15]) and is accessed in word mode only; bits 31:16 are reserved.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},700235,1794517489,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":39,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":130,"read_time":46,"preview_page_count":19,"preview_urls":144},962094249103,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","8.4 GPIO registers  \nThis section gives a detailed description of the GPIO registers.  \nFor a summary of register bits, register address offsets and reset values, refer to Table 39 . The GPIO registers can be accessed by byte (8 bits), half-words (16 bits) or words (32 bits) .  \n8.4.1 GPIO port mode register (GPIOx_MODER) (x = A..I/J/K)  \nAddress offset: 0x00  \nReset values:  \n• 0xA800 0000 for port A  \n• 0x0000 0280 for port B  \n• 0x0000 0000 for other ports  \n31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16  \n\n| MODER15[1:0] |  | MODER14[1:0] |  | MODER13[1:0] |  | MODER12[1:0] |  | MODER11[1:0] |  | MODER10[1:0] |  | MODER9[1:0] |  | MODER8[1:0] |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |\n\n15  \n14  \n13  \n12  \n11  \n10  \n9  \n8  \n7  \n6  \n5  \n4  \n3  \n2  \n1  \n0  \n\n| MODER7[1:0] |  | MODER6[1:0] |  | MODER5[1:0] |  | MODER4[1:0] |  | MODER3[1:0] |  | MODER2[1:0] |  | MODER1[1:0] |  | MODER0[1:0] |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |\n\nBits 2y:2y+1 MODERy[1:0]: Port x configuration bits (y = 0.. 15)  \nThese bits are written by software to configure the I/O direction mode.  \n00: Input (reset state)  \n01: General purpose output mode  \n10: Alternate function mode  \n11: Analog mode  \n8.4.2 GPIO port output type register (GPIOx_OTYPER)(x = A..I/J/K)  \nAddress offset: 0x04  \nReset value: 0x0000 0000  \n31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16  \nReserved  \n15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0  \n\n| OT15 | OT14 | OT13 | OT12 | OT11 | OT10 | OT9 | OT8 | OT7 | OT6 | OT5 | OT4 | OT3 | OT2 | OT1 | OT0 |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |\n\nBits 31:16 Reserved, must be kept at reset value. Bits 15:0 OTy: Port x configuration bits (y = 0.. 15)  \nThese bits are written by software to configure the output type of the I/O port.  \n0: Output push-pull (reset state)  \n1: Output open-drain  \nDocID018909 Rev 15  \n281/1745  \n8.4.3 GPIO port output speed register (GPIOx_OSPEEDR)  \n(x = A..I/J/K)  \nAddress offset: 0x08  \nReset values:  \n• 0x0C00 0000 for port A  \n• 0x0000 00C0 for port B  \n• 0x0000 0000 for other ports  \n31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16  \n\n| OSPEEDR15\u003Cbr>[1:0] |  | OSPEEDR14\u003Cbr>[1:0] |  | OSPEEDR13\u003Cbr>[1:0] |  | OSPEEDR12\u003Cbr>[1:0] |  | OSPEEDR11\u003Cbr>[1:0] |  | OSPEEDR10\u003Cbr>[1:0] |  | OSPEEDR9\u003Cbr>[1:0] |  | OSPEEDR8\u003Cbr>[1:0] |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |\n\n15  \n14  \n13  \n12  \n11  \n10  \n9  \n8  \n7  \n6  \n5  \n4  \n3  \n2  \n1  \n0  \n\n| OSPEEDR7[1:0] |  | OSPEEDR6[1:0] |  | OSPEEDR5[1:0] |  | OSPEEDR4[1:0] |  | OSPEEDR3[1:0] |  | OSPEEDR2[1:0] |  | OSPEEDR1\u003Cbr>[1:0] |  | OSPEEDR0\u003Cbr>1:0] |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |\n\nBits 2y:2y+1 OSPEEDRy[1:0]: Port x configuration bits (y = 0.. 15)  \nThese bits are written by software to configure the I/O output speed.  \n00: Low speed  \n01: Medium speed  \n10: High speed  \n11: Very high speed  \nNote: Refer to the product datasheets for the values of OSPEEDRy bits versus VDD range and external load.  \n8.4.4 GPIO port pull-up/pull-down register (GPIOx_PUPDR)  \n(x = A..I/J/K)  \nAddress offset: 0x0C  \nReset values:  \n• 0x6400 0000 for port A  \n• 0x0000 0100 for port B  \n• 0x0000 0000 for other ports  \n31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16  \n\n| PUPDR15[1:0] |  | PUPDR14[1:0] |  | PUPDR13[1:0] |  | PUPDR12[1:0] |  | PUPDR11[1:0] |  | PUPDR10[1:0] |  | PUPDR9[1:0] | ","cbCaisKIqtsgOpQa","https://ap.wps.com/l/cbCaisKIqtsgOpQa","pdf",165680,"English","# 8.4 GPIO registers\n## 8.4.1 GPIO port mode register (GPIOx_MODER)\n## 8.4.2 GPIO port output type register (GPIOx_OTYPER)\n## 8.4.3 GPIO port output speed register (GPIOx_OSPEEDR)\n## 8.4.4 GPIO port pull-up/pull-down register (GPIOx_PUPDR)\n## 8.4.5 GPIO port input data register (GPIOx_IDR)\n## 8.4.6 GPIO port output data register (GPIOx_ODR)","[{\"question\":\"What does GPIOx_MODER control, and how are mode values defined?\",\"answer\":\"GPIOx_MODER controls the I/O direction mode for each port pin. For each y, bits MODERy[1:0] define 00 input (reset), 01 general purpose output, 10 alternate function, and 11 analog mode.\"},{\"question\":\"How are GPIO output type settings selected in GPIOx_OTYPER?\",\"answer\":\"GPIOx_OTYPER selects the output type per pin using bits OTy[0..15]. Value 0 sets output push-pull (reset), while value 1 sets output open-drain. Bits 31:16 are reserved and must remain at the reset value.\"},{\"question\":\"How do GPIOx_PUPDR and GPIOx_IDR relate to input behavior?\",\"answer\":\"GPIOx_PUPDR configures pull-up/pull-down for each pin via PUPDRy[1:0] (00 none, 01 pull-up, 10 pull-down, 11 reserved). GPIOx_IDR provides the read-only input value per pin (IDRy[0..15]) and is accessed in word mode only; bits 31:16 are reserved.\"}]","GPIO registers - GPIO port mode register (GPIOx_MODER) - GPIO configuration bits | PDF",[145,149,153,157],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/11d6d6a53e8aab6e99a0c6b6f8832b79.webp",983,1390,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/abdd9c7a7a1666f6844b4f651b5a655e.webp",982,1389,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/e39eba69ea6b986c849e1f1c1293db03.webp",981,1387,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/1c49c5b50f15b13f211da5b9bc57943a.webp",980,1386,{"list":162,"token":66},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":138,"home_preview_img_url":166,"slug":167,"view_count":29,"category_name":30,"create_tm":168},689933,"Adafruit PCF8574 I2C GPIO Expander - Overview - Wiring","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002264255/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=Rlrr9LyeVZth5eXDtQKrVrSq4Qs%3D","adafruit-pcf8574-i2c-gpio-expander-overview-wiring",1794136907,{"doc_id":170,"doc_title":171,"file_type":138,"home_preview_img_url":172,"slug":173,"view_count":24,"category_name":30,"create_tm":174},689934,"UMW PCF8574 - 8-Bit I/O Expander for I2C Bus - Specification Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001466319/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=6hvYVFNe%2FaeOX3tTejQgBk7YMVU%3D","umw-pcf8574-8-bit-io-expander-for-i2c-bus-specification-overview",1794136908,{"doc_id":176,"doc_title":177,"file_type":138,"home_preview_img_url":178,"slug":179,"view_count":24,"category_name":30,"create_tm":180},689928,"PCF8574 - Remote 8-Bit I/O Expander for I2C Bus - data sheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002264100/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=doAaAZvhUYumVdgtIpsbgyC7PP0%3D","pcf8574-remote-8-bit-io-expander-for-i2c-bus-data-sheet",1794136898,{"doc_id":182,"doc_title":183,"file_type":138,"home_preview_img_url":184,"slug":185,"view_count":34,"category_name":30,"create_tm":186},689931,"PCF8574A Remote 8-Bit I/O Expander for I2C Bus","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001466296/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=AhN7%2FPZR0Ye1awPG5VWVcV7WMlI%3D","pcf8574a-remote-8-bit-io-expander-for-i2c-bus",1794136900,{"doc_id":188,"doc_title":189,"file_type":138,"home_preview_img_url":190,"slug":191,"view_count":34,"category_name":30,"create_tm":192},720131,"74HC595 - Shift Register Datasheet - Operating and Electrical Characteristics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024384365/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=aRURwDrKTMcAUpZC6Eg9B6FoXWc%3D","74hc595-shift-register-datasheet-operating-and-electrical-characteristics",1795034713,{"doc_id":194,"doc_title":195,"file_type":138,"home_preview_img_url":196,"slug":197,"view_count":19,"category_name":30,"create_tm":198},700482,"Max FIFO - Application Note - Revision 1.0 - February 2021","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011566840/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=BXWOqMjkdpZLbo%2BV%2ByDcw5vf1NA%3D","max-fifo-application-note-revision-10-february-2021",1794519024,{"doc_id":200,"doc_title":201,"file_type":138,"home_preview_img_url":202,"slug":203,"view_count":19,"category_name":30,"create_tm":204},689930,"PCF8574 Remote 8-Bit I/O Expander for I2C Bus - Features, Applications, and Description","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001466287/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=F5NpMwvst3ODmxPqwy42SVybQk8%3D","pcf8574-remote-8-bit-io-expander-for-i2c-bus-features-applications-and-description",1794136899,{"doc_id":206,"doc_title":207,"file_type":138,"home_preview_img_url":208,"slug":209,"view_count":81,"category_name":30,"create_tm":210},690327,"Infineon TC290 / TC297 / TC298 / TC299 32-Bit Single-Chip Microcontroller - Data Sheet - Revision V 1.1 - 2019-03","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002018592/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=vEyiDCYVRGnrj7CvVyRRLCA946g%3D","infineon-tc290-tc297-tc298-tc299-32-bit-single-chip-microcontroller-data-sheet-revision-v-11-2019-03",1794163194,{"doc_id":212,"doc_title":213,"file_type":138,"home_preview_img_url":214,"slug":215,"view_count":29,"category_name":30,"create_tm":216},720126,"SN74HC595-EP - 8-Bit Shift Registers - Data Sheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024384353/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=YuqqMmQvqRdeGljrhJKFAOLIxag%3D","sn74hc595-ep-8-bit-shift-registers-data-sheet",1795034700,{"doc_id":218,"doc_title":219,"file_type":138,"home_preview_img_url":220,"slug":221,"view_count":34,"category_name":30,"create_tm":222},561490,"SN8P2501B 8-Bit Micro-Controller - User’s Manual - Preliminary Specification Version 0.5","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947648710/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=dsfJPg%2BWInh%2FeKPSBryUSjVsZOo%3D","sn8p2501b-8-bit-micro-controller-users-manual-preliminary-specification-version-05",1791805991]