can I use pins A4+A5 for I2C with Audio lib running

Status
Not open for further replies.

milton59

Member
I want to read time from an RTC breakout board on pins A4 and A5 but I am running the Audio Lib to do fft1024 on pin A2. Will this cause a conflict like analog read does? I would just use pins A18 and A19 but I have the TEENSY soldered to a proto board and can't access the bottom side of the board. Adding the RTC to the project is an expansion or I would have used the bottom pins to begin with, I would rather not have to desolder everything if possible. BTW I am using a TEENSY 3.2 .
 
A4 and A5 can be used for I2C on teensy just like UNO
You should also be using the i2c_t3 library with your teensy, don't include Wire.h
 
Last edited:
I should have added that I am not using the Audio shield. I am running a line input through the DC biasing circuit shown on the audio design page and into ADC0 through pin A2.
 
If you are not connecting the audio shield to pins A4/A5, you probably need to add 2.2/2.4K pull-up resistors between each of pin 18/A4 and 19/A5 to the 3.3v line (i.e. two resistors, each connecting one of the pins to the 3.3v line). If you mount the audio shield directly on the Teensy (or connect A4/A5 to the appropriate pins), the audio shield provides the necessary pull-up resistors. Note, you will need i2c to access the SGTL5000 (i2c id 0x0a) and WM8731 (i2c id 0x1a) on the audio shield.

If you have something else that provides pull-up resistors, you don't need to add additional resistors.

Note, assuming you connect a 32.768K crystal to the Teensy and power the Vbat pin/ground with a coin battery, the Teensy 3.2 has its built-in RTC that you can use. http://pjrc.com/teensy/td_libs_Time.html#teensy3

Finally, some of the RTC's offered for use with the Arduinos were 5v only. If your RTC is 5v only, you will need level shifters for both i2c pins.
 
Status
Not open for further replies.
Back
Top