So with what I’ve learned from your help, I’ve written down some things that i can try.
Use interrupts to get a higher sample rate and therefore a better resolution. I need to keep in mind that the number of samples needs to be twice the period of the lowest frequency. Next to that, taking a lot of samples is heavy on memory, so I need to find the best combination of sample rate and the number of samples on this front.
Convert the peak detection state machine to check multiple peaks for, (1) the first peak might translate to a harmonic and not the fundamental, and (2) as I’ve learned from MrMark, correlation peaks that go beyond the first one produce less error in frequency. Knowing this, maybe its not a bad idea to work with these harmonics. If the string that is measured is known the harmonics can be translated to its fundamental, which will then have a better accuracy due to the fact that the harmonics are usually beyond the first correlation peak. A disadvantage of this idea is that the frequency range should be larger when implementing this.
Lastly use the quadratic interpolation.
I think I’ve already learned quite a bit! I hope you can follow my ideas and i appreciate your comments on them. Due to the fact that I’m Dutch the English language can sometimes be a bit of a struggle.