please answer 1 and 2 1- Interpret the main function using a flowchart. 2- Analyze the subroutine where a string is writ

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

please answer 1 and 2 1- Interpret the main function using a flowchart. 2- Analyze the subroutine where a string is writ

Post by answerhappygod »

please answer 1 and 2
1- Interpret the main function using aflowchart.
2- Analyze the subroutine where a string is written intothe LCD.
the following code regulates the speed of the motoraccording to temperature T
T ≥ 75 °C: The motor reaches its maximum forwardspeed.
45 °C ≤ T ≤ 75 °C: Forward speed is raised.
10 °C ≤ T ≤ 45 °C: The motor stops.
0 °C ≤ T ≤ 10 °C: The motor rotates backward.
T ≤ 0 °C: The motor reaches its maximum backwardspeed.
CODE:
#include<reg52.h>#include<stdio.h>#include<lcd1602and18B20.h>
sbit ma=P1^0;sbit mb=P1^1;sbit pwm=P1^2;
uint count;int temp;uchar pwmtemp;
void inittime0();
void main(){pwm=0;pwmtemp=0;init();inittime0();
while(1){if(count==60){count=0;temp=ReadTemperature();temperature=(float)temp*0.0625;sprintf(displaytemp,"Temp % 7.3f",temperature);//´òӡζÈÖµwritestring(1,0,displaytemp);//ÏÔʾµÚ¶þÐÐcommand(0x80+13);write_dat(0xdf);write_dat('C');
if(temperature>75.0){ma=1;mb=0;pwmtemp=75;}if((temperature>45.0)&&(temperature<75.0)){ma=1;mb=0;pwmtemp=temperature;
}if((temperature>10.0)&&(temperature<45.0)){ma=0;mb=0;pwmtemp=0;}if((temperature>0.0)&&(temperature<10.0)){ma=0;mb=1;pwmtemp=temperature*7;}if(temperature<0.0){ma=0;mb=1;pwmtemp=75;}}pwm=1;delay(pwmtemp);pwm=0;delay(75-pwmtemp);
}}/****************ÖжϳÌÐò**********************/void timer0() interrupt 1{TH0=(65536-50000)/256;TL0=(65536-50000)%256;count++;
}void inittime0(){TMOD=0x01;TH0=(65536-50000)/256;TL0=(65536-50000)%256;EA=1;ET0=1;TR0=1;}
Please Answer 1 And 2 1 Interpret The Main Function Using A Flowchart 2 Analyze The Subroutine Where A String Is Writ 1
Please Answer 1 And 2 1 Interpret The Main Function Using A Flowchart 2 Analyze The Subroutine Where A String Is Writ 1 (99.11 KiB) Viewed 38 times
HT 3 3 D 1 - 3 Schematic Capture X C 0 1- PL DEVICES 1N4007 AT89C51 CAP CAP-ELEC CRYSTAL DS18B20 L298 LM016L MOTOR-DC RES RESPACK-8 ♥ A C1 22PF <TEXT> C2 LCD1 LM016L 22PF <TEXT> R1 ■ 10k C3 <TEXT> ■ 10uF <TEXT> X1 12M <TEXT> ■ TEXT> AO в о PWM1 O Temp -5.375' C NM 19 18 9⁰ 1 27896900 3 4 ☐☐ 28 PSEN 30 ALE 31 EA 5 w U1 >XTAL1 XTAL2 RST P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.8 P1.7 AT89C51 <TEXT> CO PO.O/ADO PO.1/AD1 PO.2/AD2 PO.3/AD3 PO.4/AD4 P0.5/AD5 P0.6/AD6 PO.7/AD7 P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P2.5/A13 P2.6/A14 P2.7/A15 39 do 38 d1 37 d2 38 d3 35 d4 34 d5 33 do d6 32 d7 21 RS, 22 RW 23 E 24 25 26 27 28 10 11 P3.0/RXD P3.1/TXD12 P3.2/INTO P3.3/INT1 13 14 P3.4/TO 15 P3.5/T1 P3.6/WR 16 17 P3.7/RD + • A 1 200 3d1 402 503 64 705 A8 907 PWM1 O RP1 A O в о 470 <TEXT> R2 U2 -4.7k <TEXX3 VCC DQ GND 2⁰ 1 ■ Ur DS18B20 <TEXT> 5 7 HONONG, 10 12 11 1 15 C5 -5.4 100nf <TEXT> AD1 ■ IN4 ΕΝΑ ENB IN1 VCC IN2 IN3 SENSA SENSB D3 ↑ # TEXT -226 9 g GND 8 - +12V 4 4 Vs D2 A OUT1 D4Z ■ OUT2 OUT3 U4 L298 OUT4 <TEXT> 2 <TEXT> 3 13 <TEXT 14 HPI C4 100nf <TEXT>
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply