(Solved): Change the C code to assemply and drow a flowchart unsignedcharvar=0: void delayHS (un ...
Change the C code to assemply and drow a flowchart
unsigned char var =0 : void delayHS (unsigned int timerS) void delayHS (unsigned int t imerS) f unsigned int cntr, entr2: \} for ( cotro0; cntr(cotr2=0;cntr2<1275;cntr2++); void main (void) SELECT =0×7F; vhile( 1 ) \{ for (var=0;var<255;var++){P1=var : delayHS (1) ; if (var==127) f delayMS (100): ? \} for(var=255;var>0;var??){P1=var : delayHS (1): if (var==127) \{ delayMS ( 10 ?) ; \} \} \} \}
Look at the examples on the EDSIM51 website. Modify the Ramp Signal on the DAC Output example to produce the following waveform: Set update frequency to 5 as shown below. You need to use a suitable step-size value, e.g., from 5 to 15 . This step-size value shortens the time period of the waveform you are generating.
Q1. Start by adjusting the step-size of the increments in the Ramp Signal on the DAC Output example. Q2.Add another block of code that makes the waveform ramp down after it reaches the maximum amplitude. Q3. Add the required parts that make the waveform to always level off near the middle of th amplitude while ramping up and down. Use 60 machine cycles for the steady time when the waveform levels off.