For the following 4 problems assume we are writing our bits

For the following 4 problems assume we are writing our bits left to right. We want to setup PORT A so that bit 3 is an output and all other bits are inputs. Which vector should we write to TRISA from those below? Circle the correct answer. 00010000 00111011 00001000 00110111 We want to use direct addressing to switch to data memory bank 1. Which of the following bits should be written to the RP1 and RP0 bits in the STATUS register? Circle the correct answer: 0, 0 0, 1 1, 0 1, 1 We want to use the A/D converter to convert analog channel 4 to digital. Which of the following bits should be written to ADCON0 bits CH2, CH1, and CH0? Circle the correct answer: 0, 1, 0 0, 1, 1 0, 0, 1 1, 0, 0

Solution

Problem 1)

Ans:-C-----00001000

Bit number starts from left like 0,1,2,3 ....so on .For setting bit3 to output we have to make that bit as \'1\'.For all the other bits write as \'0\' means those pins act as input pins.In brief for making output-make \'1\' for input make \'0\'

Only 1 question per post will be answered please

 For the following 4 problems assume we are writing our bits left to right. We want to setup PORT A so that bit 3 is an output and all other bits are inputs. Wh

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site