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...
-
What is meant by the term functional currency?
-
Make a list of programs (software applications) that you have directly used. List only examples where you obviously interact with a program (such as when selecting a new song on an MP3 player) and...
-
Suppose \(V=V(S)\). Find the most general solution of the Black-Scholes equation.
-
In your community, sonic employers maintain stable workforces at all costs, and others furlough and recall workers seemingly at the drop of a hat. What are the differences in markets, management,...
-
How do cultural differences impact collaboration in multinational teams, and what strategies can be employed to mitigate potential challenges ? Explain
-
The following data were obtained from a series of Charpy impact tests performed on four steels, each having a different manganese content. Plot the data and determine (a) The transition temperature...
-
Which of the following is a major criticism of Maslow's needs hierarchy theory? The safety and physiological needs do not arise due to human drives The need for love and esteem do not apply for many...
-
7. Mateo makes a spinning platform to do his air guitar performances on. If he has a mass of 80 kg and rotates like a single particle with a radius of 0.20 meters, how much work does he do if he goes...
-
If the initial concentration and final concentration of each of the following components are given in the picture, how much volume in microliter (ul) is needed to go initial stock concentration to...
-
6. Meredith arrives at Starbucks as usual one morning, but the door is jammed. She must open the door and get her coffee fix, so she pushes on the door with a force of 15 N, where the radius of...
-
Ni-Cr alloy having young's modulus of 650 GPa and gauge length is 30 mm is deformed with a constant strain rate. At time 15 s, stress is 200 MPa and gauge length is 32 mm. Strain rate of material...
-
15. A teacher uses audio speakers to create a two-point-source interference pattern in the classroom. The speakers are placed at S and S. A students stands at point P on the first nodal line. In...
-
identify and discuss 2 concepts/terms regarding non verbal communication in detail along with relevant examples?
-
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...
-
What do you understand by mechanical and thermal efficiency? A steam plant uses 3 tonne of \(\mathrm{coal} / \mathrm{h}\). The steam is fed to turbine the output of which is \(4 \mathrm{MW}\). The...
-
How much heat is to be added to convert \(4 \mathrm{~kg}\) of water at \(20^{\circ} \mathrm{C}\) in to steam at 8 bar and \(200^{\circ} \mathrm{C}\). Take \(C_{p}\) of superheated steam as \(2.1...
-
Determine the specific volume and density of I kg steam at a pressure of \(7 \times 105 \mathrm{~Pa}\), when the condition of steam is: (i) Wet, having dryness fraction 0.9, (ii) Dry, and (iii)...
Mittag-Leffler Functions, Related Topics And Applications 1st Edition - ISBN: 3662439301 - Free Book
Study smarter with the SolutionInn App