Download low_cost_pc-based_quad_channel_r
Transcript
Friday, 21 June 2002
Final Report
Colin K McCord
else value = amp * -1.0;
temp = (unsigned short)(512.0+(102.39 * value));
t1 = t1 + 1;
if (t1 > freq) t1 = 1.0;
}
if(m_nCH1WaveType == RANDOM)
{
temp = rand()%1024;
}
ch1_b1 = temp >> 5;
ch1_b1 = ch1_b1 & 0x1F; // & 00011111
ch1_b2 = (unsigned char)temp;
ch1_b2 = ch1_b2 | 0x80; // | 1000 0000
trans (ch1_b1);
trans (ch1_b2);
}
EEE516J4 – Honours Project
Page 89
Chapter 8: The Simulator Program