I'm learning to code for ATMega 128 with Assembly and I encountered the following problem:
When I compile/simulate my program the PIND bit 0 is set to 0 (where all the other bits are set to 1) and no matter which code is in main.asm, even before any instruction is executed, this bit is always set to 0. After initializing the DDRD with bit 7 and bit 6 as outputs and bit 0..5 as inputs, all the bits are correctly set except bit 0 which still maintains its value as 0 on PIND.
Any idea why this is happening? Is there any way to set PIND bit 0 to 1 as default like all the other PINs on PORTD (and other ports)?
I've tried to search for this and got 0 matches and I'm using ATMEL Studio 7 (latest version) to code my programs for ATMega 128.
Thanks for your attention!