please Re-edit your posting to have your code in a code-section
speeding up solving your problem.
I have encountered so many misunderstandings that I insist on everyone to post all relevant basic information that is nescessary to proceed fast
If you want to proceed slow post only short postings always waiting for an answer where the "answer" is just aksing back for another detail you left out trying to be fast. You should post information about:
exact type of microcontroller you are using
typenumbers and links todatasheets of all parts that are connected
no Fritzing picture !!
instead a handrawn schematic how things are wired together
best thing is to take 15 minutes of your time to read this guide