Sample Code: A/D Converter for PIC - Shalom Darmanjian 's page
The code below will continuously sample a voltage on channel 4 of the A/D converter and display the 10-bit result in a 16-bit format (ie, 0x0000 – 0x03FF) on the LCD screen. The LCD screen is hooked up to PORTA of the PIC (see UF_LCD Tutorial) and channel...