Hello everyone. This is my first post, first of all I want to thank you for keeping up this huge knowldedge library. I hope my problem can contribute to this.
First of all, I'm working on the Atmega328P in assembly, using the Arduino Uno platform.
The issue is the following: I need to, in a bigger project, detect RFID cards with the MFRC-522 module. This module has an interrupt pin, but it's not useful for detecting cards. What i had to do, was configure timer 2 as a counter, and each time it overfows i get an interrupt and pool for cards in a certain time period. I'm attaching a test program i made, that with the interrupt searchs for cards, and if it founds one, it displays its UID (some kind of card identifier). This program runs great on my board, an Arduino Uno, it displays the UID perfectly.
The problem is, when i pass it to a partner and he runs it, it doesen't work, it never enters the routine for pooling cards, and i really can't figure why. The board he is using (it's not arduino) has the only difference that instead of an external 16 MHz clock it is using a 7,37 MHz one, but that should only change the amount of time it takes for the interrupt to occur (I beleive).
I'm pretty sure there is a rookie mistake in all of this, this is the first time we are coding in assembly and using microcontrollers, but i couldn't find any similar issues neither in the forum nor any website.
I'm uploading the test code. It is a little bit extense, but i post it all just in case. The important lines should be the first 200, as the rest are mostly functions por SPI read/write and USART printing strings. The code that detects the RFID cards shouldn't be important either, as it works, and the problem is the program is not entering that segment. Thanks to everyone in advance