ddrf set to 1 makes
the port\pins output and enables the pull up resistor which is why the current
is high
-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of Farzlina Ab.Hadi
Sent: Tuesday, August 02, 2005 5:40 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] input port
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of Farzlina Ab.Hadi
Sent: Tuesday, August 02, 2005 5:40 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] input port
hi, do we actually need to specify the ddr of the port if it to act
as input?. I am working on the ADC of mega128. the adc is
working fine but there's a small issue on the current. I noticed that if I
include in the source code the instruction to set ddrf as input, the
current will be high. but if i remark the instruction, the current will be
low. Is there any connection?
thank you for any reply.