Need for help

Status
Not open for further replies.

manh96

New member
So I'm using a Teensy 3.2 with Audio Adapter and I want to use another Teensy 3.2 as a slave using I2C.

My first question is can I use the same power supply (4 AA's) to supply the master Teensy and then run power to the slave also? And if so which pins?

My second question is for the I2C connection, the master Teensy has the audio adapter but there'll be a pot to control the volume on the slave so the slave will be talking and the master will be listening. Do I only connect the master Rx to the slave Tx?

Thanks all!
 
re 2nd question: i2c uses one line for Data and one line for Clock, so both lines are required.

Pins for power are the same on both T_3.2's - so the same ones from 4AA's would connect to both the same way. I'm wondering how long the batteries will last if they can power it when fresh.
 
Maybe you meant to ask about I2S? It's completely different from I2C, despite the 2 of the 3 characters being identical, which makes them look visually similar when written.

I2S is for streaming audio. It uses 2 or 3 clocks, called BCLK, LRCLK and (optionally) MCLK are used. 1 or 2 data wires are used. All the signals are unidirectional. Data is sent continuously (though some of the bits in each frame may be zeros or ignored), without any sort of acknowledgements or handshaking. The transmitting side simply sends and has no way to "know" if the other side really received the data.

I2C is for low-speed control. I2C uses 1 clock and 1 data signal, called SCL and SDA. Both may be bidirectional, though in most cases only SDA is bidirectional. Data is sent in short bursts. Every byte has an ACK bit for the receiving to confirm to the transmitter.

The audio shield uses *both* I2S and I2C. The audio data is done by I2S, and initial setup and ongoing control of hardware settings is done by I2C.

To specifically answer your question about pin numbers, I'm going to refer you to the audio shield page (which has this info), and to the I2S page in the design tool, where you can find the pinouts on the right-side documentation panel.

https://www.pjrc.com/store/teensy3_audio.html

https://www.pjrc.com/teensy/gui/?info=AudioInputI2S

https://www.pjrc.com/teensy/gui/?info=AudioOutputI2S

If you haven't used the audio shield and audio library, before you try something complex I'd highly recommend the tutorial. It's a 31 page PDF. We also have a 45 minute walkthrough video, in case you get stuck with any parts.

https://www.pjrc.com/store/audio_tutorial_kit.html

Many of the answers to your questions will end up being in terms of how the library works, so if you haven't yet used it, please do yourself a favor by checking out the tutorial. It'll help you come up to speed on the basics, which you really need if you're going to do something involving 2 boards.
 
Also, you should be aware the words "master" and "slave" in I2S indicate whether a device is generating and transmitting the clock signals (master mode), or if it's receiving the clock signals (slave mode). Often people confuse this with transmitting and receiving the audio data. Don't make that mistake. The slave device can be a transmitter... it merely transmits data when it hears the clock signal change. In fact, both can be transmitting and receiving. The master does so when it change the clock and the slave has to be ready to receive the next data bit and transmit the next data bit at the moment the clock changes.
 
Status
Not open for further replies.
Back
Top