atmega16 pins trouble

Thread Starter

jose_007

Joined May 3, 2011
24
A few pins of atmega16 (D0,D1,D2) are always high when uC is powered.Does it mean those pins are damaged ??
Or is there a way to reset those pins to low ?

** I have tried programming the output of those pins

Thanks
jose
 

MrChips

Joined Oct 2, 2009
35,129
Simple way to tell, try another chip.

Or try connecting 4k7Ω (or anything from 1k to 10kΩ) from the pin to GND and see if the voltage is still high.
 

Thread Starter

jose_007

Joined May 3, 2011
24
void main(void)
{
DDRD=0x00;
DDRA=0xFF;
DDRB=0x00;
DDRC=0x00;
PINB=0x00;
PINC=0x00;
PIND=0x00;
PORTA=0x00;
<.......code.......>
}


I am using D as i/p port and A as o/p port...but as precaution I set B and C to 0 as well.....
Kindly point the error
 

bretm

Joined Feb 6, 2012
152
Does the chip have a bootloader installed? If so, it might enable UART before main() starts. Explicitly disable subsystems you don't need. This also helps battery life if applicable. Also see the PRR register which is often overlooked.
 

Thread Starter

jose_007

Joined May 3, 2011
24
I just burned the hex file...so I think bootloader is already installed

Explicitly disable subsystems you don't need. This also helps battery life if applicable. Also see the PRR register which is often overlooked.
Can you elaborate please...

And kindly explain cause of pins C5 and C6
 
Top