Controlling IO pin using software
In this article, let’s continue discussing how we can control these microcontroller pins or I\Os using the software.
To control these pins there is a peripheral called GPIOD inside the microcontroller.
GPIOD is a peripheral which is used to control pins of the Port D.
This peripheral has its own set of registers which are used to control the pin’s mode, state, and other functionalities.
So, the software has to write into that register, so there you can control the modes of the pins, you can control what data you can transmit over the pins, and you can write data to the port, you can read data from the port, so various activities you do through the registers.
Now the question is how to access these registers. You can access the registers of this peripheral using memory addresses, which means each register has its own memory address. So, by using that memory address, you can access these registers, and you can control the pins. Hence you can also say that this peripheral registers are memory mapped.
Memory mapped I/O
- IO pins are controlled using peripheral registers which are mapped on to processor addressable memory locations. That leads to our next discussion.
- What are processor addressable memory locations?
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1