Zero Comparator for ADAU1452; SigmaStudo V4.2
Some while ago I asked about driving a GPIO output pin from a signal (1Hz square wave oscillator) and was directed to use a "Zero Comparator". I'm now on an ADAU1452 and I want to do the same thing but I just can't find "Zero Comparator" in the Toolbox!! Could some kind person please direct to me to where it is before I go mad!! I'm using SigmaStudio V4.2
Thanks
PhilipJ
Audio Signal Processors
adau1452
SigmaDSP Audio Processors
Hello Philip,
For the -1452 it's under Basic DSP / Logic / Invert. I believe the programmers wanted to separate it from the Signal Invert block which puts a minus sign in front of an arithmetic quantity as opposed to inverting a logic signal.
Best regards,
Bob
Thanks Bob,
I swear I looked down the list so many times yesterday but I just couldn't "see" it !!!
If you have any influence over the guys who write SigmaStudio, would it be possible to suggest a Toolbox search option for a future update ? There are so many blocks now it can be a bit of an issue to find the one you want, or the best one for the job.
Failing that a document (spreadsheet table ?) that lists all the blocks and which of the processor cores they have been implemented for.
Once again, thanks for the help
PhilipJ
Hi again,
sorry to keep bothering you, I've put the following into my ADAU1452 design
but it doesn't seem to be driving the pin, I've also tried the ZeroComp set to 32.0 but no different.
Is it something to do with setting up the pin in the hardware registers ? I currently have the following:
Is this correct ? It is MP13 that I am trying to drive. The output stays stubbornly low, unless I change the "MP13 output low" to read "MP13 output high" when the pin is high.
thanks
PhilipJ
Hi Philip,
Your MP13 register settings are correct. The difficulty stems from how the Zero Comparator and the Square Wave Oscillator work. The square wave oscillator provides a symmetrical square wave with variable output. This matters because digital inputs in SigmaStudio are zero-sensing -- an input exactly at zero is a logic "0", while anything else whether positive or negative is considered a logic "1". So your Zero Comparator saw an input never at zero and thus faithfully set its own output to zero as shown below:
The Real-Time Display blocks are helpful for troubleshooting slow-moving signals like this.
You could try any of several solutions depending on whether and how you're using the square wave elsewhere in your project. The simplest is to substitute a Pulse with Dynamic Duty Cycle block for your square wave oscillator. Another way, shown below, is to process the existing square wave with a Max block to eliminate the negative excursions. A Clipper block would also work here. With this change the MP13 pin works as expected.
And yes, a Toolbox search function would be quite useful!
Best regards,
Bob
Again, thanks Bob,
I have managed to get a very small program to work and Flash the LED!!
I have a big program (32 into 8 mixer) that is doing something weird but I'm encouraged by at least seeing the LED go on and off
Regards
PhilipJ
Please log in to reply.




