I configured the ddrf as input by ddrf = 0. But somehow this will make the current higher..I have to check other ports that are inputs. Just to check whether it is only adc related problems or not.
thanks!
-------Original Message-------
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.