Тёмный

Creating time delays on PIC18 using assembly language 

dickson neoh
Подписаться 402
Просмотров 29 тыс.
50% 1

Опубликовано:

 

17 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@avionicsmuscle
@avionicsmuscle 4 года назад
Goodness, I wish you were my professor!!! The best explanation of all time!!! Thank you!!!
@PICMICRO
@PICMICRO Год назад
Lol... some people just know what to explain.
@starvick2007
@starvick2007 6 лет назад
you are one of the few that explains pic microcontrollers so comprehensively, wish you do more of them, respect teacher.
@PICMICRO
@PICMICRO Год назад
Thanks for the information for creating delays.
@PICMICRO
@PICMICRO Год назад
I can now add delays to tutorials on my channel PIC Micro Tutorials ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5691l3uOqw4.html
@gaao2172
@gaao2172 2 года назад
thanks alot.
@古真禛Ku-Chen-ChenF7407
@古真禛Ku-Chen-ChenF7407 3 года назад
this is awesome ,thank you sir
@knowledgekeeda
@knowledgekeeda 6 лет назад
Thanks for this video sir
@shodgins928
@shodgins928 6 лет назад
Personally, I like using nested loops to save on program memory when creating delays. I never create delays with just the nop(no operation op-code). Macro's are great, but not great for saving on program memory as the assembler really just rewrites the code content in the macro wherever the macro is used in the main code. Code gets bulky, and for bigger projects, this could be too bulky. It would be easier to place the content of the macro into a subroutine, and then just call that subroutine whenever you need it. However, great video, I don't often see any assembly for microchip. Just the current craze over Arduino, which I loved until I discovered PICs.
@amarzean
@amarzean 8 лет назад
Is it possibly that I can create 3-second delay in assembly using 8-bit microcontroller (PIC18F1330, BY MICROCHIP)
@dicksonneoh5563
@dicksonneoh5563 8 лет назад
Of course you can! What is the crystal frequency? You can create a 1 second delay subroutine and call the subroutine 3 times. That makes 3 seconds delay. You can call it n times and you've successfully created n seconds delay!
@amarzean
@amarzean 8 лет назад
Thank you. The frequency is 4Hz.
@shodgins928
@shodgins928 6 лет назад
means your instruction clock runs at 1us on a 4MHz clock source.
@bestmhike
@bestmhike 8 лет назад
so a sub routine and a time delay are the same thing? for example, if im asked to create a subroutine of 1ms, is it the same as creating a time delay of 1ms?
@dicksonneoh5563
@dicksonneoh5563 8 лет назад
Best Mhike A subroutine is a group of instructions grouped together under a name. Each time you call the name of the subroutine, you are actually executing the group of instructions. For example, i have a subroutine and I name the subroutine as "Take a bath". So this subroutine is actually composed of several instructions or steps. For example step 1 get towel, step 2 get soap, step 3 walk to bathroom, step 4 start washing. whenever i need to perform the 4 steps of taking a bath again and again in my program. what i can do is just call the subroutine name Take a bath and the computer will execute the 4 steps defined under the subroutine
@dicksonneoh5563
@dicksonneoh5563 8 лет назад
so in the above case, my subroutine consist of instructions to create time delay. Whenever i need the time delay to happen in my program, i'd just call the subroutine name.
@bestmhike
@bestmhike 8 лет назад
ok so i have this assignment that is due tomorrow, it says i should create a 1 milisecond subroutine using assembly language. how do i go about it? thanks for the early replies man much appreciated
@dicksonneoh5563
@dicksonneoh5563 8 лет назад
Best Mhike This video teaches you how to do that. check it out!
@bestmhike
@bestmhike 8 лет назад
ok ok thanks again!
@thescientist5950
@thescientist5950 6 лет назад
how do you know the amount of nops to use
@obentabiayuk4780
@obentabiayuk4780 4 года назад
Thank you.. Please the command dup_nop D'17' gives me this error Error[122] ..\MAIN.ASM 63 : Illegal opcode (D)
@Justmy4cents
@Justmy4cents 5 лет назад
Using " nop delays" is a waste a CPU. Start a timer and let your code do other work til the interrupt for the timer happens. Using " nop delays" is not an effienct way to write code because your code is doing nothing but calling the same instruction over and over, If you are using delays to blink a led, why not set a timer with interrupt? Turn led off and start timer, continue checking sensor, storing data etc etc, once the timer interrupt triggers turn led back on. Never use " nop delays" professionally.
Далее
Dora was kidnapped and then… 😨 #shorts
00:18
Просмотров 2,6 млн
Какой звук фальшивый?
00:32
Просмотров 693 тыс.
For my passenger princess ❤️ #tiktok #elsarca
00:24
What Is Assembly Language?
24:56
Просмотров 454 тыс.
Writing Loops in PIC Assembly Programming
14:24
Просмотров 10 тыс.
The Problem With Smart Characters | Writing Tips
15:03
Просмотров 354 тыс.
How to win a argument
9:28
Просмотров 545 тыс.
I Built The First LAMINAR FLOW ROCKET ENGINE
15:51
Top 10 Craziest Assembly Language Instructions
15:19
Просмотров 459 тыс.
One of the Greatest Speeches Ever | Steve Jobs
10:31
Dora was kidnapped and then… 😨 #shorts
00:18
Просмотров 2,6 млн