#stm32cubeide #interrupts #simulation #stm32
:::'Requirement':::
• A system with interrupt •
• there will be a system where two different tasks will be executed.
• The first and main task will be executed unconditionally, but the second task or interrupt work will only be executed when a switch is pressed.
• the main task is moving a glowing LED from left to right and The interrupt task is toggling another LED (white).
*Steps to start the project:
1. Open STM32CubeIDE.
2. Select File--)Switch Workspace--)others
(Then set workspace where you want to keep your project file)
*Steps to create the project:
1. Choose File--) New --) STM32 Project.
2. Target section-“Commercial Part Number“ box enter "STM32F103C8T6” and select the part from the list on the Right side.
3. choose a project name.
4. press Finish button.
*Pinout and configuration:
1.define output pin eight(8) L E Ds for task 1 and also define a outout pin for task 2 and one External-input pin is switch pin.
2.select system core--) GPIO-configuration-change the setting of input PIN TO pullup from 'GPIO Pull-up/Pull-down' because our requirement is input pin is CONTINUOUSLY HIGH.
3.Under System core choose RCC--)Set High speed clock(HSE)as crystal ceramic resonator.
NVIC--enalbe interrupt
4.set the clock frequency on 72mHZ (Places where changes to be made)
5.When all settings are done, press ctrl+s to save the setting.(Do you want to code generate--) select "Yes"
6.write the code for your project requirements(use c)
*Generate the .hex file to simulate in proteus:
1.after writting the code,then generate the hex file.
steps to generate the hex file:
1.select Project--properties--C/C++ Build--settings--MCU Post build outputs-
select "convert to binary file(-o binary)"
select "convert to Intel Hex file(-o iHex)"
Then select apply and close.
2.select the debug from the bottom window.
3.show the console display .
*Steps to start the project in Protues:
1.File--New project
2.Select-- Select component Mode from left Icons
3.To add power and ground select Terminals Mode
📢 Let's Connect:
For behind-the-scenes peeks, updates, and more, follow me on:
Facebook - / tahasan.hasan.3
Fb page - / tahsanhasan01
Instagram - / _tahsan_hasan
Twitter - / tahsanhasan01
Thank you for being part of this incredible journey. Together, we'll create a space filled with knowledge, entertainment, and positive vibes. So, hit that subscribe button, join the community, and let's make every moment count!
🔗 [Include any other relevant links or call-to-action]
What's app- 01642058067
G-mail- [email protected]