#include //The global interrupt flag is maintained in the I bit of the status register (SREG).
#include //This header file includes the apropriate IO definitions for the device that has been
specified by the -mmcu= compiler command-line switch. This is done by diverting to the
appropriate file which should never be included directly. Some register names common to all
AVR devices are defined directly within , which is included in , but most of the details come
from the respective include file.
#include //The functions in this header file are wrappers around the basic busy-wait functions
from . They are meant as convenience functions where actual time values can be specified rather
than a number of cycles to wait for. The idea behind is that compile-time constant expressions
will be eliminated by compiler optimization so floating-point expressions can be used to
calculate the number of delay cycles needed based on the CPU frequency passed by the macro
F_CPU.
#include \"oi.h\"//This header file includes the apropriate IO definitions
//the #define directive allows the definition of macros within your source code. These macro
definitions allow constant values to be declared for use throughout your code. Macro definitions
are not variables and cannot be changed by your program code like variables.
#define USB 1
#define CR8 2 // toggle between usb and create on CM serial processor
//Methods used in program
void setSerial(uint8_t com);
uint8_t getSerialDestination(void);/*------------------------built in, sends back Serial Destination*/
void writeChar(char c, uint8_t com);/*------------ --taken from command modual manual. sends
data to computer via the USB cable*/
void delay(void);/* Checks the delayed period*/
void byteTx(uint8_t value);/*Transmit a byte over the serial port*/
void Init_Uart(void);/* Initialize the values */
uint8_t byteRx(void);/*------------------------------reads from the serial port*/
//This is main method for the program
void main(void)
{
uint8_t rx_data;
Init_Uart();
/* Writing the character by character using the while loop */
while(1)
{
writeChar(\'H\',USB);
writeChar(\'e\',USB);
writeChar(\'l\',USB);
writeChar(\'l\',USB);
writeChar(\'o\',USB);
writeChar(\' \',USB);
writeChar(\'W\',USB);
writeChar(\'o\',USB);
writeChar(\'r\',USB);
writeChar(\'l\',USB);
writeChar(\'d\',USB);
writeChar(\'!\',USB);
}
}
/*Initialize the values */
void Init_Uart(void)
{
UBRR0 = 59;
UCSR0B = 0x18;
UCSR0C = 0x06;
DDRB = 0X10;
PORTB = 0X10;
}
/*Used to check the delayed time */
void delay(void)
{
int i=0,j=0;
for(i=1;i<=1000;i++)
{
for(j=1;j<=1000;j++)
{
}
}
}
//****************************************************************************
****************
/*the following three functions came directly from the command module manual
they change the flow of data so that when byteTx is called it sends data
from the create to the computer through the USB cable. when it is done sending
data it returns the com port to its original state, giving commands to .
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
U-Boot, a boot loader for Embedded boards based on PowerPC, ARM, MIPS and several other processors, which can be installed in a boot ROM and used to initialize and test the hardware or to download and run application
code.
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdfajay1317
/* # INPUT: a node z in the AVL Tree # OUTPUT: the new root node r of the subtree originally
rooted at z before the restructure/rebalancing at z # PRECONDITION: z is the only unbalanced
node in the subtree that it roots; the difference in height of its children is exactly 2 #
POSTCONDITION: the subtree originally rooted at z is a proper AVL subtree with node heights
properly set AVLTreeMap: : Node* AVLTreeMap::rebalance(AVLTreeMap::Node* z) {
AVLTreeMap::Node* r=z; // Your code here return r;.
This presentation is Part 2 of 3 illustrating ARM® Cortex™ M boot sequence. Hands on illustration uses EFM®32 Zero Gecko starter kit based on Cortex M0+ core from Silicon Labs.
Simplicity Studio IDE from Silicon Labs was used to create a sample project (Bundled with Simplicity Studio), set breakpoints and inspect various entry points and other points of interest to get a introductory look at Cortex boot sequence
httplinux.die.netman3execfork() creates a new process by.docxadampcarr67227
http://linux.die.net/man/3/exec
fork() creates a new process by duplicating the calling process. The new process, referred to as the child, is an exact duplicate of the calling process, referred to as the parent#include <unistd.h>pid_t fork(void);
The exec() family of functions replaces the current process image with a new process image. The functions described in this manual page are front-ends for execve(2). (See the manual page for execve(2) for further details about the replacement of the current process image.)
The exec() family of functions include execl, execlp, execle, execv, execvp, and execvpe to execute a file.
The ANSI prototype for execl() is:
int execl(const char *path, const char *arg0,..., const char *argn, 0)
http://www.cems.uwe.ac.uk/~irjohnso/coursenotes/lrc/system/pc/pc4.htm #inciude <stdio.h> #inciude <unistd.h> main() { execl("/bin/ls", "ls", "-l", 0); printf("Can only get here on error\n"); }
The first parameter to execl() in this example is the full pathname to the ls command. This is the file whose contents will be run, provided the process has execute permission on the file. The rest of the execl() parameters provide the strings to which the argv array elements in the new program will point. In this example, it means that the ls program will see the string ls pointed to by its argv[0], and the string -l pointed to by itsargv[1]. In addition to making all these parameters available to the new program, the exec() calls also pass a value for the variable: extern char **environ;
This variable has the same format as the argv variable except that the items passed via environ are the values in the environment of the process (like any exported shell variables), rather than the command line parameters. In the case of execl(), the value of the environ variable in the new program will be a copy of the value of this variable in the calling process.
The execl() version of exec() is fine in the circumstances where you can ex-plicitly list all of the parameters, as in the previous example. Now suppose you want to write a program that doesn't just run ls, but will run any program you wish, and pass it any number of appropriate command line parameters. Obviously, execl() won't do the job.
The example program below, which implements this requirement, shows, however, that the system call execv() will perform as required: #inciude <stdio.h> main(int argc, char **argv) { if (argc==1) { printf("Usage: run <command> [<paraneters>]\n"); exit(1) } execv(argv[l], &argv[1)); printf("Sorry... couldn't run that!\n"); }
The prototype for execv() shows that it only takes two parameters, the first is the full pathname to the command to execute and the second is the argv value you want to pass into the new program. In the previous example this value was derived from the argv value passed into the run command, so that the run command can take the command line parameter values you pass it and just pass them on. int execl(.
Data structuresUsing java language and develop a prot.pdfarmyshoes
Data structures:
****Using java language and develop a prototype for a demo program that reads in strings that
look like:
Using the infix to postfix code below:
A = 3; // your code should store A and 3 as a key-value pair
B = 4; // your code should store B and 4 as a key-value pair
A; // your code should now look-up A and then display its value
later we (you) will add the ability to write
Y = A * B + 3;
Y; // your code should show 16
Using this code
// infix.java
// converts infix arithmetic expressions to postfix
// to run this program: C>java InfixApp
import java.io.*; // for I/O
////////////////////////////////////////////////////////////////
class StackX {
private int maxSize;
private char[] stackArray;
private int top;
// --------------------------------------------------------------
public StackX(int s) // constructor
{
maxSize = s;
stackArray = new char[maxSize];
top = -1;
}
// --------------------------------------------------------------
public void push(char j) // put item on top of stack
{
stackArray[++top] = j;
}
// --------------------------------------------------------------
public char pop() // take item from top of stack
{
return stackArray[top--];
}
// --------------------------------------------------------------
public char peek() // peek at top of stack
{
return stackArray[top];
}
// --------------------------------------------------------------
public boolean isEmpty() // true if stack is empty
{
return (top == -1);
}
// -------------------------------------------------------------
public int size() // return size
{
return top + 1;
}
// --------------------------------------------------------------
public char peekN(int n) // return item at index n
{
return stackArray[n];
}
// --------------------------------------------------------------
public void displayStack(String s) {
System.out.print(s);
System.out.print(\"Stack (bottom-->top): \");
for (int j = 0; j < size(); j++) {
System.out.print(peekN(j));
System.out.print(\' \');
}
System.out.println(\" \");
}
// --------------------------------------------------------------
} // end class StackX
////////////////////////////////////////////////////////////////
class InToPost // infix to postfix conversion
{
private StackX theStack;
private String input;
private String output = \"\";
// --------------------------------------------------------------
public InToPost(String in) // constructor
{
input = in;
int stackSize = input.length();
theStack = new StackX(stackSize);
}
// --------------------------------------------------------------
public String doTrans() // do translation to postfix
{
for (int j = 0; j < input.length(); j++) {
char ch = input.charAt(j);
theStack.displayStack(\"For \" + ch + \" \"); // *diagnostic*
switch (ch) {
case \'+\': // it’s + or -
case \'-\':
gotOper(ch, 1); // go pop operators
break; // (precedence 1)
case \'*\': // it’s * or /
case \'/\':
gotOper(ch, 2); // go pop operators
break; // (precedence 2)
case \'(\': // it’s a left paren
theStack.push(.
C, D, and E are wrong and involve random constants. Thisnarrows it d.pdfarasanlethers
C, D, and E are wrong and involve random constants. Thisnarrows it down to A and B; it is A
because the negative sign meansthat energy is being given off when it (SO2) forms.
I hope you found this helpful, please rate! :)
I hope you found this helpful, please rate! :)
Solution
C, D, and E are wrong and involve random constants. Thisnarrows it down to A and B; it is A
because the negative sign meansthat energy is being given off when it (SO2) forms.
I hope you found this helpful, please rate! :)
I hope you found this helpful, please rate! :).
More Related Content
Similar to #include avrinterrupt.h The global interrupt flag is maintained.pdf
proxyc CSAPP Web proxy NAME IMPORTANT Giv.pdfajay1317
/* # INPUT: a node z in the AVL Tree # OUTPUT: the new root node r of the subtree originally
rooted at z before the restructure/rebalancing at z # PRECONDITION: z is the only unbalanced
node in the subtree that it roots; the difference in height of its children is exactly 2 #
POSTCONDITION: the subtree originally rooted at z is a proper AVL subtree with node heights
properly set AVLTreeMap: : Node* AVLTreeMap::rebalance(AVLTreeMap::Node* z) {
AVLTreeMap::Node* r=z; // Your code here return r;.
This presentation is Part 2 of 3 illustrating ARM® Cortex™ M boot sequence. Hands on illustration uses EFM®32 Zero Gecko starter kit based on Cortex M0+ core from Silicon Labs.
Simplicity Studio IDE from Silicon Labs was used to create a sample project (Bundled with Simplicity Studio), set breakpoints and inspect various entry points and other points of interest to get a introductory look at Cortex boot sequence
httplinux.die.netman3execfork() creates a new process by.docxadampcarr67227
http://linux.die.net/man/3/exec
fork() creates a new process by duplicating the calling process. The new process, referred to as the child, is an exact duplicate of the calling process, referred to as the parent#include <unistd.h>pid_t fork(void);
The exec() family of functions replaces the current process image with a new process image. The functions described in this manual page are front-ends for execve(2). (See the manual page for execve(2) for further details about the replacement of the current process image.)
The exec() family of functions include execl, execlp, execle, execv, execvp, and execvpe to execute a file.
The ANSI prototype for execl() is:
int execl(const char *path, const char *arg0,..., const char *argn, 0)
http://www.cems.uwe.ac.uk/~irjohnso/coursenotes/lrc/system/pc/pc4.htm #inciude <stdio.h> #inciude <unistd.h> main() { execl("/bin/ls", "ls", "-l", 0); printf("Can only get here on error\n"); }
The first parameter to execl() in this example is the full pathname to the ls command. This is the file whose contents will be run, provided the process has execute permission on the file. The rest of the execl() parameters provide the strings to which the argv array elements in the new program will point. In this example, it means that the ls program will see the string ls pointed to by its argv[0], and the string -l pointed to by itsargv[1]. In addition to making all these parameters available to the new program, the exec() calls also pass a value for the variable: extern char **environ;
This variable has the same format as the argv variable except that the items passed via environ are the values in the environment of the process (like any exported shell variables), rather than the command line parameters. In the case of execl(), the value of the environ variable in the new program will be a copy of the value of this variable in the calling process.
The execl() version of exec() is fine in the circumstances where you can ex-plicitly list all of the parameters, as in the previous example. Now suppose you want to write a program that doesn't just run ls, but will run any program you wish, and pass it any number of appropriate command line parameters. Obviously, execl() won't do the job.
The example program below, which implements this requirement, shows, however, that the system call execv() will perform as required: #inciude <stdio.h> main(int argc, char **argv) { if (argc==1) { printf("Usage: run <command> [<paraneters>]\n"); exit(1) } execv(argv[l], &argv[1)); printf("Sorry... couldn't run that!\n"); }
The prototype for execv() shows that it only takes two parameters, the first is the full pathname to the command to execute and the second is the argv value you want to pass into the new program. In the previous example this value was derived from the argv value passed into the run command, so that the run command can take the command line parameter values you pass it and just pass them on. int execl(.
Data structuresUsing java language and develop a prot.pdfarmyshoes
Data structures:
****Using java language and develop a prototype for a demo program that reads in strings that
look like:
Using the infix to postfix code below:
A = 3; // your code should store A and 3 as a key-value pair
B = 4; // your code should store B and 4 as a key-value pair
A; // your code should now look-up A and then display its value
later we (you) will add the ability to write
Y = A * B + 3;
Y; // your code should show 16
Using this code
// infix.java
// converts infix arithmetic expressions to postfix
// to run this program: C>java InfixApp
import java.io.*; // for I/O
////////////////////////////////////////////////////////////////
class StackX {
private int maxSize;
private char[] stackArray;
private int top;
// --------------------------------------------------------------
public StackX(int s) // constructor
{
maxSize = s;
stackArray = new char[maxSize];
top = -1;
}
// --------------------------------------------------------------
public void push(char j) // put item on top of stack
{
stackArray[++top] = j;
}
// --------------------------------------------------------------
public char pop() // take item from top of stack
{
return stackArray[top--];
}
// --------------------------------------------------------------
public char peek() // peek at top of stack
{
return stackArray[top];
}
// --------------------------------------------------------------
public boolean isEmpty() // true if stack is empty
{
return (top == -1);
}
// -------------------------------------------------------------
public int size() // return size
{
return top + 1;
}
// --------------------------------------------------------------
public char peekN(int n) // return item at index n
{
return stackArray[n];
}
// --------------------------------------------------------------
public void displayStack(String s) {
System.out.print(s);
System.out.print(\"Stack (bottom-->top): \");
for (int j = 0; j < size(); j++) {
System.out.print(peekN(j));
System.out.print(\' \');
}
System.out.println(\" \");
}
// --------------------------------------------------------------
} // end class StackX
////////////////////////////////////////////////////////////////
class InToPost // infix to postfix conversion
{
private StackX theStack;
private String input;
private String output = \"\";
// --------------------------------------------------------------
public InToPost(String in) // constructor
{
input = in;
int stackSize = input.length();
theStack = new StackX(stackSize);
}
// --------------------------------------------------------------
public String doTrans() // do translation to postfix
{
for (int j = 0; j < input.length(); j++) {
char ch = input.charAt(j);
theStack.displayStack(\"For \" + ch + \" \"); // *diagnostic*
switch (ch) {
case \'+\': // it’s + or -
case \'-\':
gotOper(ch, 1); // go pop operators
break; // (precedence 1)
case \'*\': // it’s * or /
case \'/\':
gotOper(ch, 2); // go pop operators
break; // (precedence 2)
case \'(\': // it’s a left paren
theStack.push(.
C, D, and E are wrong and involve random constants. Thisnarrows it d.pdfarasanlethers
C, D, and E are wrong and involve random constants. Thisnarrows it down to A and B; it is A
because the negative sign meansthat energy is being given off when it (SO2) forms.
I hope you found this helpful, please rate! :)
I hope you found this helpful, please rate! :)
Solution
C, D, and E are wrong and involve random constants. Thisnarrows it down to A and B; it is A
because the negative sign meansthat energy is being given off when it (SO2) forms.
I hope you found this helpful, please rate! :)
I hope you found this helpful, please rate! :).
AnswerOogenesis is the process by which ovum mother cells or oogo.pdfarasanlethers
Answer:
Oogenesis is the process by which ovum mother cells or oogonia gives rise to mature ovum- the
female gametes. The process takes place in the outermost layer- the germinal epithelium of the
ovary.
Meiotic Events in oogenesis:
Initially before birth, the oogonium undergoes mitotic divisions so as to increase its number. This
process takes place during the embryonic growth phase. No further addition to this number takes
place after birth. In the human embryo, the thousand or so oogonia divide rapidly from the
second to the seventh month of gestation to form roughly 7 million germ cells. After the seventh
month though, there is a sharp decline in the number of these newly formed cells. These
remaining cells are the ones entering the reductional division of meiosis (meiosis-1). These cells
enters into meiosis-1 but they are unable to advance through Prophase-1 of meiosis. These cells
are arrested in the diplotene sub-stage of Prophase-1 and they are maintained at this stage until
puberty. These cells are now known as primary oocytes. Even the primary oocytes continue to
die during this phase. Roughly only about 400 oocytes mature during the reproductive life of a
female periodically. At the onset of puberty, specific hormonal cues re-initiate the process of
meiosis.
During adolescence, the GnRH or gonadotropin releasing hormones released from the
hypothalamus signals the anterior pituitary to release hormones like LH & FSH which lifts the
cell cycle arrest in these cells and assists them in resuming meiosis. The primary oocytes
completes meiosis-1 and gives rise to a tiny polar body and another larger secondary oocyte with
greater content of cytoplasm ( unequal cell division). In some organisms , the polar bodies may
again divide to form 2 polar bodies while it dies off in case of humans. The secondary oocyte
thus produced advances through Meiosis-2 ( equational division) but halts at meiosis-2. The
secondary oocyte is released from the follicle and it travels towards the fallopian tube. The
immature secondary oocyte can re-enter cell cycle and complete the remaining sub-stages of
meiosis-2 only if union with a sperm takes place. The secondary oocyte progresses through
meiosis-2 giving rise to another polar body and a female pro-nucleus which unites with the
sperm and gives rise to the zygote or the fertilized egg. Thus begins the process of embryonic
development.
Developmental process in oogenesis:
Oogonia are formed from the primoridial germ cells of the ovary by mitotic cell division. By
growth & maturation oogonia increase in size and become primary oocytes. During this phase,
synthesis of food and factors required for further differentiation are synthesized. During the
growth phase, the primary oocytes gets surrounded by specialized cells of the ovary known as
follicle cells. Once they are fully formed, cavities are formed and these gets filled with their own
secretion. At this stage, it is known as Graafian follicle. Oocyte collects .
AnswerB) S. typhimuium gains access to the host by crossing the.pdfarasanlethers
Answer:
B) S. typhimuium gains access to the host by crossing the intestinal epithelium inside M cells
The M cells are found in the gut-associated lymphoid tissue (GALT) of the Peyer\'s patches and
in the mucosa-associated lymphoid tissue (MALT) of other parts of the gastrointestinal tract.
These cells are known to initiate mucosal immunityresponses on the apical membrane of the M
cells and allow for transport of microbes and particles across the epithelial cell layer from the gut
lumen to the lamina propria where interactions with immune cells can take place. M cells have
the unique ability to take up antigen from the lumen of the small intestine via endocytosis,
phagocytosis, or transcytosis.
Solution
Answer:
B) S. typhimuium gains access to the host by crossing the intestinal epithelium inside M cells
The M cells are found in the gut-associated lymphoid tissue (GALT) of the Peyer\'s patches and
in the mucosa-associated lymphoid tissue (MALT) of other parts of the gastrointestinal tract.
These cells are known to initiate mucosal immunityresponses on the apical membrane of the M
cells and allow for transport of microbes and particles across the epithelial cell layer from the gut
lumen to the lamina propria where interactions with immune cells can take place. M cells have
the unique ability to take up antigen from the lumen of the small intestine via endocytosis,
phagocytosis, or transcytosis..
Answer question1,2,4,5Ion–dipole interactionsAffinity of oxygen .pdfarasanlethers
Answer question
1,2,4,5Ion–dipole interactionsAffinity of oxygen towards cationsDipole–dipole
interactionsHydrationAffinity of hydrogen towards anionsHydrogen bonding
Solution
Answer question
1,2,4,5Ion–dipole interactionsAffinity of oxygen towards cationsDipole–dipole
interactionsHydrationAffinity of hydrogen towards anionsHydrogen bonding.
A Letter to myself!Hi to myself!Now that I am an Engineer with a.pdfarasanlethers
A Letter to myself!
Hi to myself!
Now that I am an Engineer with a certified degree, as an Engineer I aspire to do some wonderful
things for myself and society. As I studied the Civil Engineering and about the wonders that it
has created for the well being of the society and the world, it amused me and inpired me to
become an Engineer. I want to design the bridges, tunnels, skyscrappers and dams which
wouldn\'t fail and please to the eyes. In history we have seen the engineering disasters such as
the Tacoma Washington bridge disaster, in which the wind loads were ignored while designing.
We learned from such disasters and improved our bridge by incorporating the wind and other
loads such as earthquake loads. There has been a revolution in the Civil Engineering field since
the advent of the cement and reinforced concrete. Initially we could only design low strength
concrete but now with the help of the admixtures and air-entraining agents we can design a mix
of strength greater than 70 MPa.
Empire State Building was constructed in 1932 and remained the tallest skyscraper till 1967,
until we learn to create the taller structures. Now we know that Burj Khalifa is the tallest
standing structure in the world with a height almost double of that of Empire state building.
Empire state building is now at 9th in the ranking of the tallest structure. Similarl trends can be
observed in the design of the bridges, tunnels and dams.
What we learn from all this history is that, there is never a full stop to the impovement of the
design of the structures. In present world, we still have many problems, such as the
environmental issues related with the use and production of the cement, which is responsible for
the production of a large proportion of the green house gases. There is a need to find the better
alternative of the cement. We still can\'t construct the earthquake proof buildings, and there
always will be a need for improvement in this field. More than one million people die each year
in the road crashes, many of which occur due to the poor design and construction, there is a need
of the better Intelligent Traffic Systems(ITS.)
I see that there is a lot to be improved in the current engineering field, so I will find the best
opportunity to serve my techniques and skills to work in any of the abovementioned fields.
Thank You!
Solution
A Letter to myself!
Hi to myself!
Now that I am an Engineer with a certified degree, as an Engineer I aspire to do some wonderful
things for myself and society. As I studied the Civil Engineering and about the wonders that it
has created for the well being of the society and the world, it amused me and inpired me to
become an Engineer. I want to design the bridges, tunnels, skyscrappers and dams which
wouldn\'t fail and please to the eyes. In history we have seen the engineering disasters such as
the Tacoma Washington bridge disaster, in which the wind loads were ignored while designing.
We learned from such disasters and .
Particulars Amount ($) Millons a) Purchase consideratio.pdfarasanlethers
Particulars Amount ($) Millons a) Purchase consideration paid 6.3 b) Net Assets
Aquired: Land 1.2 Buildings 2.9 Inventory 1.7 Liabilities -1 4.8 (a) - (b)
Good Will 1.5
Solution
Particulars Amount ($) Millons a) Purchase consideration paid 6.3 b) Net Assets
Aquired: Land 1.2 Buildings 2.9 Inventory 1.7 Liabilities -1 4.8 (a) - (b)
Good Will 1.5.
while determining the pH the pH of the water is n.pdfarasanlethers
while determining the pH the pH of the water is not considered actually when salts
are added to water it dissciated to form H+ ions leading to increase in H+ ion concentration and
decrease in pH
Solution
while determining the pH the pH of the water is not considered actually when salts
are added to water it dissciated to form H+ ions leading to increase in H+ ion concentration and
decrease in pH.
Quantum Numbers and Atomic Orbitals By solving t.pdfarasanlethers
Quantum Numbers and Atomic Orbitals By solving the Schrödinger equation (Hy
= Ey), we obtain a set of mathematical equations, called wave functions (y), which describe the
probability of finding electrons at certain energy levels within an atom. A wave function for an
electron in an atom is called an atomic orbital; this atomic orbital describes a region of space in
which there is a high probability of finding the electron. Energy changes within an atom are the
result of an electron changing from a wave pattern with one energy to a wave pattern with a
different energy (usually accompanied by the absorption or emission of a photon of light). Each
electron in an atom is described by four different quantum numbers. The first three (n, l, ml)
specify the particular orbital of interest, and the fourth (ms) specifies how many electrons can
occupy that orbital. Principal Quantum Number (n): n = 1, 2, 3, …, 8 Specifies the energy of
an electron and the size of the orbital (the distance from the nucleus of the peak in a radial
probability distribution plot). All orbitals that have the same value of n are said to be in the same
shell (level). For a hydrogen atom with n=1, the electron is in its ground state; if the electron is in
the n=2 orbital, it is in an excited state. The total number of orbitals for a given n value is n2.
Angular Momentum (Secondary, Azimunthal) Quantum Number (l): l = 0, ..., n-1. Specifies the
shape of an orbital with a particular principal quantum number. The secondary quantum number
divides the shells into smaller groups of orbitals called subshells (sublevels). Usually, a letter
code is used to identify l to avoid confusion with n: l 0 1 2 3 4 5 ... Letter s p d f g h ... The
subshell with n=2 and l=1 is the 2p subshell; if n=3 and l=0, it is the 3s subshell, and so on. The
value of l also has a slight effect on the energy of the subshell; the energy of the subshell
increases with l (s < p < d < f). Magnetic Quantum Number (ml): ml = -l, ..., 0, ..., +l. Specifies
the orientation in space of an orbital of a given energy (n) and shape (l). This number divides the
subshell into individual orbitals which hold the electrons; there are 2l+1 orbitals in each subshell.
Thus the s subshell has only one orbital, the p subshell has three orbitals, and so on. Spin
Quantum Number (ms): ms = +½ or -½. Specifies the orientation of the spin axis of an electron.
An electron can spin in only one of two directions (sometimes called up and down). The Pauli
exclusion principle (Wolfgang Pauli, Nobel Prize 1945) states that no two electrons in the same
atom can have identical values for all four of their quantum numbers. What this means is that no
more than two electrons can occupy the same orbital, and that two electrons in the same orbital
must have opposite spins. Because an electron spins, it creates a magnetic field, which can be
oriented in one of two directions. For two electrons in the same orbital, the spins must be
opposite to each oth.
They are molecules that are mirror images of each.pdfarasanlethers
They are molecules that are mirror images of each other. They have the same basic
structure, but are rearranged in such a way that it is impossible to turn one into the other by
simple rotation.
Solution
They are molecules that are mirror images of each other. They have the same basic
structure, but are rearranged in such a way that it is impossible to turn one into the other by
simple rotation..
Well u put so many type of compounds here.Generally speakingi) t.pdfarasanlethers
Well u put so many type of compounds here.
Generally speaking
i) the materials or compounds or biological compounds which contains acidic protons [ the
protons which can be replaceable by the addition of base]
ii) compounds containing double bonds i.e. unsaturation
iii) compounds containing polar functional groups like aldehyde , ketones , esters etc
do react dramatically with the addition of acids or bases.
eg. materials :- inorganic acid / bases
biological system :- porphyrene system [contains replaceable hydrogen atoms]
Solution
Well u put so many type of compounds here.
Generally speaking
i) the materials or compounds or biological compounds which contains acidic protons [ the
protons which can be replaceable by the addition of base]
ii) compounds containing double bonds i.e. unsaturation
iii) compounds containing polar functional groups like aldehyde , ketones , esters etc
do react dramatically with the addition of acids or bases.
eg. materials :- inorganic acid / bases
biological system :- porphyrene system [contains replaceable hydrogen atoms].
Ventilation is the process of air going in and out of lungs. Increas.pdfarasanlethers
Ventilation is the process of air going in and out of lungs. Increased ventilation elevates the
oxygen level in arterial blood. It also alters the pH of blood, calcium level affecting the nerves,
muscles etc.
Solution
Ventilation is the process of air going in and out of lungs. Increased ventilation elevates the
oxygen level in arterial blood. It also alters the pH of blood, calcium level affecting the nerves,
muscles etc..
A1) A living being or an individual is known as an organism and it i.pdfarasanlethers
A1) A living being or an individual is known as an organism and it is a member of a species. A
species is a group of organisms that contains a set of specialized characteristics which distinguish
them from other organisms. The number of variety of species occurring in a community is
known as the species diversity. Species diversity has two important components-species richness
and species evenness. The species richness is the number of different species present in a
community. For example, a biological community like a coral reef contains large number of
species existing within the community and exhibits the high species richness. In contrast a forest
community containing limited number of specific plants exhibits low species richness. More
number of species present in an ecosystem represent its health because of the absence of factors
like nutrient depletion, competition, predation and extinction of species.
A2) New species arrive in habitat by geographical isolation and by immigration. The island
closer to the main land becomes a big source of immigration and have higher immigration rate
and contains higher species richness. The island distant from the main land has low immigration
rates because the species have to travel a lot to reach the island. Thus, these two factors influence
the species richness on the islands.
A3) A species chooses a specific habitat depending on availability of resources like nutrients and
other biotic factors. A diverse ecosystem with great variety of producer species producing more
plant biomass supports a great variety of a consumer species. The greater species richness in an
ecosystem makes it more productive, stable and sustainable. The greater species richness
promotes the food web and biotic interactions within the ecosystems resulting in greater
sustainability and enables to withstand the environmental disturbances like drought.
A4)
Native species are those that live in a specific ecosystem. Other species that migrate or
accidentally introduced in to another ecosystem are called as non native species or invasive or
exotic species.
The species that indicate or intimate the early warning of the damage to a community or an
ecosystem are known as indicator species. Birds are very good biological indicators as they can
predict the environmental changes rapidly.
The habitat loss by species is due to human activitites which introduce a species into a new
geographic location. For example, wild African honey bees known as killer bees were imported
to Brazil and caused damaged to native honey bees. Human activities like heavy utilization of
chemical pesticides is declining the populations of bird species. Butter flies are also good
indicator species as they are associated with several plant species making them vulnerable to
habitat loss and fragmentation due to heavy chemical fertilizers and pesticide usage. These
activities make the species to find new habitat to colonize and survive.
Solution
A1) A living being or .
there are laws and regulations that would pertain to an online breac.pdfarasanlethers
there are laws and regulations that would pertain to an online breach of 10,000 patient records
with identifiable data such as ssn and payment history ie HIPAA (health insurance portability
and accountability act ) is a fedral law that provides baseline privacy and security standards for
medical information and the us department health and human services is the fedral agency
incharge of creating rules that implement HIPAA and also enforcing HIPAA and this security
rule ie it protects only electronic medical records and it also applies to covered entities and there
are three types of covered entities ie health care providers get paid to provide health care doctors
, dentists , nursing homes ,hospitals, urgent medical care etc and the health care in order to
provide health care in exchange for payment . health plans play the cost of medical care like
health insurance companies .health care clearing houses process information so that it can be
transmitted in standard format between covered entities for eg they take the important
information from doctor and put it in standard code format that can be used for insurance
purposes . a bussiness associate acts as subcontractors as they creates , receives , maintains or
transmits the protected health information on behalf of covered entity and the responsibility of
bussiness associates that they make sure that they should protect patient health records according
to HIPAA standards.HIPAA privacy rules applies to protect health information which includes
all individual identifiable health information which includes patient health records about past
present and future and there mental health records and treatment provided to persons and their
payments and they also includes names , date of birth and addresses and phone no and social
securit numbers and they also protect the conversations between patient and doctors have the
same privacy . there are some violation rules if any wrong happens then individual can file case
against them according to HIPAA rules .
therefore the security of the data will continue to grow importance as health care industries move
towards greater implementation of electronic health records . personal electronic health records
devices , independent consent management tools and privacy preserving datamining and
statistical disclosure limitations and pesudonymization in this phase they replace the patient
names by providing with patient ids that can be linked to their original identities and it protects
individual identities .whereas in independent consent management tools relies on health trust as
they store health related data if researchers want to search health data they should first contact
health trusts where as personl electronic devices requires personal computer to manage their
health information . these are the rules and laws to protect patients records and data and their
payments .
Solution
there are laws and regulations that would pertain to an online breach of 10,000 pat.
The false statement among the given list is “Territoriality means ho.pdfarasanlethers
The false statement among the given list is “Territoriality means holding space, while
preemption means defending space.”
The actual meaning of territoriality means, defending space in which exclusion of aggressive
behaviour occurs, and preemption means holding space.
Solution
The false statement among the given list is “Territoriality means holding space, while
preemption means defending space.”
The actual meaning of territoriality means, defending space in which exclusion of aggressive
behaviour occurs, and preemption means holding space..
The current article is discussing about the role of SOX4 geneprotei.pdfarasanlethers
The current article is discussing about the role of SOX4 gene/protein in the metastasis, and
tumourogenesis.
Introduction:-
SOX 4 is the transcription factor produces Sox4 protein in humans,which regulates the
embryonic development and it directly invovles in the apoptosis regulation leading to the
tumourogenesis. The malfunction of the gene results in the decreement of parathyroid hormone
production so that bone desoption occurs.
In the current study explain importance of the SOX 4 gene, the interdigital tissue is lysed by the
apoptosis by the expression of SOX4 protein, so in the carcinoma cells, if we knock down of this
gene causes the decreeased cell proliferation and induced apoptosis by activating caspases 3 and
7.
It causes various carcinoma like example : Intra hepatitic metastatisis tissue, prostate cancer,lung
cancer, colorectal cancer, breast cancer, myeloma,pineoblastoma, bladder cancer , gastric cancer.
these all types are due high expression of SOX 4 gene(upregulation or over production).
Solution
The current article is discussing about the role of SOX4 gene/protein in the metastasis, and
tumourogenesis.
Introduction:-
SOX 4 is the transcription factor produces Sox4 protein in humans,which regulates the
embryonic development and it directly invovles in the apoptosis regulation leading to the
tumourogenesis. The malfunction of the gene results in the decreement of parathyroid hormone
production so that bone desoption occurs.
In the current study explain importance of the SOX 4 gene, the interdigital tissue is lysed by the
apoptosis by the expression of SOX4 protein, so in the carcinoma cells, if we knock down of this
gene causes the decreeased cell proliferation and induced apoptosis by activating caspases 3 and
7.
It causes various carcinoma like example : Intra hepatitic metastatisis tissue, prostate cancer,lung
cancer, colorectal cancer, breast cancer, myeloma,pineoblastoma, bladder cancer , gastric cancer.
these all types are due high expression of SOX 4 gene(upregulation or over production)..
The major similarities between rocks and minerals are as follows1.pdfarasanlethers
The major similarities between rocks and minerals are as follows:
1. Both of them are geological substances which exists on earth.
2. Both are solid, inorganic and naturally-occuring substances.
However, these are different in following ways:
1. Rocks are classified by geological processes whereas minerals are classified by chemical
processes.
2. Rocks do not play any role in biological processes whereas minerals play definitive role.
3. Sometivmes, fosil remains are found embeded inside rocks while minerals don\'t have fossils.
Solution
The major similarities between rocks and minerals are as follows:
1. Both of them are geological substances which exists on earth.
2. Both are solid, inorganic and naturally-occuring substances.
However, these are different in following ways:
1. Rocks are classified by geological processes whereas minerals are classified by chemical
processes.
2. Rocks do not play any role in biological processes whereas minerals play definitive role.
3. Sometivmes, fosil remains are found embeded inside rocks while minerals don\'t have fossils..
Pipelining understandingPipelining is running multiple stages of .pdfarasanlethers
Pipelining understanding:
Pipelining is running multiple stages of the same process in parallel in a way that efficiently uses
all the available hardware while respecting the dependencies of each stage upon the previous
stages. In the laundry example, the stages are washing, drying, and folding. By starting a wash
stage as soon as the previous wash stage is moved to the dryer, the idle time of the washer is
minimized. Notice that the wash stage takes less time than the dry stage, so the wash stage must
remain idle until the dry stage finishes: the steady state throughput of the pipeline is limited by
the slowest stage in the pipeline. This can be mitigated by breaking up the bottleneck stage into
smaller sub-stages. For those less concerned with laundry-based examples, consider a video
game. The CPU computes the keyboard/mouse input each frame and moves the camera
accordingly, then the GPU takes that information and actually renders the scene; meanwhile, the
CPU has already begun calculating what\'s going to happen in the next frame.
How Pipelining will done:
In class, we mentioned that interpreting each computer instruction is a four step process: fetching
the instruction, decoding it and reading the register, executing it, and recording the results. Each
instruction may take 4 cycles to complete, but if our throughput is one instruction each cycle,
then we would like to perform, on average, $n$ instructions every $n$ cycles. To accomplish
this, we can split up an instruction\'s work into the 4 different steps so that other pieces of
hardware work to decode, execute, and record results while the CPU performs the fetch. The
latency to process each instruction is fixed at 4 cycles, so by processing a new instruction every
cycle, after four cycles, one instruction has been completed and three are \"in progress\" (they\'re
in the pipeline). After many cycles the steady state throughput approaches one completed
instruction every cycle.
An assembly line in a auto manufacturing plant is another good example of a pipelined process.
There are many steps in the assembly of the car, each of which is assigned a stage in the pipeline.
Typically the depth of these pipelines is very large: cars are pretty complex, so there need to be a
lot of stages in the assembly line. The more stages, the longer it takes to crank the system up to a
steady state. The larger the depth, the more costly it is to turn the system around: A branch
misprediction in an instruction pipeline would be like getting one of the steps wrong in the
assembly line: all the cars affected would have to go back to the beginning of the assembly line
and be processed again.
OnLive Example[Realtime]:
OnLive is a company that allows gamers to play video games in the cloud. The games are run on
one of the company\'s server farms, and video of the game is sent back to your computer. The
idea is that even the lamest of computers can run the most highly intensive games because all the
computer does .
main.cpp
#include
#include
#include \"SwimmingPool.h\"
using namespace std;
void printMainMenu();
void printPoolVolume();
void printGetPoolDimensions(bool);
void printHasDimensions();
void checkDimensions();
void printError();
void printPoolDimensions();
double editValue(double);
void printGetFillRate();
void printGetDrainRate();
void printAddWater();
void printDrainRate();
void printFillRate();
char printWantwer();
SwimmingPool pool;
int _response;
int _numResponses;
double _length;
double _width;
double _depth;
//double _currentwerVolume;
double _drainRate;
double _fillRate;
bool _end;
char _newValue[5];
int main()
{
int fillTime;
int drainTime;
double drained;
// Set output style and precision
cout << fixed << showpoint << setprecision(2);
// Main program loop
// ends when _end==true
while (!_end)
{
// Prints main option list
printMainMenu();
// Switch based on response
switch (_response)
{
// Sets pool dimensions
case 1:
if (pool.hasDimensions())
printHasDimensions();
else
{
printPoolDimensions();
printPoolVolume();
}
break;
// Prints pool dimensions
case 2:
printGetPoolDimensions(false);
system(\"pause\");
break;
// Prints fill rate
case 3:
printGetFillRate();
break;
// Prints drain rate
case 4:
printGetDrainRate();
break;
// Determine water need to fill pool to capacity
case 5:
checkDimensions();
if (!pool.hasWater())
cout << \"\ The pool is currently empty\";
else
{
cout << \" The pool currently has \"
<< pool.getwerVolume()
<< \" units\"
<< endl;
}
cout << \"\ \ Water needed: \"
<< pool.getFillAmount(pool.getwerVolume())
<< \" units of water\ \ \";
system(\"pause\");
break;
// Determine time required to fill pool at rate
case 6:
if (!pool.hasDimensions())
{
cout << \" Pool dimensions not yet entered.\ \";
printGetPoolDimensions(false);
}
if (pool.getFillRate() <= 0)
printGetFillRate();
cout << \"\ Time to fill pool: \"
<< pool.getFillTime()
<< endl
<< endl;
system(\"pause\");
break;
// Determine time required to drain pool at rate
case 7:
checkDimensions();
if (_drainRate <= 0)
printGetDrainRate();
if (!pool.hasWater())
{
char response = printWantwer();
while (response != \'y\' && response != \'n\')
{
printError();
response = printWantwer();
}
if (response == \'y\')
printAddWater();
else
break;;
}
cout << \"\ Time to drain pool: \"
<< pool.getDrainTime()
<< endl
<< endl;
system(\"pause\");
break;
case 8:
checkDimensions();
if (pool.getFillRate() <= 0)
printGetFillRate();
else
printFillRate();
cout << \"\ Enter fill time: \";
cin >> fillTime;
pool.setFillTime(fillTime);
pool.setwerVolume(pool.getwerVolume() + pool.fill());
cout << endl
<< pool.fill()
<< \" units of water were added to the pool\ \ \"
<< \" The pool now contains \"
<< pool.getwerVolume()
<< \" units of water\ \ \";
system(\"pause\");
break;
case 9:
checkDimensions();
if (pool.getDrainRate() <= 0)
printGetDrainRate();
else
printDrainRate();
cout << \"\ Enter drain time: \";
cin >> drainTime;
pool.setDrainTime(drainTime);
if (!pool.hasWater())
{
char response = printWantwe.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
#include avrinterrupt.h The global interrupt flag is maintained.pdf
1. #include //The global interrupt flag is maintained in the I bit of the status register (SREG).
#include //This header file includes the apropriate IO definitions for the device that has been
specified by the -mmcu= compiler command-line switch. This is done by diverting to the
appropriate file which should never be included directly. Some register names common to all
AVR devices are defined directly within , which is included in , but most of the details come
from the respective include file.
#include //The functions in this header file are wrappers around the basic busy-wait functions
from . They are meant as convenience functions where actual time values can be specified rather
than a number of cycles to wait for. The idea behind is that compile-time constant expressions
will be eliminated by compiler optimization so floating-point expressions can be used to
calculate the number of delay cycles needed based on the CPU frequency passed by the macro
F_CPU.
#include "oi.h"//This header file includes the apropriate IO definitions
//the #define directive allows the definition of macros within your source code. These macro
definitions allow constant values to be declared for use throughout your code. Macro definitions
are not variables and cannot be changed by your program code like variables.
#define USB 1
#define CR8 2 // toggle between usb and create on CM serial processor
//Methods used in program
void setSerial(uint8_t com);
uint8_t getSerialDestination(void);/*------------------------built in, sends back Serial Destination*/
void writeChar(char c, uint8_t com);/*------------ --taken from command modual manual. sends
data to computer via the USB cable*/
void delay(void);/* Checks the delayed period*/
void byteTx(uint8_t value);/*Transmit a byte over the serial port*/
void Init_Uart(void);/* Initialize the values */
uint8_t byteRx(void);/*------------------------------reads from the serial port*/
//This is main method for the program
void main(void)
{
uint8_t rx_data;
Init_Uart();
/* Writing the character by character using the while loop */
while(1)
3. ****************
/*the following three functions came directly from the command module manual
they change the flow of data so that when byteTx is called it sends data
from the create to the computer through the USB cable. when it is done sending
data it returns the com port to its original state, giving commands to the create.
*/
//****************************************************************************
****************
uint8_t getSerialDestination(void)
{
if (PORTB & 0x10)
return USB;
else
return CR8;
}
void setSerial(uint8_t com)// uint8_t is unsigned char and com is its value
{//This is the condition of checking the value of unsigned char
if(com == USB)
PORTB |= 0x10;// |= is Bitwise inclusive OR and assignment operator.PORTB |= 0x10 is
same as PORTB=PORTB | 0x10
else if(com == CR8)
PORTB &= ~0x10;//&= is Bitwise AND assignment operator.PORTB &= ~0x10 meanse
PORTB = PORTB & ~0x10
}
//write char is called whenever you want to send data to the computer
void writeChar(char c, uint8_t com)
{
uint8_t originalDestination = getSerialDestination();
if (com != originalDestination)
{
setSerial(com);
delay();
}
byteTx((uint8_t)(c));
if (com != originalDestination)
4. {
setSerial(originalDestination);
delay();//Allow char to xmt
}
}
// Transmit a byte over the serial port
void byteTx(uint8_t value)
{
while(!(UCSR0A & 0x20)) ;
UDR0 = value;
}
uint8_t byteRx(void)
{
while(!(UCSR0A & 0x80)) ;
/* wait until a byte is received */
return UDR0;
}
Solution
#include //The global interrupt flag is maintained in the I bit of the status register (SREG).
#include //This header file includes the apropriate IO definitions for the device that has been
specified by the -mmcu= compiler command-line switch. This is done by diverting to the
appropriate file which should never be included directly. Some register names common to all
AVR devices are defined directly within , which is included in , but most of the details come
from the respective include file.
#include //The functions in this header file are wrappers around the basic busy-wait functions
from . They are meant as convenience functions where actual time values can be specified rather
than a number of cycles to wait for. The idea behind is that compile-time constant expressions
will be eliminated by compiler optimization so floating-point expressions can be used to
calculate the number of delay cycles needed based on the CPU frequency passed by the macro
F_CPU.
#include "oi.h"//This header file includes the apropriate IO definitions
//the #define directive allows the definition of macros within your source code. These macro
definitions allow constant values to be declared for use throughout your code. Macro definitions
are not variables and cannot be changed by your program code like variables.
5. #define USB 1
#define CR8 2 // toggle between usb and create on CM serial processor
//Methods used in program
void setSerial(uint8_t com);
uint8_t getSerialDestination(void);/*------------------------built in, sends back Serial Destination*/
void writeChar(char c, uint8_t com);/*------------ --taken from command modual manual. sends
data to computer via the USB cable*/
void delay(void);/* Checks the delayed period*/
void byteTx(uint8_t value);/*Transmit a byte over the serial port*/
void Init_Uart(void);/* Initialize the values */
uint8_t byteRx(void);/*------------------------------reads from the serial port*/
//This is main method for the program
void main(void)
{
uint8_t rx_data;
Init_Uart();
/* Writing the character by character using the while loop */
while(1)
{
writeChar('H',USB);
writeChar('e',USB);
writeChar('l',USB);
writeChar('l',USB);
writeChar('o',USB);
writeChar(' ',USB);
writeChar('W',USB);
writeChar('o',USB);
writeChar('r',USB);
writeChar('l',USB);
writeChar('d',USB);
writeChar('!',USB);
}
}
/*Initialize the values */
void Init_Uart(void)
6. {
UBRR0 = 59;
UCSR0B = 0x18;
UCSR0C = 0x06;
DDRB = 0X10;
PORTB = 0X10;
}
/*Used to check the delayed time */
void delay(void)
{
int i=0,j=0;
for(i=1;i<=1000;i++)
{
for(j=1;j<=1000;j++)
{
}
}
}
//****************************************************************************
****************
/*the following three functions came directly from the command module manual
they change the flow of data so that when byteTx is called it sends data
from the create to the computer through the USB cable. when it is done sending
data it returns the com port to its original state, giving commands to the create.
*/
//****************************************************************************
****************
uint8_t getSerialDestination(void)
{
if (PORTB & 0x10)
return USB;
else
return CR8;
}
void setSerial(uint8_t com)// uint8_t is unsigned char and com is its value
{//This is the condition of checking the value of unsigned char
7. if(com == USB)
PORTB |= 0x10;// |= is Bitwise inclusive OR and assignment operator.PORTB |= 0x10 is
same as PORTB=PORTB | 0x10
else if(com == CR8)
PORTB &= ~0x10;//&= is Bitwise AND assignment operator.PORTB &= ~0x10 meanse
PORTB = PORTB & ~0x10
}
//write char is called whenever you want to send data to the computer
void writeChar(char c, uint8_t com)
{
uint8_t originalDestination = getSerialDestination();
if (com != originalDestination)
{
setSerial(com);
delay();
}
byteTx((uint8_t)(c));
if (com != originalDestination)
{
setSerial(originalDestination);
delay();//Allow char to xmt
}
}
// Transmit a byte over the serial port
void byteTx(uint8_t value)
{
while(!(UCSR0A & 0x20)) ;
UDR0 = value;
}
uint8_t byteRx(void)
{
while(!(UCSR0A & 0x80)) ;
/* wait until a byte is received */
return UDR0;
}