caramelz
Junior Member level 2
hi i'm using mcc18 compiler. I need to display the voltage on my lcd (tc1602A) using microcontroller (PIC18f4520). I'm stuck after while(ADCON0bits.DONE), and i dunno how to display the value on LCD.
Please help!
Please help!
Code:
#include <p18f4520.h>
#include <delays.h>
#include <stdlib.h>
ADCON0=0b00000001;
ADCON1=0b00000111;
ADCON2=0b10000010;
Delay10TCYx(5);
ADCON0bits.GO = 1; // Start ADC
while(ADCON0bits.DONE); // ADC completed?