As the ports are connected to pull-up resistors; the port pin values should be at level 1 when not connected to the outside world.I wrote the below code to set the lower half of PORTA as input and the upper half as output. As I wrote 0xFF on PORTA, i was expecting to get 0xFF with the last IN instruction. Instead, I get with the simulator 0xF0, only the output pins got updated, what about the pull-up resistors? Actually, the initial value of PINA is 0. is it a software bug?
LDI R16, 0xF0
OUT DDRA, R16
SER R16
OUT PORTA,R16
NOP
NOP
IN R16, PINA
Thank you.