Waveform Generator (Two DAC examples)

Post your cool example code here.
madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Waveform Generator (Two DAC examples)

Post by madias » Wed Aug 26, 2015 9:25 pm

Roger: severe intestinal infection, food poisoning, whatever...it makes me grumpy and I think I also loose brain cells ;)

cubemx, hal, cmsis: Am I right, that it would be really easier for all of us switching between the lines (F1-F7) and porting code? So it would be a lot of work the next months/weeks but much less work in the coming future.

User avatar
mrburnette
Posts: 1877
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Waveform Generator (Two DAC examples)

Post by mrburnette » Thu Aug 27, 2015 12:10 am

madias wrote: <...>
cubemx, hal, cmsis: Am I right, that it would be really easier for all of us switching between the lines (F1-F7) and porting code? So it would be a lot of work the next months/weeks but much less work in the coming future.

I am not so certain:
viewtopic.php?f=46&t=499&start=10#p5074

Ray
Last edited by mrburnette on Thu Aug 27, 2015 6:27 pm, edited 1 time in total.

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Waveform Generator (Two DAC examples)

Post by Vassilis » Thu Aug 27, 2015 11:51 am

I wrote a simple I2S example by using STM32F103C8T and the TDA1543 DAC.
I will publish it soon

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Waveform Generator (Two DAC examples)

Post by madias » Thu Aug 27, 2015 12:05 pm

You are great, Vassilis, thank you :) I've plenty of them (TDA1543) somewhere (but I think they are faulty, works only with 8-bit...but ok for testing something out)
EDIT: Did you really mean STM32F103C8? This MCU has no hardware I2S implemented.

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Waveform Generator (Two DAC examples)

Post by Vassilis » Thu Aug 27, 2015 1:24 pm

madias wrote:EDIT: Did you really mean STM32F103C8? This MCU has no hardware I2S implemented.
I know that! The I2S example I wrote uses the hardware SPI port and can be used on any STM32 with SPI interface ;)
At this time, only the 6-bit output works ok (values from 0-63) :(
I am working on it to solve it

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Waveform Generator (Two DAC examples)

Post by madias » Thu Aug 27, 2015 1:37 pm

Ok, I thought you are fighting throw the I2S skeleton hell in spi.h. Do you own an I2S capable device? Using "plain" SPI for I2S results in nearly less benefit.
About the 6bit: are you sure you own the "standard I2S" TDA1543? There are many faulty ones on aliexpress or ebay. So sometimes they sold the TDA1543A - these only understood the "japanese audio format". Mines are totally faulty: Only 8bit possible...
This is the reason I completely switched to the PT8211 DAC's. Easy to setup with nearly less additional hardware and totally cheap. Best of all: they only use 3 pins: BCK,WS, DIN so no master clock is needed.

Edit: Do you own one of those saleae logic analyzer clones? In the software the I2S protocol is implemented. Helped me a lot on PIC32

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Waveform Generator (Two DAC examples)

Post by Vassilis » Thu Aug 27, 2015 8:44 pm

@Madias I suspect that my TDA1543 chips (NXP) are faulty as yours :(

>>Do you own an I2S capable device?
No, I don't

>>Do you own one of those saleae logic analyzer clones?
Yes I have one

madias
Posts: 813
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Waveform Generator (Two DAC examples)

Post by madias » Thu Aug 27, 2015 10:02 pm

Yeah, than trash it :) I wasted hours with them until i realized that they are faulty.
>>Do you own an I2S capable device?
No, I don't
Ok, I meant the MCU, but I totally forgot you have the VET board (so with hardware I2S). I would send you some PT8211's for free if you are interesting in doing a HW I2S support :)
Honestly: The missing of HW I2S implementation is the last part of the puzzle that I lack to build up a complete synthesizer (with at least 4 independent outputs/voices) with the STM32... but building a core library on my own is beyond my knowledges.

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Waveform Generator (Two DAC examples)

Post by Vassilis » Fri Aug 28, 2015 8:56 am

madias wrote: I would send you some PT8211's for free if you are interesting in doing a HW I2S support :)
Thank you for your kind offer but I already ordered 10 pcs of those DACs.

EDIT: I will try to make a VET6 hardware I2S library. I know it would be hard to do that but I will try.

User avatar
Vassilis
Posts: 320
Joined: Thu May 21, 2015 6:42 am
Location: Thessaloniki, Greece
Contact:

Re: Waveform Generator (Two DAC examples)

Post by Vassilis » Fri Aug 28, 2015 5:55 pm

I wrote a very simple how-to-use sketch example of using the PT8211 I2S DAC with any STM32 device with hardware SPI interface.
Screenshots are included.
http://www.stm32duino.com/viewtopic.php?f=18&t=519

Post Reply