Question

Programming questions (must be written in PIC18 assembly): (8 marks) A hypothetical temperature transducer generates a voltag

0 0
Add a comment Improve this question Transcribed image text
Answer #1
sbit Bit at RB3_bit;
int temp;
//**************************************************************

void READ_temp(void)
{
temp = ADC_Read(0);
temp = (0.05*temp)+1;                                                                                                                                                           

}

void main()
{
ADC_Init();
while(1)
{READ_temp();
if(temp<18)
{PORTB=0b00000100;
} 
else if (temp>22)
{PORTB=0b00000000;
}
}
}
Add a comment
Know the answer?
Add Answer to:
Programming questions (must be written in PIC18 assembly): (8 marks) A hypothetical temperature t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT