Referring to pin map of ATMEGA2560, I learnt that Pin 42-49 digital outputs are mapped to PORTL of the MCU. I have connected digital inputs to these ports. Used digital read to verify and they are OK. I tried to use PORTS for faster read, but they are not working
I just added the following code in set up
DDRL = B00000000;
and in loop
It is printing "0". What could be wrong?