cancel
Showing results for 
Search instead for 
Did you mean: 

on the st8's that have a DAC, can 5VDC be applied to vref+? Or, is there some alternative method to get an output swing of 0-5V?

pmurp.4
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions

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:

  • buffer the DAC output voltage (depending on the DAC used, it has an output resistance between output and pin) and
  • gain by the desired factor

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
pmurp.4
Associate II

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.

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

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:

  • buffer the DAC output voltage (depending on the DAC used, it has an output resistance between output and pin) and
  • gain by the desired factor

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.