LAB REPORT #2


Notice: Undefined offset: 0 in /home/rmhu6fn7r820/public_html/wp-content/themes/opskill-123help/functions.php on line 75

Notice: Trying to get property 'status' of non-object in /home/rmhu6fn7r820/public_html/wp-content/themes/opskill-123help/functions.php on line 75

Essay > Words: 1138 > Rating: Excellent > Buy full access at $1

LAB REPORT #2

Name

Date

Course Code

Table of contents

Abstract                                                                                                          Page 3

Introduction

Sin Wave Generator                                                                                        Page 4

Square Wave Generator                                                                                  Page 5-6

Saw tooth Wave Generator                                                                            Page 7

Conclusion                                                                                                      Page 8

Abstract

The experiment detailed herein was done in classroom. The purpose was to project all the waves on oscilloscope provide by the code teacher. The teacher had explained and showed us Square Wave, Sine Wave and Triangle/Saw tooth Wave. Through C#, the code was embedded into the Net Duino. The circuit that had been made earlier was connected to the Oscilloscope. The three waves were seen in the attacked oscilloscope.

Introduction

The lab report commences by the introduction of the three above mentioned waves. All the waves were generated using the same voltages. The oscilloscope helps to take screen shot of the waves. Additionally, each wave was represented using a code. The Waves are presented as show through the code placed in NetDuino.

Sine Wave Generator

using System;

using System.Net;

usingSystem.Net.Sockets;

usingSystem.Threading;

usingMicrosoft.SPOT;

usingMicrosoft.SPOT.Hardware;

usingSecretLabs.NETMF.Hardware;

usingSecretLabs.NETMF.Hardware.NetduinoPlus;

//Gives a PWM output that, its duty cycle varies as a function of a sine wave.

//It is like DAC. To see a Sine wave on scope pass the output through a low pass RC filter.

//Also if you connect the output to a LED its intensity varies like a sine wave.

namespaceNetduinoPlusPWM_SineWave

{

publicclassProgram

{

publicstaticvoidMain()

{

int value = 0;

int degree = 0;

//PWM pwm = new PWM(Pins.GPIO_PIN_D5);

PWMpwm = newPWM(Cpu.PWMChannel.PWM_3, 500, 0.5, false);//PIN D10

while (true)

{

degree += 1;  // lets go from 0 to 360 degree over and over

degree %= 360;  //remainder of 0-359

// sin() function returns an integer from -1000 to 1000. We need to shift it up by a 1000 to become positive

value = 1000 + Microsoft.SPOT.Math.Sin(degree);  // value is between 0 and 2000

uintnValue = (uint)((value) / 20); // lets scale value from 0-2000 to 0-100. The percent duty cycle is nValue

pwm.DutyCycle = (((float)(nValue))/100);   // set the duty-cycle to a specific nvalue

//Thread.Sleep(10);

// Debug.Print(degree.ToString());

// Debug.Print(value.ToString());

// Debug.Print(nValue.ToString());

}

}

}

}

 

 

 

 

 

 

 

 

Description

In this starting wave generator which is Sine wave, the.............


Type: Essay || Words: 1138 Rating || Excellent

Subscribe at $1 to view the full document.

Buy access at $1
CategoriesUncategorized

LAB REPORT #2


Notice: Undefined offset: 0 in /home/rmhu6fn7r820/public_html/wp-content/themes/opskill-123help/functions.php on line 75

Notice: Trying to get property 'status' of non-object in /home/rmhu6fn7r820/public_html/wp-content/themes/opskill-123help/functions.php on line 75

Essay > Words: 1138 > Rating: Excellent > Buy full access at $1

LAB REPORT #2

Name

Date

Course Code

Table of contents

Abstract                                                                                                          Page 3

Introduction

Sin Wave Generator                                                                                        Page 4

Square Wave Generator                                                                                  Page 5-6

Saw tooth Wave Generator                                                                            Page 7

Conclusion                                                                                                      Page 8

Abstract

The experiment detailed herein was done in classroom. The purpose was to project all the waves on oscilloscope provide by the code teacher. The teacher had explained and showed us Square Wave, Sine Wave and Triangle/Saw tooth Wave. Through C#, the code was embedded into the Net Duino. The circuit that had been made earlier was connected to the Oscilloscope. The three waves were seen in the attacked oscilloscope.

Introduction

The lab report commences by the introduction of the three above mentioned waves. All the waves were generated using the same voltages. The oscilloscope helps to take screen shot of the waves. Additionally, each wave was represented using a code. The Waves are presented as show through the code placed in NetDuino.

Sine Wave Generator

using System;

using System.Net;

usingSystem.Net.Sockets;

usingSystem.Threading;

usingMicrosoft.SPOT;

usingMicrosoft.SPOT.Hardware;

usingSecretLabs.NETMF.Hardware;

usingSecretLabs.NETMF.Hardware.NetduinoPlus;

//Gives a PWM output that, its duty cycle varies as a function of a sine wave.

//It is like DAC. To see a Sine wave on scope pass the output through a low pass RC filter.

//Also if you connect the output to a LED its intensity varies like a sine wave.

namespaceNetduinoPlusPWM_SineWave

{

publicclassProgram

{

publicstaticvoidMain()

{

int value = 0;

int degree = 0;

//PWM pwm = new PWM(Pins.GPIO_PIN_D5);

PWMpwm = newPWM(Cpu.PWMChannel.PWM_3, 500, 0.5, false);//PIN D10

while (true)

{

degree += 1;  // lets go from 0 to 360 degree over and over

degree %= 360;  //remainder of 0-359

// sin() function returns an integer from -1000 to 1000. We need to shift it up by a 1000 to become positive

value = 1000 + Microsoft.SPOT.Math.Sin(degree);  // value is between 0 and 2000

uintnValue = (uint)((value) / 20); // lets scale value from 0-2000 to 0-100. The percent duty cycle is nValue

pwm.DutyCycle = (((float)(nValue))/100);   // set the duty-cycle to a specific nvalue

//Thread.Sleep(10);

// Debug.Print(degree.ToString());

// Debug.Print(value.ToString());

// Debug.Print(nValue.ToString());

}

}

}

}

 

 

 

 

 

 

 

 

Description

In this starting wave generator which is Sine wave, the.............


Type: Essay || Words: 1138 Rating || Excellent

Subscribe at $1 to view the full document.

Buy access at $1
CategoriesUncategorized