Convert thus code to assembly language using MPLAB IDE, for PIC16F877A. void setup() { // sensor buart
Fantastic news! We've Found the answer you've been seeking!
Question:
Convert thus code to assembly language using MPLAB IDE, for PIC16F877A.
Transcribed Image Text:
void setup() { // sensor buart rate pinMode(2, INPUT); // IR Sensor output pin connected pinMode(3, INPUT); // IR Sensor output pin connected pinMode(4, INPUT); // IR Sensor output pin connected pinMode(8, OUTPUT); // LED PIN pinMode(9,OUTPUT); // LED PIN pinMode(10, OUTPUT); // LED PIN } void loop() { int sl = digitalRead(2); // IR Sensor Sensor output pin connected = int s2 digitalRead(3); // IR Sensor Sensor output pin connected int s3 digitalRead(4); // IR Sensor Sensor output pin connected Serial.println(s1); // see the value in serial mpnitor in Arduino IDE Serial.println(s2); // see the value in serial mpnitor in Arduino IDE Serial.begin(9600); Serial.println(s3); // see the value in serial mpnitor in Arduino IDE ON delay(1000); if(s == 1) { digitalWrite(8,HIGH); // LED OFF ON } else { ON OFF delay(1000); } if(s2 == 1) { digitalWrite(9, HIGH); // LED delay(1000); digitalWrite(8,LOW); // LED } else { digitalWrite(9, LOW); // LED OFF } if(s3 == 1 ) { digitalWrite(10, HIGH); // LED delay(1000); } else { digitalWrite(10, LOW); // LED } } void setup() { // sensor buart rate pinMode(2, INPUT); // IR Sensor output pin connected pinMode(3, INPUT); // IR Sensor output pin connected pinMode(4, INPUT); // IR Sensor output pin connected pinMode(8, OUTPUT); // LED PIN pinMode(9,OUTPUT); // LED PIN pinMode(10, OUTPUT); // LED PIN } void loop() { int sl = digitalRead(2); // IR Sensor Sensor output pin connected = int s2 digitalRead(3); // IR Sensor Sensor output pin connected int s3 digitalRead(4); // IR Sensor Sensor output pin connected Serial.println(s1); // see the value in serial mpnitor in Arduino IDE Serial.println(s2); // see the value in serial mpnitor in Arduino IDE Serial.begin(9600); Serial.println(s3); // see the value in serial mpnitor in Arduino IDE ON delay(1000); if(s == 1) { digitalWrite(8,HIGH); // LED OFF ON } else { ON OFF delay(1000); } if(s2 == 1) { digitalWrite(9, HIGH); // LED delay(1000); digitalWrite(8,LOW); // LED } else { digitalWrite(9, LOW); // LED OFF } if(s3 == 1 ) { digitalWrite(10, HIGH); // LED delay(1000); } else { digitalWrite(10, LOW); // LED } }
Expert Answer:
Answer rating: 100% (QA)
As we have seen earlier assigning a const pointer to a nonconst pointer is ... View the full answer
Related Book For
Discovering Advanced Algebra An Investigative Approach
ISBN: 978-1559539845
1st edition
Authors: Jerald Murdock, Ellen Kamischke, Eric Kamischke
Posted Date:
Students also viewed these electrical engineering questions
-
convert the following assembly code into a highlevel code or pseudocode cpi r17 0 brbs z l1 brbs n l2 ldi r18,3 rjmp l3 l1 ldi r18, 1 rjmp l3 l2 ldi r18,2 l3 rest of the code
-
Convert the following program from machine language into MIPS assembly language. The numbers on the left are the instruction addresses in memory, and the numbers on the right give the instruction at...
-
Convert the following C program into MIPS assembly language int fact (int n) { if (n < 1) return 1; else return (n * fact (n 1)); }
-
The methyl alcohol flowing in the inner pipe of a double pipe exchanger is cooled with water flowing in the jacket. The inner pipe is made from 1-inch (25mm) schedule 40 steel pipe. The thermal...
-
Refer to the Baseball 2012 data that report information on the 30 Major League Baseball teams for the 2012 season. a. In the data set, the variable, built, is the year that a stadium was constructed....
-
Despite declining wage offers for high school graduates early in the COVID-19 Recession, enrollments in 4-year col- leges fell in Fall 2020. One marked difference between the COVID-19 Recession and...
-
Under what conditions are interim, as opposed to year end, physical inventory counts appropriate?
-
Freed Corporation has outstanding $800,000 of 8 percent bonds callable at 104. On September 1, immediately after recording the payment of the semiannual interest and the amortization of the discount,...
-
Describe two activities that are a part of reverse logistics. What are the challenges that each of these entails? How do each of these fit into the overall scope of application of reverse logistics?...
-
The longitudinal strain for a uniformly tapered circular bar is 0.005. The pull on the bar is 60 kN and young's modulus is 210 GPa. If the larger diameters is 1.5 times the smaller diameter. Assuming...
-
A prospective venture has the following cash flow profile over a 5-year horizon. What is the capitalized worth at 6 percent/year assuming the pattern repeats indefinitely? End of Year Receipts...
-
Reconsider the data from Problem 76. Plot a graph of scholarship dollars versus number of years, where the number of years varies from 1 year to 100 years by 2-year increments. Dollars should be on...
-
Given the analog transfer function \[H(s)=\frac{1}{\left(s^{2}+0.76722 s+1.33863 ight)(s+0.76722)},\] design transfer functions corresponding to discrete-time filters using both the impulseinvariance...
-
Repeat Exercise 6.13 using MATLAB commands impinvar and bilinear. Exercise 6.13 Given the analog transfer function \[H(s)=\frac{1}{\left(s^{2}+0.76722 s+1.33863 ight)(s+0.76722)},\] design transfer...
-
Apply the lowpass-to-highpass transformation to the filter designed in Exercise 6.4 and plot the resulting magnitude response. Exercise 6.4 Design a lowpass Butterworth filter satisfying the...
-
You will discuss a business organization which, in your opinion, best represents the spirit and characteristics of eco-based awareness and that is consciously committed to meet the needs of peoples...
-
Calculate the number of neutrons of 239Pu.
-
Use the parametric equations x = - 3t + 1 and y = 2/t + 1 to answer each question. a. Find the x- and y-coordinates of the points that correspond to the values of t = 3, t = 0, and t = - 3. b. Find...
-
Sherez is currently earning $390 per week as a store clerk and part-time manager. She is offered either a 7% increase or an additional $25 per week. Which offer should she accept?
-
Suppose you begin a job with an annual salary of $17,500. Each year, you can expect a 4.2% raise. a. What is your salary in the tenth year after you start the job? b. What is the total amount you...
-
Which of the following taxpayers is engaged in a specified service trade or business? (a) A lawyer (b) An architect (c) A professional soccer player (d) A freelance writer who publishes articles and...
-
D, a single taxpayer, holds a 25% ownership interest in an LLC that operates a department store. Ds allocable share of net operating income from the LLC is \($100,000\) for the year. D also works...
-
A and B form the AB equal general partnership. A contributes \($10,000\) cash and a depreciable asset with an adjusted basis of \($40,000\) and a fair market value of \($90,000.\) B contributes...
Study smarter with the SolutionInn App