I installed an LM324 yesterday with a gain of 4 and it did the job, but, it requires 5 parts, whereas what Archangel proposed requires only two - a pot and a capacitor to ground the wiper.

However, it did not work as desired. Perhaps ADCON1 = 00001000 is not what is required, although it seems to be the right code.

What I had was - the low pin of the pot was grounded, the high pin was on +5VDC, wiper was connected to pin 5 (RA2) of the PIC, and pin 4 (RA3) of the PIC was grounded. Rotating wiper clockwise did increase voltage on pin 5 (RA2). Yet, I saw only two lines (not bars) with maximum sensitivity being selected (wiper turned fully clockwise).

What am I missing here?

Now, there is another problem, when I went back to the original program with ADCON1 = 00000000 the VU meter stopped to operate properly. It does initialize and measure volume, but only with one set of bars. The push button again is acting as a complete reset and does not switch appearance of the bars. Perhaps Archangel can suggest something here as it again appear to be configuration problem. Once this is fixed and I am at square one, I will try to implement Archangel proposal with RA2/RA3.

Thank you.

This is the current code:

Code:
'*******************************************************************************
'*  Archivo : VUMETER.PBP                                                      *
'*  Autor   : Saúl (Alias Zaxione)                                             *
'*  Fecha   : 08/11/2009                                                       *
'*  Versión : 1.0                                                              *
'*  Nota    : VU Meter Estéreo con varias visualizaciones.                     *
'*  Web     : http://www.zaxione.com                                           *
'*******************************************************************************
#CONFIG
 __config _HS_OSC & _WDT_OFF &  _CP_OFF & _BOREN_OFF 

#ENDCONFIG
   	DEFINE OSC 20          'Oscilador de 20 MHz

	'*******************************************************************************
	' LCD I/O DEFINITIONS
	DEFINE LCD_DREG PORTB  'LCD PORT para envío de datos B
	DEFINE LCD_DBIT 4      'LCD utiliza los Bit inferior 0 o superior 4
	DEFINE LCD_RSREG PORTB 'LCD RS en el PORTB
	DEFINE LCD_RSBIT 0     'LCD RS PORTB.0
	DEFINE LCD_EREG PORTB  'LCD E en el PORTB
	DEFINE LCD_EBIT 1      'LCD E PORTB.1
	DEFINE LCD_BITS 4      'LCD se utilizan 4 o 8 bits para datos
	DEFINE LCD_LINES 2     'Numero de lineas del lcd
	
	'*******************************************************************************
	' LCD DEFINITIONS
	DEFINE ADC_BITS 8      'Resultado del ADC 8 o 10 bits
	DEFINE ADC_CLOCK 3     'Ajuste del reloj
	DEFINE ADC_SAMPLEUS 50 'Ajuste del tiempo de muestreo en microsegundos

	'*******************************************************************************
	' VARIABLES
	CANAL    var BYTE                             'Nombre de la variable
	LINEA    VAR BYTE                             'Nombre de la variable
	CONTADOR VAR BYTE                             'Nombre de la variable
	RESTO    VAR BYTE                             'Nombre de la variable
	MARCA1   VAR BIT                              'Nombre de la variable
	MARCA2   var BYTE                             'Nombre de la variable
	PULSADOR var PORTB.2                          'Pulsador en el PORTB.2

	'*******************************************************************************
	' PROGRAM
	PAUSE 500              'Tiempo necesario para la iniciación del LCD	7
	ADCON1 = 00000000      'Definir todos los PORTA y PORTE como analógicos

	'*******************************************************************************
	' INITIAL MESSAGE --> "Zaxione"
	LCDOUT 254, 64, 1 ,2 ,5, 5 ,5 ,5 ,2 ,1        'cgram posición 0
	LCDOUT 254, 72, 24 ,4 ,26, 2 ,2 ,26 ,4 ,24    'cgram posición 1
	LCDOUT $FE, 1                                 'Borrado de la pantalla
	' Shift message Left
	FOR CONTADOR = 144 TO 130 STEP -1             'Cuenta atras
		LCDOUT $FE, CONTADOR, 20, 0, 1, "Zaxione "    'Imprimir en pantalla
		PAUSE 150                                     'Pausa de 0,15 segundos
	NEXT CONTADOR                                 'Regresa a CONTADOR
	PAUSE 2000                                    'Pausa de 2 segundos
	' Shift message Right
	FOR CONTADOR = 130 TO 144                     'Cuenta hacia delante
		LCDOUT $FE, CONTADOR, 20, 0, 1, "Zaxione "    'Imprimir en pantalla
		PAUSE 150                                     'Pausa de 0,15 segundos
	NEXT CONTADOR                                 'Regresa a CONTADOR
	LCDOUT $FE, 1                                 'Borrado de la pantalla

	'*******************************************************************************
	' VU line style 1 (graphic bitmaps)
GRAF1:
	MARCA2 = 1
	LCDOUT 254,64, 0 ,16 ,16, 16 ,16 ,16 ,16 ,0   'cgram posición 0
	LCDOUT 254,72, 0 ,24 ,24, 24 ,24 ,24 ,24 ,0   'cgram posición 1
	LCDOUT 254,80, 0 ,28 ,28, 28 ,28 ,28 ,28 ,0   'cgram posición 2
	LCDOUT 254,88, 0 ,30 ,30, 30 ,30 ,30 ,30 ,0   'cgram posición 3
	LCDOUT 254,96, 0 ,31 ,31, 31 ,31 ,31 ,31 ,0   'cgram posición 4
	PAUSE 300
	GOTO BARRA
	
	'*******************************************************************************
	' VU line style 2 (graphic bitmaps)
GRAF2:
	MARCA2 = 2
	LCDOUT 254,64, 0 ,24 ,24, 24 ,24 ,24 ,24 ,0   'cgram posición 0
	LCDOUT 254,72, 0 ,24 ,24, 24 ,24 ,24 ,24 ,0   'cgram posición 1
	LCDOUT 254,80, 0 ,27 ,27, 27 ,27 ,27 ,27 ,0   'cgram posición 2
	LCDOUT 254,88, 0 ,27 ,27, 27 ,27 ,27 ,27 ,0   'cgram posición 3
	LCDOUT 254,96, 0 ,27 ,27, 27 ,27 ,27 ,27 ,0   'cgram posición 4 
	PAUSE 300
	GOTO BARRA

	'*******************************************************************************
	' VU line style 3 (graphic bitmaps)	
GRAF3:
	MARCA2 = 3
	LCDOUT 254,64, 0 ,0 ,0, 16 ,16 ,0 ,0 ,0       'cgram posición 0
	LCDOUT 254,72, 0 ,0 ,0, 24 ,24 ,0 ,0 ,0       'cgram posición 1
	LCDOUT 254,80, 0 ,0 ,0, 28 ,28 ,0 ,0 ,0       'cgram posición 2 
	LCDOUT 254,88, 0 ,0 ,0, 30 ,30 ,0 ,0 ,0       'cgram posición 3
	LCDOUT 254,96, 0 ,0 ,0, 31 ,31 ,0 ,0 ,0       'cgram posición 4
	PAUSE 300
	GOTO BARRA
	
	'*******************************************************************************
	' VU Line style 4 (graphic bitmaps)
	
GRAF4:
	MARCA2 = 4
	LCDOUT 254,64, 0 ,16 ,16, 16 ,16 ,16 ,16 ,0   'cgram posición 0
	LCDOUT 254,72, 0 ,16 ,16, 16 ,16 ,16 ,16 ,0   'cgram posición 1
	LCDOUT 254,80, 0 ,20 ,20, 20 ,20 ,20 ,20 ,0   'cgram posición 2
	LCDOUT 254,88, 0 ,20 ,20, 20 ,20 ,20 ,20 ,0   'cgram posición 3
	LCDOUT 254,96, 0 ,21 ,21, 21 ,21 ,21 ,21 ,0   'cgram posición 4 
	PAUSE 300
	GOTO BARRA

	'*******************************************************************************
	' VU Line style 5 (graphic bitmaps)
GRAF5:
	MARCA2 = 5
	LCDOUT 254,64, 0 ,0 ,0, 4 ,0 ,0 ,0 ,0         'cgram posición 0
	LCDOUT 254,72, 0 ,0 ,4, 14 ,4 ,0 ,0 ,0        'cgram posición 1
	LCDOUT 254,80, 0 ,0 ,14, 14 ,14 ,0 ,0 ,0      'cgram posición 2 
	LCDOUT 254,88, 0 ,4 ,14, 31 ,14 ,4 ,0 ,0      'cgram posición 3
	LCDOUT 254,96, 0 ,14 ,31, 31 ,31 ,14 ,0 ,0    'cgram posición 4 
	PAUSE 300
	GOTO BARRA

	'*******************************************************************************
	' VU Line style 5 (graphic bitmaps)
GRAF6:
	MARCA2 = 6
	LCDOUT 254,64, 0 ,14 ,31, 31 ,31 ,14 ,0 ,0    'cgram posición 0   
	LCDOUT 254,72, 0 ,14 ,31, 31 ,31 ,14 ,0 ,0    'cgram posición 1
	LCDOUT 254,80, 0 ,14 ,31, 31 ,31 ,14 ,0 ,0    'cgram posición 2 
	LCDOUT 254,88, 0 ,14 ,31, 31 ,31 ,14 ,0 ,0    'cgram posición 3
	LCDOUT 254,96, 0 ,0 ,0, 31 ,0 ,0 ,0 ,0        'cgram posición 4 
	PAUSE 300

	'*******************************************************************************
	' Read ADC input
BARRA:
	IF MARCA1 = 1 THEN								'Si es verdadero
		LINEA = $2									'1ºLinea LCD, muestra canal L
		ADCIN 7, CANAL
		MARCA1 = 0
	ELSE											'Si no lo es
		LINEA = $c0									'2ºLinea LCD, muestra canal R
		ADCIN 6, CANAL
		MARCA1 = 1      							
	ENDIF											'Fin de la comparación

	'*******************************************************************************
	' Remainder of DIV5 --> nro of pixels columns of last char in VU graph
	RESTO = (CANAL // 5)                          'Operación restó de la división 
	LCDOUT $FE, LINEA                             'Inicia la escritura en el LCD
	FOR CONTADOR = 1 TO (CANAL / 5)               'Cuenta hacia delante
		LCDOUT 4								  'Imprime cgram posición 4
	NEXT CONTADOR                                 'Regresa a CONTADOR
	
	' Select last character in VU graph depending on the remainder value
	IF RESTO = 1 THEN LCDOUT 0                    'Imprime cgram posición 0
	IF RESTO = 2 THEN LCDOUT 1                    'Imprime cgram posición 1
	IF RESTO = 3 THEN LCDOUT 2                    'Imprime cgram posición 2
	IF RESTO = 4 THEN LCDOUT 3                    'Imprime cgram posición 3
	' ??? Erase 3 full chars after VU indicator
	LCDOUT 20, 20, 20                             'Borrado de 3 caracteres
	
	'*******************************************************************************
	' Select graphic style (progress with push-button presses
	IF (PULSADOR = 1) and (MARCA2 = 6) THEN GRAF1 '1º Visualización
	IF (PULSADOR = 1) and (MARCA2 = 1) THEN GRAF2 '2º Visualización
	IF (PULSADOR = 1) and (MARCA2 = 2) THEN GRAF3 '3º Visualización
	IF (PULSADOR = 1) and (MARCA2 = 3) THEN GRAF4 '4º Visualización
	IF (PULSADOR = 1) and (MARCA2 = 4) THEN GRAF5 '5º Visualización
	IF (PULSADOR = 1) and (MARCA2 = 5) THEN GRAF6 '6º Visualización
	
	'*******************************************************************************
	GOTO BARRA
	END