Тёмный

Interrupts 🔴 ATmega328P Programming #6 AVR microcontroller with Atmel Studio 

Binder Tronics
Подписаться 5 тыс.
Просмотров 12 тыс.
50% 1

In this ATmega328P programming tutorial I will demonstrates how to use the external Interrupts and an overview of Interrupts in general. Using the AVR C Compiler with Atmel Studio 7.
Atmel Studio 7 is now know as Microchip Studio.
Git Repository
github.com/Devilbinder/ATMEGA...
➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥
ru-vid.com...
Facebook ▶ / bindertronics
Twitter ▶ / bindertronics
Part List ▶ bindertronics.com/shop
☕Coffee Funds☕
Shekels
www.paypal.me/bindertronics9/5
Patreon
/ bindertronics
Bitcoin
19nohZzWXxVuZ9tZvw8Pvhajt5khG5mspW
Ethereum
0x5fe29789CDaE8c73C9791bEe36c7ad5db8511D39
00:00 Intro
00:09 ATmega328P Schematic
00:42 ATmega328P Datasheet Interrupts
06:51 Interrupts Code
13:52 Interrupts Demo
15:02 Outro
#ATmega328P #AVR #AtmelStudio7

Наука

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

 

17 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@BinderTronics
@BinderTronics 3 года назад
Full playlist on the ATmega328P AVR microcontroller ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BHryCFw2U30.html
@eamonhannon1103
@eamonhannon1103 2 года назад
Really excellent video . Thank you !
@warwolt
@warwolt 6 месяцев назад
Nice thorough video!
@eamonhannon1103
@eamonhannon1103 2 года назад
Very good video !
@Yuri-we6bz
@Yuri-we6bz 2 года назад
Very helpful video!👍👍👍👍
@BinderTronics
@BinderTronics 2 года назад
Glad it was helpful!
@eamonhannon1103
@eamonhannon1103 2 года назад
Good video !
@eamonhannon1103
@eamonhannon1103 2 года назад
A nice video would be to show how you can use a pushbutton to generate an interrupt to control a LED with RTOS
@BinderTronics
@BinderTronics 2 года назад
Use a Queue. There's not much to it. xQueueCreate xQueueSendFromISR xQueueReceive
@tonysorensen421
@tonysorensen421 2 года назад
Hi there, thanks for making this series of videos (very helpful!). I have been confused your configuration of the DDRD (at 8:16 in the video). If the initial value of DDRD is 0x00 (which is specified in the datasheet) and you AND it with 0xF3 (1111 0011). Then wouldn't we end up with 0x00 at DDRD? Wouldn't OR'ing it get the desired result of 0xF3? Also, I don't understand why you include the bitwise operator at all. Why not just set the value of the register (DDRD = 0xF3;)? Is there some advantage? Thanks for any input.
@BinderTronics
@BinderTronics 2 года назад
The short answer is: Stupid proofing the code. Long answer: The desired result for the DDRD register is 0xF0 and not 0xF3 or 0b1111 00xx where x is do not care. Using the bitwise operators allows you to change only the bits you want to change. In this particular case the operations do not change the state of the lower 2 bits of the DDRD register. The base concept is to change only what you need to use. The other concept is to future proof your code. Lets take to following hypothetical: I have some peripheral that take control over the settings of the state of the lower 2 bits of the DDRD register, if I use a = then it will ruin the settings of the peripheral but using a logic operator will not interfere with the operation of the peripheral. The UART is one of the peripherals that takes console of the DDRx settings. & (AND) is used to clear bits. | (OR) is used to set bits. Sample program #include #include int main(void) { uint8_t DDRD = 0; for(uint16_t i = 0; i < 256; i++){ DDRD = (uint8_t)i; DDRD &= 0xF3; //0b11110011 DDRD |= 0xF0; //0b11110000 printf("input 0x%02x | DDRD 0x%02x ",i,DDRD); } return 0; }
@vincentschulz9355
@vincentschulz9355 8 месяцев назад
@@BinderTronicsI’m finding your video very helpful for a lab I have at Uni. I find it really cool that you take such time to respond to a question. I had the same question since this isn’t obvious for a beginner. Thanks for explaining : )
@Jm-my1rd
@Jm-my1rd 3 года назад
Hi there, I want to learn how to interface bluetooth/wifi module with pic18 or pic16. Would you be able to make another video? by the way I learn a lot of from your channel! thank you!!!!!!!!!!!!!!!
@BinderTronics
@BinderTronics 3 года назад
Skill set hierarchy uart > uart buffers > C/C++ string processing > AT commands > AT command processing > Bluetooth protocol. Recommended HC-06 Bluetooth Module OR Get a ESP32 OR Get a NRF52/NRF53 SoC Depend on what your goal is. Learn the skills or get something that works. The host microcontroller is irrelevant. That should get you going. I'm not going to get to it anytime soon.
@leonitkrasniqi3271
@leonitkrasniqi3271 2 года назад
Can someone get me a link to datasheet for AtMega328p ?
@BinderTronics
@BinderTronics 2 года назад
gprivate.com/5z82a
@user-hz1zx9ey7d
@user-hz1zx9ey7d 4 месяца назад
EICRA |= ((0b10
@BinderTronics
@BinderTronics 4 месяца назад
less verbose
Далее
#61 ATmega328 - External Interrupt
47:58
Просмотров 3,1 тыс.
Elon Musk fires employees in twitter meeting DUB
1:58
10.  ATMEGA328P: Pin change interrupts
25:55
Learning AVR-C Episode 9: External Interrupts
15:04
Просмотров 49 тыс.
Здесь упор в процессор
18:02
Просмотров 346 тыс.
Треш ПК за 420 000 рублей
0:59
Просмотров 253 тыс.
Красиво, но телефон жаль
0:32
Просмотров 988 тыс.
$1 vs $100,000 Slow Motion Camera!
0:44
Просмотров 23 млн