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.

PORTD as an input and PORTC as an output

Status
Not open for further replies.

beeboss

Newbie level 5
Joined
Jun 28, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,330
Hi all,

Im using ATmega8535. I want to give the input through the PORTD and i want the output from PORTC. Im new to the AVR. anyone please send the C code for the same.

Thanks...
 

DDR (Data Direction Register) is set to 0x00 (all inputs) by default. To make all lines on PORTC outputs, use the following command:

DDRC = 0xff;
 

I like this tutorial
it has some nice graphics with a good explanation of port registers
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top