2021-11-22 03:58 AM
Solved! Go to Solution.
2021-11-23 01:03 AM
Yes, almost correct: the swing for 12bit ranges from 0...4095 which ideally creates an output voltage at the DAC of 0...Vref.
Please also note the values of possible errors listed in the data sheet: differential and integral non linearity, offset error, gain error, total unadjusted error.
And yes, a non-inverting opamp with a gain of (5V/VDDA) would do two things:
Good luck!
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2021-11-22 04:55 AM
The only STM8 with DAC are STM8L151, STM8L152 and STM8L162, all of which may only be operated with a maximum of 3.6V.
The reference voltage Vref+ may typically range from 1.8V to VDDA. VDDA, in turn, may only be in the range 1.8V...3.6V (or 1.8V...VDD, if VDD <3.6V).
May I suggest you how to amplify the signal to achieve a voltage swing of 0...5V with an opamp?
Regards
/Peter
2021-11-22 12:16 PM
thats what I thought. based on what you have said above, does that mean the output swing of the DAC would be 0V for 0 code and Vref/VDDA for maximum code (4096 for 12bits) ideally of course.
2021-11-22 12:25 PM
how would you amplify that to achieve a 5 volt swing? use a non inverting op-amp with a gain of 1.4?
I had hoped to find a micro with a 5V swing that had the DAC on board. cost reduction you know
2021-11-23 01:03 AM
Yes, almost correct: the swing for 12bit ranges from 0...4095 which ideally creates an output voltage at the DAC of 0...Vref.
Please also note the values of possible errors listed in the data sheet: differential and integral non linearity, offset error, gain error, total unadjusted error.
And yes, a non-inverting opamp with a gain of (5V/VDDA) would do two things:
Good luck!
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter