I do not understand what is going on with the "AND" portion of the block diagram. I thought AND had to take Boolean inputs, but the values from symbolSequence.txt are decimal. And what are the "0x2" and "0x1" constants? Are they in hex format?
I can't find the answers to these questions within the VisSim User's Guide or with in the program's help menu.
Thanks.
Sign in or register to post comments and download attachments
However, 0x1 = 1 and 0x2 = 2 so you don't need to use hex in this situation. The "and" operator is doing a bitwise and. In this case, each bit in one binary word is "and"ed with the corresponding bit in the other word. We are using 2 bits in this case.
Sign in or register to post comments and download attachments
1) Use Import block to read data file containing symbols valued 1 thru 3. Set data point interval to 1 sec and disable interpolation.
2) Merge blocks selects frequency and amplitude gains based on testing bits in input symbol stream from import block.
3) Boolean AND of input data with 0x1 tests low order bit 1 (True for binary 01 and 11, decimal 1 and 3), Boolean AND of 0x2 tests bit 2 (binary 10 and 11, decimal 2 and 3)
4) Frequency is controlled by using merge block to apply gain of 4 to 2pi based on symbol bit test from 3). 1/s integrates frequency constant to create ramp of input slope to sin.
5) Amplitude is controlled by using merge block to apply gain of 2 to sin output.
Sign in or register to post comments and download attachments
What is "0x2" format?
I do not understand what is going on with the "AND" portion of the block diagram. I thought AND had to take Boolean inputs, but the values from symbolSequence.txt are decimal. And what are the "0x2" and "0x1" constants? Are they in hex format?
I can't find the answers to these questions within the VisSim User's Guide or with in the program's help menu.
Thanks.
It is hex format
However, 0x1 = 1 and 0x2 = 2 so you don't need to use hex in this situation. The "and" operator is doing a bitwise and. In this case, each bit in one binary word is "and"ed with the corresponding bit in the other word. We are using 2 bits in this case.
Makes sense now, thanks.
I appreciate the response.
ASK-FSK waveform generation
1) Use Import block to read data file containing symbols valued 1 thru 3. Set data point interval to 1 sec and disable interpolation.
2) Merge blocks selects frequency and amplitude gains based on testing bits in input symbol stream from import block.
3) Boolean AND of input data with 0x1 tests low order bit 1 (True for binary 01 and 11, decimal 1 and 3), Boolean AND of 0x2 tests bit 2 (binary 10 and 11, decimal 2 and 3)
4) Frequency is controlled by using merge block to apply gain of 4 to 2pi based on symbol bit test from 3). 1/s integrates frequency constant to create ramp of input slope to sin.
5) Amplitude is controlled by using merge block to apply gain of 2 to sin output.