Stm32f103C8 External Dac

Working libraries, libraries being ported and related hardware
racemaniac
Posts: 699
Joined: Sat Nov 07, 2015 9:09 am

Re: Stm32f103C8 External Dac

Post by racemaniac » Wed Jan 17, 2018 2:20 pm

Reminds me of my first lightsaber iteration, i went for a similar setup to what OP is trying here. But i did choose consecutive pins (for example PA0 -> PA7), so i could do a write directly to the port registers with my binary data, making it very fast :).
Rather than actually building my own R2R ladder, i used an IC that basically consists of such a ladder, and then 2 amps behind it to get sound from it all :).

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Stm32f103C8 External Dac

Post by Pito » Wed Jan 17, 2018 2:39 pm

You may write an R2R DAC sample in 4 clocks (~56ns) with any pins on PortA and PortB (ie. up to 32bit R2R) - see my previous post.. :)
It requires to write a sketch for generating the DAC sample's "source code" sequence (writing the sketch is left as an exercise to the OP)..
Pukao Hats Cleaning Services Ltd.

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

Re: Stm32f103C8 External Dac

Post by Vassilis » Sat Feb 03, 2018 3:39 pm

Example sketch for using the 12-bit MCP4921 DAC
viewtopic.php?f=18&t=3187&p=40871#p40871

Post Reply