Abstract
Previous chapters focused on the inner working principles of the STM32F4 microcontroller. In order to use the microcontroller properly, it should interact with the outside world. To do so, we will introduce interfacing digital input and output (digital I/O) to and from the microcontroller in this chapter. Peripheral units dedicated for this operation are called general-purpose input and output (GPIO) pins. These will form a bridge between code-based bit values (logic level 0 or 1) and voltage levels to be fed or received from the outside world. Therefore, we will first explore the bit representation in terms of voltage values. In other words, we will show how the logic level 0 or 1 can be represented in voltage level. Afterward, we will deal with interfacing these voltage levels with the microcontroller. Here, we will handle different structures such as interfacing the microcontroller with inputs having a high voltage value or output to loads requiring high current or voltage. We will also focus on digital I/O setup within the STM32F4 microcontroller followed by its usage. We will consider C, C++, and MicroPython languages for this purpose. As the end of the chapter application, we will start with digital input and output operations in the robot vacuum cleaner to be developed throughout the book.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Analog Devices: Low Voltage Logic Interfacing, mt-098 rev.0, 01/09, wk edn. (2009)
Horowitz, P., Hill, W.: The Art of Electronics, Cambridge University Press, 3rd edn. Newness (2015)
NXP: Level shifting techniques in I2C-Bus design, an10441 edn. (2007)
Sedra, A.S., Smith, K.C.: Microelectronic Circuits, 5th edn. Oxford University Press, Oxford (2004)
STMicroelectronics: STM32F427xx STM32F429xx, docid024030 rev 10 edn. (2018)
STMicroelectronics: STM32F405/415, STM32F407/417, STM32F427/437 and STM32F429/439 advanced Arm-based 32-bit MCUs, rm0090 rev 19 edn. (2021)
Texas Instruments: Logic guide, SDYU001AB, (2017)
Author information
Authors and Affiliations
4.1 Electronic supplementary material
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Ünsalan, C., Gürhan, H.D., Yücel, M.E. (2022). Digital Input and Output. In: Embedded System Design with ARM Cortex-M Microcontrollers. Springer, Cham. https://doi.org/10.1007/978-3-030-88439-0_4
Download citation
DOI: https://doi.org/10.1007/978-3-030-88439-0_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-88438-3
Online ISBN: 978-3-030-88439-0
eBook Packages: EngineeringEngineering (R0)