Dual channel 16bit dac PT8211

I am having trouble getting hold of this chip reliably. It seems perfect for my use though - package, functionality, size, price. Any similar alternatives that someone can recommend please?

Thanks
 
I have not found any other audio DACs in SOIC8 and DIP8 that are cheap, run on 3.3V, work with PJRC audio library and are still available- if those are the features you are looking for.
I bought a batch of 10 from a Chinese vendor on eBay a few months back for about $5 as I recall. I only needed 1 at the time, and it worked fine when I wired it up. That was before I found out the Paul at PJRC sells them in a kit with PCB and a few passive parts for about $5. I would have gone that route had I known. Unless you need large quantities, PJRC is the way to go.
 
Thanks, I ordered the chip from ebay/china. My worry is that it won't be available in 1000s. But if I ever sell 1000 units, I guess I'll be happy to have that problem. Since my device is primarily MIDI, and the audio output is just on board for monitoring when not connected to a real synth, I guess I can fall back to the built-in DAC.
 
The chip is so cheap, you could probably just buy 1000 of them anytime. Just store in a sealed bag, maybe with a desiccant pack to keep any moisture from causing long-term storage issues.
 
Can i use the PT8211 with the DC object of the Audio library to output DC voltage/LFO signals?

Thanks in advance!
 
Can i use the PT8211 with the DC object of the Audio library to output DC voltage/LFO signals?

Thanks in advance!

I fear that you'd have to try it out. Some DACs have an internal digital FIR filter which blocks DC. Even if not, you'd have to check out the useful (linear) DC range which can be obtained. IMNSHFO, a "normal" I2C or SPI DAC, which can be much slower since no full audio bandwidth (22kHz) is required for LFO applications, will make things simpler for you.
 
@ manatee. I use the PT8211 in some audio projects, but I haven't had time to re-program the Teensy to try DC out to be sure. However, I am sure they will work fine for LFO use. Looking at the PT8211 data sheet, they are an R-2R ladder DAC. So, there is no reason to use an FIR filter with that type of DAC, and none shows up in the datasheet. So DC should be fine.
https://www.futurlec.com/Datasheet/Others/PT8211.pdf

My recollection of measuring them in my project is that the DAC output is at Vcc/2 when they are fed a signed 16-bit value of zero. I believe the full-scale output signal is 1 volt peak to peak, centered on that Vcc/2 volt level, or 1.15 to 2.15 volts (@vcc = 3.3V)
If you want the DC signal to use in an analog synth which uses 1V/octave for the note frequency control, then I think that the PT8211 might not be a good choice as you will have to offset it and amplify it to meet that standard. Since the PT8211's output voltage will vary with Vcc changes, your note accuracy might not be good enough. For that purpose, a conventional, i.e. not an "audio" DAC, would be better. For good note accuracy, I think a 16-bit SPI DAC might be needed, but you might get by with a 12-bit one, in which case Microchip makes some cheap ones.
 
Thank you for the in put, really good information!
I would use it for non-1v/oct modulations, events like LFOs, ADSRs, random voltages and such. I'm comfortable with the analog side, scaling the voltages should be fairly easy, a couple of opamps will do it. My main problem has allways been programming :D
That's why i like the teensy audio library, makes it all so fun and easy.

I was hoping to use this dacs because they are so cheap compared with other 16bit dacs that are around. I already ordered some to try it out, we'll see how it goes.
 
@manatee. Thanks. For those uses I think you’ll be fine. I bought 10 of the PT8211 from China for just a few dollars- before I realized i could get the little PT8211 board from Paul at PJRC.
 
it's working fine with the DC object on teensy 3.2, Thanks for the help and in put!

Now I'm trying to make it work on teensy 4 with no luck... :\
based on in information on this topic https://forum.pjrc.com/threads/58197-PT8211-Teensy4 i swapped the following pins without any success:
9 to 21
22 to 8
23 to 20

I'm i missing something? just installed the latest aruino IDE an also the last teensyduino.
 
@manatee. I know that I've had the PT8211 working with Teensy 4 using the Audio lib's PT8211 output object. I am not at my computer, but try putting the PT8211's Din on Teensy io pin 7, not 8. IO07 is labelled as OUT1A, which I believe is what is needed to drive PT8211's Din pin.
Cheers
 
Good to hear. Its an easy mistake to make, since the SGTL5000 codec on the Teensy Audio shield has its I2S pins labelled incorrectly. i.e. input to the SGTL5000 goes to its TX pin, and data out of the chip goes out from the RX pin. So , Paul made the Teensy audio shield labels to match that odd convention. So, if you look at the diagrams for the interconnect between Teensy and the audio shield, it might seem like the pt8211 should have its Din pin connected to pin 8, as you initially did.
cheers
 
Guys, can somebody point me to how to change the sampling freq of the PT8211 for Teensy4.1? I did find an earlier thread, but that recommendation does not seem to work for 4.1.
Thank you in advance for your help!
 
To answer an unasked question:
I received chips with the label "D8211" earlier. So, they work. I can not say much about the sound. Sounds the same so far, on a small speaker.
Unfortunately, I could not locate a data sheet (Help please )

So now I know three possible labels (from probably three different manufacturers):


  • PT8211
  • TM8211 (Datasheet seems to be a copy of PT8211 datasheet)
  • D8211
 
PT8211 DIN Pin reassignment

inside "i2s.h" you can select which pins are used, i used I2S_TX_PIN_PATTERN_1.

iirc BCLK == SCK, TX = SD, LRCLK == WS :) MCLK is not needed.

this is the code to transmit the bits:

Code:
I2STx0.begin(I2S_CLOCK_32K_INTERNAL,[](int16_t* buffer){
    int16_t val = play();
    buffer[0] = val;
    buffer[1] = val;
});
I2STx0.start();

Hi tly,
Hope that you are still available, because as it happens, i need to reconfigure the PT8211 to coexist with quad sgtl5000 audio shields. So, I'm hoping to move DIN from pin7 to pin 9. But, I don't have a library filename of i2s.h. There are:
output i2s.h,
output i2s2.h,
output i2s hex.h, and
output pt8211.h
But, none of them include the definition:
I2S_TX_PIN_PATTERN_1
Am I correct in assuming that the libraries have been updated since your post? If so, then can you tell me where I can modify the DIN pin # for the PT8211 within today's current structure?
Thanks for your assistance
:cool:
 
i need to reconfigure the PT8211 to coexist with quad sgtl5000 audio shields.

Hopefully you're using Teensy 4, as these 2 can't work together on earlier Teensy 3 boards.

To make this work, just use "i2s_quad" and "pt8211_2", like this:

screenshot.png

As the right-side documentation says when you click on each, connect the I2S signals on pins 21, 23, 7, 32, 20 (and also 6 & 8 if using i2s_quad input). Except for pin 32 & 6, these should happen automatically if you just stack the audio shields above or below Teensy.

Connect the PT8211 signals on pins 4, 2, 3. No need to dive into the audio library code. It will "just work" if you use these 2 outputs and wires the signals to the correct pins.

Don't forget to cut and solder the jumpers on the 2nd audio shield so it has a unique I2C address, and put code into your program to enable both SGTL5000 chips.
 
Hopefully you're using Teensy 4, as these 2 can't work together on earlier Teensy 3 boards.

Thank you for your attention, Paul.;)

Yes, I'm preparing to use a T4.1 w/rev D audio shields, one modified for quad.

"To make this work, just use "i2s_quad" and "pt8211_2", like this:"

Yes, except I'm generating 6 distinct waveforms and connecting 4 mixers' outputs to the quad I2S DAC/SGTL5000-1/SGTL5000-2, plus 2 mixers' outputs to the PT8211_2 object. Otherwise, it's the same.

"As the right-side documentation says when you click on each, connect the I2S signals on pins 21, 23, 7, 32, 20 (and also 6 & 8 if using i2s_quad input). Except for pin 32 & 6, these should happen automatically if you just stack the audio shields above or below Teensy."

Yes, those pin #s correspond to both audio shields' spec sheets. But I'm confused by the design tool's pinout info that corresponds to your following statement:

"Connect the PT8211 signals on pins 4, 2, 3."
There appears to be a discrepancy in the documentation:

PT8211 DS | Audio Design Tool
7 DIN | 2 DIN
20 WS | 3 FS(?)
21 BCK | 4 BCK

pt8211_17.png


"It will "just work" if you use these 2 outputs and wires the signals to the correct pins."

IOW, since pin #7 is already being used as DIN by SGTL5000-1, then that header should be clipped, before reaching the PT8211 shield. Then, the PT8211's pin 7 needs an input GPIO, so you're saying to connect it to T4.1's pin #2 (OUT2)? Okay, then I should also cut the T4.1's header pins 20 & 21 and reroute the PT8211's pins 20 & 21 to the T4.1's pins 3 & 4, LRCLK2 & BCLK2, respectively?

"No need to dive into the audio library code."

Great to know. But, won't I also need to define the output_i2s_hex.h library for 6 channel I2S outputs?

Thank you for clarifying my confusion, Paul.
:cool:
 
Last edited:
Hex audio w/PT8211 & quad SGTL5000 shields

To make this work, just use "i2s_quad" and "pt8211_2", like this:

View attachment 27871

As the right-side documentation says when you click on each, connect the I2S signals on pins 21, 23, 7, 32, 20 (and also 6 & 8 if using i2s_quad input). Except for pin 32 & 6, these should happen automatically if you just stack the audio shields above or below Teensy.

Connect the PT8211 signals on pins 4, 2, 3. No need to dive into the audio library code. It will "just work" if you use these 2 outputs and wires the signals to the correct pins.
Hi Paul,
Sorry to come back to this, but I still have a question. Having sat down to solder the pt8211 SMT IC onto the T4 breakout board, I see that the difference in documentation is due to the Audio Design Tool referencing the IC's pin #s, not the breakout board's (although the pin chart is labeled "Teensy 4.x pin"). So, that clears up that misunderstanding. But, brings me back to my original problem:
The pin 2 DIN connection on the IC is pin 7 on the breakout board, which is already being utilized by the SGTL5000-1 audio shield. Therefore, it is my understanding that the PT8211 breakout board's pin 7 needs to be rerouted to another pin.
Doesn't the output_i2s_hex.h library accomplish this by utilizing pin #9 for the 3rd DIN and would be compatible with the PT8211-2?
PT8211&SGTL5000.jpg

Thank you for your time, Paul.
:cool:

 
Hex Channel SGTL5000 quad + PT8211

Hello Frank,
Sorry to burden you with this, but I have a question for you regarding the documentation for the PT8211_1 & PT8211_2 objects within the Audio Design Tool.
Are these 2 different models of the PT8211 breakout kit for the T4.x, with different pin outs to T4.x, as follows:
PT8211_1 | PT8211_2
DIN 7 | 2
FS 20 | 3
BK 21 | 4
I only see and have the PT8211_1 breakout kit PCB, which indicates a DIN conflict with SGTL5000_1 on pin 7. It appears that the Audio Tool's pin assignments for the PT8211_2 are different. So, I must wonder whether a PT8211_2 breakout board physically exists, or have we simply not crossed that bridge, yet?
I just checked the continuity of my PCB and discovered that it's input pins 7, 20, & 21 connect to the PT8211 IC pins 3, 2, & 1 respectively.
Should I modify my PT8211 breakout board to reroute it's inputs 7, 20, & 21 to T4.1 pins 2, 3, & 4? Then, will the Audio library automagically output I2S to the appropriate 3 DIN channels, instead of 2 for quad audio?
I also see that there is already an AudioOutputI2SHex object, which appears to utilize T4.1 pin #9 for channels 5 & 6. Is this not the object that I should be using for 6 channel output, except pin #7 would be rerouted to pin #9, instead of pin #2?
Thank you for your guidance, Frank
BR
 
Last edited:
Back
Top