sp
Full Member level 6
- Joined
- Jan 1, 2004
- Messages
- 395
- Helped
- 23
- Reputation
- 46
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- Floating Garden
- Activity points
- 4,044
could someone help me to understand how to read the shifting of bit which will turn on the LED?
for "1<<LED0_BIT" what is the value of LED0_BIT?
I am new to this, please bear with my dumb question.
-------------------------------------------------------
#define LED_PORT PORTD
#define LED_DDR DDRD
#define LED_PIN PIND
#define LED0_BIT PIND4
#define LED1_BIT PIND5
#define LED2_BIT PIND6
#define LED3_BIT PIND7
#define Leds_on() (LED_PORT |= (1<<LED0_BIT) | (1<<LED1_BIT) | (1<<LED2_BIT) | (1<<LED3_BIT))
for "1<<LED0_BIT" what is the value of LED0_BIT?
I am new to this, please bear with my dumb question.
-------------------------------------------------------
#define LED_PORT PORTD
#define LED_DDR DDRD
#define LED_PIN PIND
#define LED0_BIT PIND4
#define LED1_BIT PIND5
#define LED2_BIT PIND6
#define LED3_BIT PIND7
#define Leds_on() (LED_PORT |= (1<<LED0_BIT) | (1<<LED1_BIT) | (1<<LED2_BIT) | (1<<LED3_BIT))