![]() We will go into more detail on how some of the registers work later in the tutorial, but you can find a list of the registers and their functions on page 17 in the datasheet. ![]() In the MCP23017, there are 21 registers, 10 associated with Port A, 10 with Port B and a control register shared between both ports. A register is a section of memory, in this case, 8 bits in size, which can be accessed from a specified address. ![]() Port A controls pins 1 to 8, while Port B controls pins 9 to 16.Ĭontrol of these I/O pins is done by reading and writing to registers within the chip. The MCP23017 has 16 bidirectional I/O pins split into two 8-bit ports named Port A and Port B. The code for this tutorial can be found on our GitHub repository. While this tutorial targets the MCP23017, the same principles apply to almost all I☬ devices. It is a popular I/O interface with 16 GPIO pins and is used on our IO Pi Plus and Expander Pi expansion boards. The device we will be controlling is an MCP23017 I/O controller from Microchip. ![]() This tutorial will examine how you use Python to control a device connected to the Raspberry Pi's I☬ bus. Python is one of the Raspberry Pi's most popular programming languages and is used for many applications, from controlling hardware to web development. Part 2: Enabling I☬ on the Raspberry Pi.This tutorial is the fourth in a four-part series on the communication protocol I☬, explaining what it is, how it works and how you can use it on your Raspberry Pi.įor the other tutorials in this series, click on the links below. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |