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.

How to create alias for input, output and data direction registers in Atmel Studio 6?

Status
Not open for further replies.

milan.rajik

Banned
Advanced Member level 5
Joined
Apr 1, 2013
Messages
2,524
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
How to create alias for input, output and data direction registers in Atmel Studio 6? The below code is not working.


Code C - [expand]
1
2
#define PUSH_BUTTON_UP PORTB,0
#define PUSH_BUTTON_UP_DIR DDRB,0

 

You must specify with what core such code will be applied, due to special function registers are located at different addresses depending on each processor.


+++
 
I presume you should declare this way:


Code C - [expand]
1
2
#define PUSH_BUTTON_UP        PORTB.0
#define PUSH_BUTTON_UP_DIR    DDRB.0





+++
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top