Question: 5. From the given PIC16F877A datasheet, change the following program in the built-in function so that the analog input is read from Channel 7. Write
5. From the given PIC16F877A datasheet, change the following program in the built-in function so that the analog input is read from Channel 7. Write your answers only for added/modified instructions. [3 marks] unsigned int ui_adc_read(void) { unsigned int temp = 0; CHS2 = 0; CHS1 = 0; CHSO = 0; _delay_ms(1); #if((_HTC_VER_MAJOR_ 9) && (_HTC_VER_MINOR_ 80)) GO_DONE = 1; while (GO_DONE == 1); #endif temp = (unsigned int)ADRESH == 5. From the given PIC16F877A datasheet, change the following program in the built-in function so that the analog input is read from Channel 7. Write your answers only for added/modified instructions. [3 marks] unsigned int ui_adc_read(void) { unsigned int temp = 0; CHS2 = 0; CHS1 = 0; CHSO = 0; _delay_ms(1); #if((_HTC_VER_MAJOR_ 9) && (_HTC_VER_MINOR_ 80)) GO_DONE = 1; while (GO_DONE == 1); #endif temp = (unsigned int)ADRESH ==
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
