hello there !
I am trying to run the following code (red text )for BPSK modulator
I am fetching the variable "indata " value (for this case 10) from Matlab using RTDX, i need to know how could I pass this variable value to "interrupt void c_int11() ", I have read that, arguments could not be passed to interrupts, can any body help to find some alternate way of doing this?????
Regards,
Mirza Altamash Baig
//Modulation Scheme (BPSK)
#include "DSK6713_aic23.h" //for BPSK Modulation
Uint32 fs=DSK6713_AIC23_FREQ_8KHZ; //Sampling frequency
#include <math.h>
/**************************************************************************/
//BPSK Initialization:
/********************/
int i_BPSK_M;
int j_BPSK_M;
int masked_value, output ;
//Data table for BPSK MOD & DEMOD:
int data_BPSK[2][4]={0, 1000, 0, -1000, //0 degree
0, -1000, 0, 1000}; //180 degree
interrupt void c_int11() //interrupt service routine
{
int sample_data;
// binary equivalent of 43690 (dec)=1010101010101010 (bin)
//52428=1100110011001100
//61680=1111000011110000
//BPSK Modulator
if (i_BPSK_M==64) //determines when to get new input
{
sample_data = indata; //input_sample() //inputs data
i_BPSK_M=0;
j_BPSK_M=0;
}
masked_value = sample_data & 0x0001; //masks input sample as 1-bit segments
output = data_BPSK[masked_value][j_BPSK_M]; //gets corresponding level from table
output_sample(output*2); //outputs corresponding sinusoid
j_BPSK_M++; //repeated output counter
if (j_BPSK_M==4)
//checks if 1-bit segment was output
{
j_BPSK_M=0;
sample_data = sample_data >> 1; //shifts input so as to mask another part
}
i_BPSK_M++;
return;
}
void main(void)
{
int indata=10;
i_BPSK_M=64;
j_BPSK_M=0;
comm_intr(); //init DSK, codec, McBSP
while(1); // infinite loop
}