82. Simulate STM32 in Proteus using STM32CubeIDE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody in this video we are blinking LED in the protease environment using coding by Q by D htm30q by D it is blinking every 1000 millisecond we're going to change it in the cube IDE to 100 millisecond and it's blinking faster let's get started with this before we start we see why we should learn proteus the stm32 boards it can be uploaded certain upon amount of time depend on the manufacturer after certain amount it will die uh for the Proteus we don't need the parts we can learn without it we will we will not damage the parts for example if you do wrong wiring or something we will not damage the MC the microcontrollers are expensive sometimes it's not available locally we need to buy from overseas we need to wait until then we can use protease we need to install and open the protease software I have already installed if you don't have installed I have made a separate video how to install protist software which is available here otherwise we can continue open this one and get this page click open sample in the keyword area type stm32 the one we are using is stm32f103 blink LED double click this one foreign pa5 connected to a LED the chip we are using if we double click this we can see stm32f103r6 okay now we can run this we can use this run button play button to run because the chip is already programmed to Blink so it's blinking so how we change the code how we change the program we can use stm32q by De to make the code and compile and we can run from here to do that one we stop this and we minimize and we go to stm32q by D I have already installed it here if you don't have installed this one I have made a separate video it's available here I have done it for different stm32 physical chip but you can use from this time to this time to install this one so I opened it it's here click file new STM 32 project for the part number we type the same part number the use that is STM 32 f103 R6 that's the one the protease ah I'm going to select this one this one click next your name I give name Pro finish this is the chip we can zoom in uh pin pa5 which is here that's the one they are using to for the LED so Zoom it again pin pa5 we make it as a gpio output that's all the setting settings we need now we can click save yes yes this is the main.c file that's a c language file the compiler the the program going to execute from here to like here like this so some include here and there are some library for the cube IDE we need to worry about this that's the main void that's a c language syntax whatever inside is going to execute there is some initialization all are related to Q by d e and when it comes here that's the end of the main ah void function there's a while loop here so it's forever Loop we're going to put the LED blink code in here so whatever we put here it will blink so for the Hal code is to Blink the LED is Hal g p i o T now we can auto complete by holding Ctrl key and space bar the autocomplete now change this to gpio a because A5 we're going to Blink pin A5 so pin underscore 5. so it will toggle the pin 5. now we give the delay shorter delay by giving h a l underscore d e and Ctrl key and space bar autocomplete the second one uh we make it faster by giving 100 millisecond only semicolon that's also called now we can click save and use this button to build [Music] hopefully we don't get any errors so it's compiling we can see the progress here all good zero error now we go to uh proteus we come here we double click this one and for the program file we click this we pointed to that uh because the file we compiled from the cube IDE that's we need to go to uh desktop this PC and we go to C drive if you install the cube ID in a default location this is the location in the C drive uses and Nisar is my name you have to use your name or your computer Name htm32q by D and whatever workspace you use I used YouTube and the pro is the name I give to the project and go to debug folder and point it to pro.l and open okay now we can run again we can click the play button again now it will blink faster I see it's blinking faster so now if you if you need to modify the code again what you do it's very simple we just top it and we go to cube ID again for example for the delay we make it slower by giving 1000 millisecond we save it save button and the build button again when the build completed we go to Proteus again completed we go to purchase again and we play again that's all it's going to Blink slower thank you very much for watching if you have any question write down in the comment section below I'll try to answer as much as I can thank you bye
Info
Channel: MicroPeta by Nizar Mohideen
Views: 5,331
Rating: undefined out of 5
Keywords:
Id: 4ECAAbDvDWE
Channel Id: undefined
Length: 9min 6sec (546 seconds)
Published: Mon Nov 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.