Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 6 months ago.
Need a 31400Hz clock (NUCLEO F103RB)
Title says it all, I need a clock that runs at 31400Hz (0.00003184713376 seconds per tick, getting the system time in microseconds won't do for this application since it returns an int and I need higher precision).
Context: I'm making a sweet synth music tracker/player on a NUCLEO for old school game system sounds (Atari 2600, NES, SMS, Genesis, AdLib, YM2151). The Atari part of it is weird and runs at 31400Hz, all sounds are produced procedurally, I have that logic built, now I need a clock to run it at the appropriate output rate (44.1Khz will have a different pitch).