I have a little project called the MMDVM. It supports the Arduino Due, the STM32F4xx series of chips, and now the Teensy. However I have a problem.
The software is required to clock an ADC very accurately, typically at 24 kHz or 48 kHz. It can use the internal clock, on the Teensy using the PDB, but that isn't accurate enough for my needs. It was enough to test the ADC, DAC and other code. The next stage was to clock the ADC from an external accurate (less than 1ppm usually) oscillator. According to example code and the data sheets this should be done using the LPTMR. However experiments trying this have not yielded successful results, it doesn't appear to trigger the interrupt.
The code can be seen at https://github.com/g4klx/MMDVM/blob/master/IOTeensy.cpp
To use the external oscillator the EXTERNAL_OSC symbol is defined, otherwise the internal oscillator is used.
So I have two questions:
1. What is wrong with my code?
2. Is it possible to use another pin rather than pin 13 so that the LED can live in peace?
Jonathan
The software is required to clock an ADC very accurately, typically at 24 kHz or 48 kHz. It can use the internal clock, on the Teensy using the PDB, but that isn't accurate enough for my needs. It was enough to test the ADC, DAC and other code. The next stage was to clock the ADC from an external accurate (less than 1ppm usually) oscillator. According to example code and the data sheets this should be done using the LPTMR. However experiments trying this have not yielded successful results, it doesn't appear to trigger the interrupt.
The code can be seen at https://github.com/g4klx/MMDVM/blob/master/IOTeensy.cpp
To use the external oscillator the EXTERNAL_OSC symbol is defined, otherwise the internal oscillator is used.
So I have two questions:
1. What is wrong with my code?
2. Is it possible to use another pin rather than pin 13 so that the LED can live in peace?
Jonathan