atmega644p internal pullups

Status
Not open for further replies.

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 !

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;

}

}
 

Whenever I read for an I/O problem in AVRs that have JTAG I immediately think about the JTAGEN fuse.
PORTC is the JTAG port and the JTAG fuse is enabled by default so have you disabled JTAG?
 
Reactions: sherazi

    sherazi

    Points: 2
    Helpful Answer Positive Rating
From the device fuses, set the the JTAGEN fuse to 1 (unprogrammed) to disable JTAG.

Alex
 

This is described in the datasheet


I use the JTAGEN fuse.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…