Hi, I'm trying to test the I2S functionality on the Teensy and was seeing to test a simple sine wave to go through. As of now, I have initialized the I2S pins and am confused on what to do next? The code I have is posted below.
// Clock type constants
#define CLOCK_TYPE (I2S_CLOCK_48K_INTERNAL)
#define clock_per_sec 44100
void i2sSetup(){
PORTC_PCR8 |= (4<<8); //master clock Pin 28
PORTC_PCR1 |= (6<<8); // transmit data Pin 22
PORTC_PCR2 |= (6<<8); //transmit framse select Pin 23
PORTC_PCR3 |= (6<<8); //transmit bit clock Pin 9
PORTC_PCR5 &= (4<<8); //receieve data Pin 13
PORTC_PCR6 &= (4<<8); // receive bit clock Pin 11
PORTC_PCR7 &= (4<<8); //receiveframe select Pin12
}
void setup() {
i2sSetup();
}
void loop() {
}
// Clock type constants
#define CLOCK_TYPE (I2S_CLOCK_48K_INTERNAL)
#define clock_per_sec 44100
void i2sSetup(){
PORTC_PCR8 |= (4<<8); //master clock Pin 28
PORTC_PCR1 |= (6<<8); // transmit data Pin 22
PORTC_PCR2 |= (6<<8); //transmit framse select Pin 23
PORTC_PCR3 |= (6<<8); //transmit bit clock Pin 9
PORTC_PCR5 &= (4<<8); //receieve data Pin 13
PORTC_PCR6 &= (4<<8); // receive bit clock Pin 11
PORTC_PCR7 &= (4<<8); //receiveframe select Pin12
}
void setup() {
i2sSetup();
}
void loop() {
}