Hi Tim,
Thanks for replying. I'm posting my code.
I will give a detailed explanation of my code. The actual concept is that i'm having four monopole antennae, each namely, LEFT, FORE , RIGHT, AFTER. These antennas will receive signals. Now, I have to do switching between LEFT and RIGHT antennae and between FORE and AFTER antennae. For this i have started my code with simulating two signals, namely left and right. Now, i have to select the signal, ie, choose between left and right. For this i have used the select function.
Now, the problem lies with the control which is to be given tot this select signal.
For giving the control, i have pulses ie, left, fore, right and after. The pulse width is 2.5msec and total no. of samples are 1250. Now, as soon as left is selected, there is a delay of 2.5msec for the next pulse, ie fore and and again a delay of 2.5 msec and so on. Now, when the pulse is high, ie, 1, then the signal coming from left antenna should be selected and when the pulse is low ie, 0, then signal coming from right antenna will be selected. The same switching condition is for fore and after. I just want to know that how the pulse will act as a control for select signal, ie, how i will be switching between two signals.
After switching, adc is used for sampling and then average of the signal is found and then as soon as the signals are switched, they will be displayed by an indicator.
If i get the working of left and right, then i can do the switching of fore and after.
Sanjay