REDO THE BELOW PROPLEM 4 USING C LANGUAGE PLEASE I NEED IT S

REDO THE BELOW PROPLEM 4 USING C LANGUAGE PLEASE I NEED IT SIMPLE AND CLEARE.

Write a function called WaitonBtn in PIC32 assembly language. The WaitonBtn function will set in an infinite loop until btn associated with pin RA6 is asserted high (pin6 in PortA =1). ent WaitonBtn WaitonBtn: LA $to, PORTA #load the address of SFR PORTA LW$t1, 0($to)# load the content in PORTA into #t1 AND $t2, $t1, 0 times 0040 # and $t1, 0 times 0040 # and $t1 with 0000_ 0000 _0100_ 0000 # may use different logic than mine. SLTI $t3, $t2, 0 times 0040 # if $t2 = zero rightarrow $t3 = 1. NOP BEQZ $t3, wait OnBtn NOP JR $ra NOP end wait OnBtn.

Solution

#include<stdio.h>

main()

{

int t2,t3;

scanf(\"%d%d\",t2,t3);

if(t2==0)

{

t2=0;

}

else

{

t3=1;

}

if(t3==0)

{

main();

}

}

REDO THE BELOW PROPLEM 4 USING C LANGUAGE PLEASE I NEED IT SIMPLE AND CLEARE. Write a function called WaitonBtn in PIC32 assembly language. The WaitonBtn functi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site