Well I've been hacking with this some more and I got this ADAT going on SAI3 (Teensy 4.x only), that's right the SAI3 used for Medium Quality Sound (MQS).:D Tx_Data0 out on Pin 31- EMC36,
There is also MCLK3 on Pin...
Ok here I am releasing complete output_adat.h and output_adat.cpp files for T.3.x and T4.x.
I've been testing these on T3.1 and T4.1.
Chris O. 3/25/2023
Fix compile error on Teensy LC
T4.x -PLL frequency...
Change only c1 value by add or subtract by 1.
// -- Freq 88200 for 44100kHz ADAT, MCLK1 22,579,125Mhz -- we need 22,579,200MHz
// c0 DIV 30 -- OSC_24000000Mhz *(30 + (1055/10000)) = 722,532,000MHz
// c1 NUM...
Ok for other frequencies it's all good only the 88200 I'm having this problem.
// -- Freq 96000 for 48000kHz ADAT, MCLK1 24,576,000Mhz
// c0 DIV 28
// c1 NUM 6720
// c2 DENOM 10000
// n1 PRED/ 4
// n2 PODF/...
I'm having a bit bigger issues here on Teensy 4.x master clock frequency.
This has something to do with the calculations in this part:
// PLL between 27*24 = 648MHz und 54*24=1296MHz
int n1 = 4; //SAI...
I tried to use less samples that was easy.
\libraries\Audio\examples\HardwareTesting\ADAT_DrumSamplePlayer
void loop() {
sine1.amplitude(1.0);
sound0.play(AudioSampleKick);
delay(250);
;)
I've got Teensy 3.0 BLACK ): but the ATAT_DrumSamplePlayer sketch will not fit in region `FLASH'
1.8.19/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH'...
AD_B1_00 basically PORT name similar to Arduino Uno: PORTA, PORTB, PORTC.
Direct port manipulation will yeld the best performance but you need to connect the wires (pins) correctly so you can read the bits in one go...
I guess I can confirm that the ADAT OUT on T4.1 works like a charm ):
Soon I will release a complete -- output_adat.h and output_adat.cpp for T3.x and T4.x. as soon as I can find Teensy 3.x for testing.
38.5.1.5 SAI Transmit Configuration 1 Register (TCR1) p.1987
Correct me if I'm wrong but I was looking for I2S_TCR1_TFW(n); // Transmit FIFO Watermark in \hardware\teensy\avr\cores\teensy4\imxrt.h
I do see: ...
Thanks.
All this is new to me.
I will look at the code when I have a bit more time, basically I'm trying to recreate this device for my classic 1992 Atari falcon 030 with the Motorola DSP 56001 @ 32 MHz.
Edit:...
I need simple way to change the sample rate and master clock at runtime :rolleyes:
Slowly going through the IMXRT1062 Teensy 4.x data sheets.
For 44,100kHz I need:
MCLK-22,579,200Mhz
BCLK---5,644,800Mhz -8ch-16b....