You are on page 1of 9

https://www.chegg.

com/homework-help/questions-and-answers/matab-problem-ihaveno-clue-function-qspline-x-raw-data-xall-0-1-2-3-4-5-6-7-8-9-10-yall-1-q16293829
please follow the link to a previous chegg question, I really need help on this MATLAB
assignment :/
Thank you in advance

Write MATLAB code for for the following:


Filter any MEG data, then segment into epochs. Remove any bad epochs. Plot the channels,
overlaid using a stacked fft. Select a channel with high alpha activity and plot this channel in
stacked fft comparing eyes open and eyes closed conditions.

Please show all work

Build a 16 bit shift register from two 74LS377 ICs. They should be driving 16 LEDs.
The input should come from the MSP430 Data and Clock signals. Demonstrate an
MSP430 software program that transmits data from the MSP430 to the LEDs of the
shift register.
This code uses P1.0 for data and P1.6 for clock, the project uses the opposite.
Therefore, P1.0 is the clock and P1.6 is Data. Modify the next program to make p1.0=
clock and P1.6 is Data.

// Uses P1.6 as the clock to the external D-Flip-Flop


void ClockData(void)
{
P1OUT |= LS377CLOCK;
__delay_cycles(1);
P1OUT &= ~LS377CLOCK;

// Assert P1.6 (rising clock edge)


// Delay
// De-assert P1.6 (falling clock)

}
// Shift out the value of DataOut to the connected shift register
void SerialDataOut(char DataOut)

{
char i, lsb;

// i = for loop index


// lsb = Value of the Least Significant Bit of DataOut

for(i=0; i<=7; i++)


{
lsb = DataOut & 0x01;

// Set lsb to right most bit of DataOut

// Place the LSB of DataOut on P1.0 and therefore to the input of the shift register
if (lsb)
{
P1OUT |= 0x01;

// Assert P1.0 if the LSB of DataOut is 1

}
else
{
P1OUT &= ~0x01;

// De-assert P1.0 if the LSB of DataOut is 0

}
__delay_cycles(80000);

// Delay

// Clock the Data to the Shift Register


ClockData();
// Shift data left and repeat the for loop
DataOut >>= 0x01;
}
}
/*
* main.c
*/
int main(void) {
char Data;

// Internal value that stores values


// internal to the program and then
// gets sent to shift register

WDTCTL = WDTPW | WDTHOLD;


P1DIR |= MASKMSP430OUTS;

// Stop watchdog timer


// Set P1.0 and P1.6 as outputs

while(1) {
Data = 0x00;
SerialDataOut(Data);
__delay_cycles(800000);
Data = 0x55;

// Clear Data
// Shift Data out to LED's
// Delay
// Shift Out the value 0x55

SerialDataOut(Data);
__delay_cycles(800000);
Data = 0xaa;

// Shift Out the value 0xaa

SerialDataOut(Data);
__delay_cycles(800000);
Data = 0x55;
SerialDataOut(Data);
__delay_cycles(800000);

}
}

// Shift Out the value 0x55

Calculate scalar DC conductivity of plasmas having electron density ne=1014 cm-3 and
electron temperature Te for two cases indicated below, namely weakly ionized and fully
ionized plasmas. How conductivity depends on ne, Te in both cases? Compare obtained
conductivity values with that for materials presented in the figure below.
eg= 10- 15 cm2 and Te=1 eV.a) Weakly ionized plasmas. Background gas pressure
and temperature are pg=1 atm and Tg=300 K, respectively. Consider constant electrongas collision cross-section
b) Fully ionized plasmas. Consider two cases namely Te=1 eV and 100 eV

You might also like