Question: C programming using XC 8 compiler on a PIC 1 6 F 1 8 8 7 7 chip. Inputs / Outputs: - Connect two 7
C programming using XC compiler on a PICF chip.
InputsOutputs:
Connect two segment displays via SPI.
Connect LEDs as indicators.
Connect a potentiometer as an analog input.
Connect a DIP switch as a digital input.
Connect the rotary encoder to two digital inputs.
Operation:
This program will utilize the internal DAC, the ADC, an analog comparator, and SPI.
The rotary encoder should control the output level of the DAC. Turning one direction should increase the level to a maximum of Turning the other direction should decrease the level to a minimum of
The output of the DAC should go to one input of an analog comparator. The other input to the comparator should be from the analog input. Connect them such that if the analog input voltage is higher than the DAC voltage, the output of the comparator goes high.
Connect the HILO LED to the output of the comparator so that it reflects the comparator's state.
The ADC should read either the DAC voltage or the analog input voltage depending on the position of the DIP switch. Show this value as a number from to on the sevensegment display.
The two additional LEDs should indicate which value is being shown, the DAC output or the analog input.
Internal connections shown in the nd picture.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
