i have used the following code with my pic 16f73
unsigned char myvalue;
void main()
org 0x10
{
adcon0=0x85;
adcon1=0x01;
trisa=0xff;
trisc=0x00;
while(1)
{
myvalue=adc_read(0);
portc=myvalue;
delay_ms(2000);
}}
but now i want to use it with pic 16f870
but it is not showing the right output as pic 16f870 is 10 bit adc and pic 16f73 is 8 bit adc
so is there any thing i can do to solve it and do i need to adjust the vref value for new pic
unsigned char myvalue;
void main()
org 0x10
{
adcon0=0x85;
adcon1=0x01;
trisa=0xff;
trisc=0x00;
while(1)
{
myvalue=adc_read(0);
portc=myvalue;
delay_ms(2000);
}}
but now i want to use it with pic 16f870
but it is not showing the right output as pic 16f870 is 10 bit adc and pic 16f73 is 8 bit adc
so is there any thing i can do to solve it and do i need to adjust the vref value for new pic