35. STM32CubeIDE 4*4 Keypad. Interrupt debounce with STM32F103C8T6

preview_player
Показать описание
STM32 Blue Pill for intermediate
Рекомендации по теме
Комментарии
Автор

Here is a bit more details.
1. How to use the code for any projects
2. How the code works.

First, whenever a key pressed, the value of keyPressed in /* USER CODE PV */ changes. You can simply use it in the main loop to control something. You can also use straight away in the HAL_GPIO_EXTI_Callback function to control something as I have controlled a servo motor in video-36.

As for the technical details of how the code works, I have used interrupt and then changed the GPIO_Input to find which key is pressed. I have done a simple Interrupt example for a single button in video-34. Have look at it first.

In this keypad project, I have used pins as interrupt mode first and then changed to ordinary GPIO_Input to see which one caused the interrupt. After finding the key, changed the pin mode to interrupt again.

NizarMohideen
Автор

Hello, thank you for sharing your video.
I want to start the keypad interrupt with the LCD.
I used your code with slight changes but the problem is that I can only display one key and for example I can't display the number 85 on the character LCD.
I don't know much.

mohammadmhmd
Автор

If I want to enter a value 50 or 34 or 100 and also with enter button and delete button, incement button and decrement button Which part of the code do I need to modify

dhineshkumars
Автор

Hi
one important thing is missing
all GPIO Interrupt pins must pull down.

hamidtb
Автор

thanks for your reply and can you please explain " GPIO_InitTypeDef GPIO_InitStrucPrivate = {0}" Is it a built in structure?

heronumber
Автор

wonderful video---Professor can you please explain the code in detail because I am just a beginner---From CANADA

heronumber