ΣSigmaStudio Ask AI Русский Log in

Negative Flag

SigmaDSP & SigmaStudio AnthonyCSmith Jul 31, 2017 00:00 3 replies Original on forum ↗
Subscribe
AnthonyCSmith Question
Jul 31, 2017 00:00

in sigma studio, is there a way of flagging a negative number?

I need an output if the number is negative so I can encode it.

ADIApproved Reply
Jul 31, 2017 00:00

Hello,

Your process may slightly vary depending on what chip you're using and your signal flow, but here's one way this could be accomplished:

What's happening in this schematic is that the "ABCD 1" block is comparing the input signal to the absolute value of the input signal. If the input signal is positive, these values will be equal, and the block will output a "1" (from Switch 1). If the values are different, it means the signal is negative, and will output a "0" (from Switch1_2). This value is written to GPO1 to be used as a flag.

Regards,

Tyler

5f341ec1f4c530ab1e936aff483382f7.png
5f341ec1f4c530ab1e936aff483382f7.png
5f341ec1f4c530ab1e936aff483382f7.png-555x316.png
5f341ec1f4c530ab1e936aff483382f7.png-555x316.png
AnthonyCSmith Reply
Jul 31, 2017 00:00

Thanks this is good, will try it in the morning

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin