sherazi
Banned
- Joined
- Feb 15, 2010
- Messages
- 388
- Helped
- 61
- Reputation
- 126
- Reaction score
- 61
- Trophy points
- 1,318
- Location
- Muscat, Oman, Oman
- Activity points
- 0
unable to use internal pull ups for PORTC on ATmega644p
tried this test code with pins not connected to anything , the result expected is blinking LEDS at portb but iam getting them glowing continously as the Leds are sinking current !
tried this test code with pins not connected to anything , the result expected is blinking LEDS at portb but iam getting them glowing continously as the Leds are sinking current !
Code:
int main()
{
DDRC=0;
PORTC=255;
DDRB=255;
PORTB=0;
while(1)
{
while (PINC==0xff)
{
_delay_ms(250);
_delay_ms(250);
PORTB=0;
_delay_ms(250);
_delay_ms(250);
PORTB=255;
}
PORTB=0;
}
}