Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

atmel io management code question

Status
Not open for further replies.

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))
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top