I have two BCD counters I want to get an analog output from, I tried connecting them to a R-2R resistor ladder and it worked, partially, I get +~20 mV on each 1's increase, but when 10's increase I get + 120 mV which isn't linear at all.
Because for instance 30 encoded in BCD is 0011|0000 and not 00011110, I thought I should first convert the BCD integer to binary before feeding it to the ladder but I couldn't find any chip for that purpose, so I would have to implement the reverse double dabble algorithm either with a ton of supplementary components or with a microcontroller (which I don't want to use for this project).
So maybe the simplest solution is a sort of resistor ladder that can convert BCD encoded values to analog in a linear fashion but I could find any on the internet.
I'm kind of stuck right now, it's either that or the reverse double dabble but if you guys have another brilliant idea I'm all ears!
@GodJihyo I've implemented the proposed circuit and so far it gives good results like I said about ~25mv for each step which is exactly what I wanted, expect for the 14mv/-114mv step when it comes to the 8's.
To give a bit more context the DAC output will be fed to an op-amp with a thermocouple feedback, in order to drive a heating resistor so I indeed need precise values.
Here's the schematic you asked for note that I directly connected the op-amp output to the inverting terminal since I don't really need amplification, also I used 22k instead of 20k resistors because I don't have 20k resitors, the ratio is slightly changed for the 1's conversion but since it also happen with the 10's and only for the 8 integer it don't think this is the issue.
A buffer would certainly worth a try
I took the measurements before and after the op-amp, results are the same