cancel
Showing results for 
Search instead for 
Did you mean: 

DAC on STM8L151Gx or STM8L151Kx - no output buffer available?

SLasn.1
Associate II

Hi :)

I am using an STM8L151G6U6, and found out I missed something in the datasheet.

Datasheet is DS6372: https://www.st.com/resource/en/datasheet/stm8l151g6.pdf

RM is RM0031: https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf

It seems that for the the 28-pin or 32-pin packages ("Gx" or "Kx" model number) it is not possible to use the DAC output buffer?

Section 9.3.13 12-bit DAC characteristics of the datasheet (pages 105 & 106) shows the following:

0693W0000059N4dQAE.png 

A few questions:

  1. I guess I am never allowed to switch the BOFF bit in the DAC_CHxCR1? The RM only mentions it in Table 49 (page 228)
  2. What does "no load" mean? I somehow do need to send the DAC output somewhere and that will have a load.
  3. Can I for example drive a 5k load anyways, and just take into account the output impedance which will reduce the signal amplitude?
  4. And regarding the output impedance, should I then add the values from Table 51 (internal resistance between DAC output and PB4/5/6 pins) to the DAC output impedance of 8-10k?

Thank you!

Simon

PS: very tricky that the datasheet mentions "buffered DAC" everywhere, even though you can only use the output buffer on a third of the devices. But I guess that is on me for going too fast on the DAC section :D

1 REPLY 1
SLasn.1
Associate II

So today I made some measurements with the MCU:

* I get a Zout of around 15k-16k - which is strange since according to the datasheet the maximum value should be 11.4k!!  The way I measured it was by measuring the voltage drop when I put a resistor at the output. I tried a few different resistors (going from 1k to 100k) and the results were quite consistent.

* By mistake, the internal output buffer was on - and it actually works perfectly fine... I got an output impedance of 700 ohms, which will work fine with my setup. But I guess I gotta trust the datasheet and turn it off (ON is the default setting though).