PIC16F877A ADC on Starter Borad
In this tutorial we will see how to read the ADC values on PIC16f877A starter board.
Starter board comes with on board POT connected to ADC0, same POT value will be read and transmitted on UART at 9600 baudrate.
PIC16F877A ADC pins
PIC16F877A has inbuilt 8channel 10-bit ADC. Below tables shows the ADC pin mapping.
|Adc Channel||Pic16f877a Pin||Pin Function|
Below is the sample code to read the ADC value of channel0 and sent it on UART at 9600 baud rate.
As the POT is connected to ADC0, the values can be varied using this POT.