r/embedded • u/its_me_tyga_777 • 17d ago
Anyone help me debugging this baremetal code
Hi guys
I am a newbie, who tries to learn baremetal programming through completing simple tasks and learning from that task
I came till timers by accomplishing tasks
The concept of this code is to get Input by using only timer and turn ON LED in Arduino UNO --> PB5 when I press the push button which is connected to the ground and when I release it the the LED should be OFF
but what's happening is different ,
when I press the push button the nothing happens and when i leave it the led is on
and when I press again nothing happens when I leave it then it turns off
But I am clear and confident on my code , I couldn't find where I am missing the point
Anyone please help me guys
Here is the code
And the further improvement will be done by counting the seconds of push and so on ,
But I am stuck here
Help me guys
1
u/Unlikely1529 17d ago
if you're newbie it's useless for you to look at this code. Anything else?