Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 5 Not yet answered Marked out of 3 . 0 0 Suppose that a sensor is connected to pin RA 0 of PIC

Question 15
Not yet answered Marked out of 3.00
Suppose that a sensor is connected to pin RA0 of PIC18F452 and 8 LEDs are connected PORTD. Based on the following program, how many LEDs are turned on given that the sensor voltage =1.2V and Vref=5V.
void main(void)4
TRISC =0;
TRISD =0;
TRISAbits.TRISA 0=1;
ADCON0=0x81;
ADCON1=0xCE;
while(1){
ADCON0bits. GO=1;
while(ADCON0bits.DONE=1);
PORTC=ADRESL;
PORTD=ADRESH;
DELAY(250);
}
}
Answer:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago