Embedded C programming - LED blinking Pattern Generation with switches

  Рет қаралды 2,952

Embedded Systems - Bolla

Embedded Systems - Bolla

4 жыл бұрын

Embedded C programming - LED blinking Pattern Generation with switches
program given in the comments section..
►Facebook: embeddedsystems.ravikira...
►Telegram: t.me/embeddedsystems_ravikira...

Пікірлер: 7
@rememberarowolo8127
@rememberarowolo8127 4 жыл бұрын
Great explanations.
@abdsal96
@abdsal96 2 жыл бұрын
Excellent 😌👍😊😊😊
@flowcharttocodeconverter936
@flowcharttocodeconverter936 4 жыл бұрын
👍
@embeddedsystems-bolla
@embeddedsystems-bolla 4 жыл бұрын
#include #define leds1 P2 /* Outer circle leds*/ #define leds2 P3 /* Inner circle leds */ sbit sw1 = P1^0; sbit sw2 = P1^1; sbit sw3 = P1^2; sbit sw4 = P1^3; void dely(unsigned int dly); void main(void) { unsigned int sw_status = 0; unsigned int clk_antclk_loop=0; while(1) /* infinity loop */ { if(sw1 == 0) { sw_status =1; } else if(sw2 == 0) { sw_status =2; } else if(sw3 == 0) { sw_status =3; } else if(sw4 == 0) { sw_status =4; } else { /* do nothing */ } switch(sw_status) { case 1: leds1 = ~leds1; leds2 = ~leds2; dely(30); break; case 2: leds1 = 0xff; leds2 = 0x00; dely(30); leds1 = 0x00; leds2 = 0xff; dely(30); break; case 3: leds1 = 0xaa; leds2 = 0x55; dely(30); leds1 = 0x55; leds2 = 0xaa; dely(30); break; case 4: leds1 = 0x01; leds2 = 0x80; dely(30); for(clk_antclk_loop=0;clk_antclk_loop 1; dely(30); } break; default: break; } } } void dely(unsigned int dly) { unsigned int loop =0; unsigned int delay_gen =0; for(loop =0; loop < dly; loop++) for(delay_gen =0; delay_gen < 1000; delay_gen++); /* delay */ }
@Sekhar_Home
@Sekhar_Home 4 жыл бұрын
PIC microcontroller programming is same as AT89S52. This type of c language?
@embeddedsystems-bolla
@embeddedsystems-bolla 4 жыл бұрын
Yes, There is only one c language, but depends on Microcontroller the access of internal register s / MC internal resources usage may change...
@somakantamajumder5408
@somakantamajumder5408 2 жыл бұрын
Please make led charki code
Embedded C programming -Switches Interfacing with Microcontroller AT89S52
21:26
Embedded Systems - Bolla
Рет қаралды 2,8 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 8 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 12 МЛН
Embedded C programming - LED blinking - Microcontroller AT89S52
28:28
Embedded Systems - Bolla
Рет қаралды 29 М.
Embedded C programming- Visitor Counter Using 7 segment Display- Project
11:20
Embedded Systems - Bolla
Рет қаралды 4,9 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 232 М.
Embedded C programming- TIMERS, How to generate delay & Frequency using TIMERS
47:30
Lecture 4 : Switch debouncing LED code
21:01
Electro-Unique Creations
Рет қаралды 500
Embedded c key switch led program using  Keil and protues
22:27
a learning room
Рет қаралды 59 М.
Nokia 3310 top
0:20
YT 𝒯𝒾𝓂𝓉𝒾𝓀
Рет қаралды 4,1 МЛН
Это iPhone 16
0:52
Wylsacom
Рет қаралды 522 М.