Question

How to make the flowchart for this code #include<win51.h> sbit P10=P1^0; sbit P11=P1^1; sbit P12=P1^2; sbit...

How to make the flowchart for this code

#include<win51.h>
sbit P10=P1^0;
sbit P11=P1^1;
sbit P12=P1^2;
sbit P13=P1^3;
sbit P14=P1^4;
sbit P15=P1^5;
sbit P16=P1^6;
sbit P17=P1^7;

unsigned long int x;
void main (void)
{
unsigned char xdata *cis;
cis = 0xFC48;
*cis = 0xFE;
P10=0;
P11=0;
P12=0;
P13=0;
P14=0;
P15=0;
P16=0;
P17=0;

while(1)
{
if(P17 == 0)
{
P10=0;
P11=1;
P12=1;
P13=1;
for(x=0; x<10000; x++)
P10=1;
P11=1;
P12=1;
P13=1;
for(x=0; x<10000; x++)
}
else if(P16 == 0)
{
P10=1;
P11=0;
P12=1;
P13=1;
for(x=0; x<10000; x++)
P10=1;
P11=1;
P12=1;
P13=1;
for(x=0; x<10000; x++)
}
else if(P15 == 0)
{
P10=1;
P11=1;
P12=0;
P13=1;
for(x=0; x<10000; x++)
P10=1;
P11=1;
P12=1;
P13=1;
for(x=0; x<10000; x++)
}
else if(P14 == 0)
{
P10=1;
P11=1;
P12=1;
P13=0;
for(x=0; x<10000; x++)
P10=1;
P11=1;
P12=1;
P13=1;
for(x=0; x<10000; x++)
}
else
{
P10=0;
P11=1;
P12=1;
for(x=0; x<50000; x++)
P10=1;
P11=0;
P12=1;
for(x=0; x<30000; x++)
P10=1;
P11=1;
P12=0;
for(x=0; x<50000; x++)
}
}
}

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider the following program listing that is written in the C Language: #include <msp430.h> void main(void);...
Consider the following program listing that is written in the C Language: #include <msp430.h> void main(void); { WDTCTL = WDTPW|WDTHOLD; unsigned char a=0x14; unsigned char b=0xDC; unsigned char c,d,e,f; c = a^b; d = a|b; e = ~d; f = ~e; while(1); } 1) Are the declared data types local or global variables? 2) Perform bitwise logical analysis to determine the unknown values of the given logic expressions. 3) Show the correct addresses and contents for all variables in the...
How do I fix my error of binding on line 74? #include <iostream> #include <fstream> #include...
How do I fix my error of binding on line 74? #include <iostream> #include <fstream> #include <cctype> #include <cstring> #include <iomanip> using namespace std; #include "AvlTree.h" class WordCount { public:     char *word;     int *lines;     int count;     int size;     bool operator<(const WordCount &rhs) const {return strcmp(word, rhs.word) < 0;}     bool operator!= (const WordCount &rhs) const {return strcmp(word, rhs.word) != 0;}     WordCount():lines(NULL), count(0), size(0) {word = new char[1]; word[0] = '\0';}     friend ostream& operator<<...
How do I make this code not include negative numbers in the total or average if...
How do I make this code not include negative numbers in the total or average if they are entered? (C++) For example, if you enter 4, 2, and -2, the average should not factor in the -2 and would be equal to 3. I want the code to factor in positive numbers only. ----- #include using namespace std; int main() {    int x, total = 0, count = 0;       cout << "Type in first value ";   ...
1) Create a flowchart for the program below and Trace the program below with input of...
1) Create a flowchart for the program below and Trace the program below with input of 3 and then again with input of 5. #include <iostream> using namespace std; int Fall(int x, int m) { int Xm = 1, i=x; while(i>=x-m+1) { Xm = Xm*i; i=i-1; } return Xm; } int Delta(int x, int m) { int ans = 0; ans = Fall(x+1,m); ans = ans - Fall(x,m); return ans; } void main() { int x = 0, m =...
#include <p18f4580.h> #include <stdio.h> #define mybit PORTBbits.RB1 void Timer1_Delay() {    T1CON = 0;    TMR1H...
#include <p18f4580.h> #include <stdio.h> #define mybit PORTBbits.RB1 void Timer1_Delay() {    T1CON = 0;    TMR1H = 0xFC;    TMR1L = 0x18;    T1CONbits.TMR1ON = 1; wait:    if (PIR1bits.TMR1IF == 0)    { goto wait;}    else    { T1CONbits.TMR1ON = 0;        PIR1bits.TMR1IF = 0;} } void main (void) {    TRISB = 0;    ADCON1 = 0x7F;       while(1)    {        mybit- ~mybit;        Timer1_Delay();     } } E:\Retry\main.c:27:Warning [2058] call of...
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 extern char **environ;    5 void output(char *a[], char...
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 extern char **environ;    5 void output(char *a[], char *b[]) { 6 int c = atoi(a[0]); 7 for (int i = 0; i < c && b[i]; ++i) { 8 printf("%s", b[i]+2); 9 } 10 } 11 12 void main(int argc, char *argv[]) { 13      14 switch (argc) { 15 case 1: 16 for (int i = 0; environ[i]; ++i) {    17 printf("%s\n", environ[i]); 18 } 19 break; 20 default: 21 output(argv +...
Using the C programming language implement Heapsort in the manner described in class. Here is some...
Using the C programming language implement Heapsort in the manner described in class. Here is some example code to use as a guideline. Remember, you need only implement the sort algorithm, both the comparison and main functions have been provided. /* * * after splitting this file into the five source files: * * srt.h, main.c, srtbubb.c, srtinsr.c, srtmerg.c * * compile using the command: * * gcc -std=c99 -DRAND -DPRNT -DTYPE=(float | double) -D(BUBB | HEAP | INSR |...
would someone kindly convert the following C code to java? thanks so much # include <stdio.h>...
would someone kindly convert the following C code to java? thanks so much # include <stdio.h> int main(void) { int changeOwed; int check; char invisibleChar; int count = 0; int numQ=0, numD=0, numN=0, numP=0; do{ printf("How much change is owed (in cents)?\n"); check = scanf("%d", &changeOwed); // returns 1 if the input is a number and returns 0 otherwise //Get's rid of any extra invisible characters if the input is a char/String do{ scanf("%c",&invisibleChar); }while(invisibleChar != '\n'); }while(check == 0...
No matter what I do I cannot get this code to compile. I am using Visual...
No matter what I do I cannot get this code to compile. I am using Visual Studio 2015. Please help me because I must be doing something wrong. Here is the code just get it to compile please. Please provide a screenshot of the compiled code because I keep getting responses with just code and it still has errors when I copy it into VS 2015: #include <iostream> #include <conio.h> #include <stdio.h> #include <vector> using namespace std; class addressbook {...
Here is my java code, I keep getting this error and I do not know how...
Here is my java code, I keep getting this error and I do not know how to fix it: PigLatin.java:3: error: class Main is public, should be declared in a file named Main.java public class Main { ^ import java.io.*; public class Main { private static BufferedReader buf = new BufferedReader( new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String english = getString(); String translated = translate(english); System.out.println(translated); } private static String translate(String s) { String latin =...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT