Creating a boolean generator from a square wave source?
I have an interesting problem that I have not been able to solve.
What I have is an audio signal path within an ADAU1701 which is split into two lines, each lines having different conditioning, and the output signal is then selected between these two paths with an index selectable multiplexer. What I would like to do is have the selection between the two branches toggle at a constant rate, i.e. Path one is output for "x" seconds and path 2 is output for "x" seconds. My thought was to take an internal square wave oscillator block and somehow condition the signal so that when the square wave is positive a boolean "1" is output and when it is negative a boolean "0" is output. I could then connect this signal to the control port of the mux and it would switch between the two signal lines at whatever frequency the square wave generator is set to. Unfortunately, none of my attempts so far have worked. Any suggestions would be appreciated!
Audio Signal Processors
SigmaDSP Audio Processors
adau1701
Hi audiolab,
The boolean logic in SigmaStudio is in 28.0 format, whereas the square wave is in 5.23, so you have to convert. The easiest way to do this is by using an AB in, CD out cell. I attached an example. If the 5 Hz sine signal is greater than zero, then the output of the logic cell is one (in 28.0 format), and the mux picks input channel 0. If the sine tone is less than zero, then the output of the logic cell is zero (in 28.0 format), and the mux picks input channel 1.
Hi Brett,
I have had a block similar to the above working in another project for some time now. For a new project I am looking at toggling back and forth between three values with a three-input index selectable mux. I have a "common" line, which we can assume corresponds to the mux input selected by decimal value 1. At a rate determined by the frequency of the square wave generator, I want to repetitively switch the mux inputs back and forth in the following manner:
1-0-1-2-1-0-1-2-1-0...
I have tried to get a decimal generator working in this manner using logic blocks, but have not had any luck.
Any suggestions?
Thanks!
audiolab1, how about using these cells to do the job?
Pulse generator
Toggle counter
Index lookup table
Index selectable multiplexer
You can hook them up like this:
Note that the table values are 1,0,1,2 as you requested.
I haven't had a chance to test this on the hardware, but I think it should work in your application.
Please log in to reply.





