cancel
Showing results for 
Search instead for 
Did you mean: 

Analog output from MLC in lsm6dsv16x

FKara.3
Senior

Hello,

Can we generate analog output from MLC instead of a statement? If we can, could you explain how to do it? I plan to use MLC output as a part of my control algorithm. What is the most efficient way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @FKara.3 ,

This is not possible because our I/O are only digital.

You could try something like this:

  • MLC can generate an interrupt at each class change
  • When receiving interrupts, you can read MLCx_SRC register to understand the current class
  • But then, you need to use DAC from external micro to generate the analog signal on another pin

So the class can be the input for the DAC but you always need an external microcontroller.

If this helps you, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.

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

1 REPLY 1
Federica Bossi
ST Employee

Hi @FKara.3 ,

This is not possible because our I/O are only digital.

You could try something like this:

  • MLC can generate an interrupt at each class change
  • When receiving interrupts, you can read MLCx_SRC register to understand the current class
  • But then, you need to use DAC from external micro to generate the analog signal on another pin

So the class can be the input for the DAC but you always need an external microcontroller.

If this helps you, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.

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.