Sketch working on mega but not fully working on nano

Hello,

i am working on a timer which has two 3 digit 7 segment displays with 3 push buttons attached to each segment display. function of buttons is to increment and decrement number on display and set the number . the whole code is working fine on mega but when i tried to work it on nano both the segments work fine all the buttons work also works except one. i dissasmebled and tried it on mega it works fine their, i also replaced the nano but even though i am facing the same issue. i also tried to change the pin numbers and also power supply . the nano i am using is having avr168 controller. couldn't find a possible solution to the problem so can anyone help.

You know a keyboard has a handy Shift Button?

And sorry, my crystal ball is still out for repair. So you will have to show circuit diagrams (of both mega AND nano setups) and the code you use (in code tags).

You have code that works on an Arduino with 8K of SRAM, that doesn't work on an Arduino with 1K of SRAM. I have to wonder if memory is an issue. The reason that I have to wonder is because you didn't post your code.

Old Nano with 1K SRAM. Talk about shooting yourself in the foot.

The code is quite big nearly 1000 lines+ it is taking 65% of program storage. and circuit is quite complex to draw as it is having 4 shift registers, 6 push buttons ,two 3 digits seven segment display,led's for status indication and two relays, it occupies nearly all pins on nano.

Alright, then I'll guess it's going to be tomorrow when you post it?

I would think then that you'd have diagram of how you wired it all up. Or did you just make it up as you went along?

No i don't have diagram i just made it as it went along. The problem is solved i interchanged one of analog pin with digital pin and it started working i don't know how it started working but at last it is working.

That, my friend, is what they call pure luck...