Okay so I have been working on a digital metronome project using the Pic16f877a. Its nearly complete.
I am looking for some help with the timing. I have had success using a lookup table for each BPM but I'm looking for something a little less bulky. The time between clicks is as follows:
60/BPM
And the cycles I need using a 4MHz crystal:
(60/BPM)/1us
I'm trying to get a variable delay depending on the BPM but I'm having some trouble finding the right method and I have tried many.
Any suggestions would be greatly appreciated!
I am looking for some help with the timing. I have had success using a lookup table for each BPM but I'm looking for something a little less bulky. The time between clicks is as follows:
60/BPM
And the cycles I need using a 4MHz crystal:
(60/BPM)/1us
I'm trying to get a variable delay depending on the BPM but I'm having some trouble finding the right method and I have tried many.
Any suggestions would be greatly appreciated!