Ficou assim:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Paulo Roquetti
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* VERSÃO : 1.01
* DATA : 18.11.2010
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Definição de entradas
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#define botao1 portb.rb2
#define botao2 portb.rb3
#define botao3 portb.rb4
#define botao4 portb.rb5
#define botao5 portb.rb6
#define botao6 portb.rb7
int x,i,j;
int tensao;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Declaração de variáveis *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
char userRD_buffer[64], userWR_buffer[64] , userMSG_buffer[64] ;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Declaração de Interrupções *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void interrupt()
{
HID_InterruptProc();
}
//......................................................................
void Hid_envia_string( char *str)
{
while(*str)
{
while( !Hid_Write( str, 1) ) ;
str++;
}
}
//............................................................................
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Bloco principal de programa *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void main()
{
ADCON0=0b00000001;
ADCON1=0b00001110;
ADCON2=0b10011110;
TRISB = 0b111100;
TRISC.rc4=1;
TRISC.rc5=1;
TRISD = 0;
TRISE = 0b000;
PORTE = 0;
Lcd_Config(&PORTD,0,1,1,7,6,5,4); // Configura o display
Lcd_Init(&PORTD); // inicializa o display // Initialize LCD
lcd_out(1,1,"Tensao em Volts"); //Mostra mensagem no display
HID_Enable(&userRD_buffer, &userWR_buffer); //Inicializa a USB
Delay_ms(1000); //Aguarda 1 segundo
while (1)
{
porte.re0=1;
porte.re1=1;
for(i=0;i<60;i++){
adcon0.go_done=1; //Inicializa a conversão
while(adcon0.go_done); //Aguarda finalizar a conversão
tensao=((adresh <<

+ adresl) * 4.87; //Lê o conteúdo da conversão
inttostr(tensao,userMSG_buffer); //Converte para string
strcat(userMSG_buffer," mV"); //Concatena com "V"
lcd_out(2,4,userMSG_buffer); //Mostra no display
delay_ms(1000);
}
Hid_envia_string(userMSG_buffer);
//..........................................................
porte.re0=0;
porte.re1=0;
//................................................................
for(j=0;j<2;j++)
{
for(i=0;i<59;i++)
{
delay_ms(1000);
}
}
//................................................................
}
}