On 7/5/05, Mauro wrote: > Pessoal, como fazer a leitura de um sinal analogico aplicado a um PORTA > qualquer do 16F628 ou 84A, e mostrar no LCD, com um PIC que tenha AD e > facil, mas como seria o codigo para um que n=E3o tenha? >=20 Both 16F628 and PIC16F84 does not have an AD converter module. The suggested way to AD with those could be different: for 16F84(or 16F628) using an RC and measure the charging or discharging time of the capacitor with the input voltage, for 16F628 having some comparators and reference voltage (or filtered PWM) could be much more easy, just implement in software a succesive approximation register, or compare the input with a know DC voltage generated by reference voltage (4 bit resolution) or by a filtered PWM (10 bit resolution). Both ways are complicated since there are cheap 8bit/16bit serial AD converters or PIC's which have 10 bit AD module inside. regards, Vasile --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist