Hello Richard,

Iīm using an old PC that runs XP Professional.
MPLAB IDE v 7.61
Microcode Studio 3.0.0.5
Compiler Picbasic Pro 2.50C
Programmer PICKIT2 and 3


Complete Code:


'************************************************* ***************
'* Name : AnalogDEBUG *
'* Author : [Davidpower] *
'* [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 05.12.2017 *
'* Version : 1.0 *
'* Notes : 16F88 no LCD *
'* : Portb.7 analog IN 0-5V *
'************************************************* ***************


Include "modedefs.bas"

Define OSC 4
Define ADC_BITS 4 ' Set number of bits in result
Define ADC_CLOCK 3 ' Set clock source (3=rc)
Define ADC_SAMPLEUS 50 ' Set sampling time in uSec
DEFINE DEBUG_REG PORTB
DEFINE DEBUG_BIT 2
DEFINE DEBUG_BAUD 9600
DEFINE DEBUG_Mode 0
DEFINE DEBUG_PACING 1000



CMCON = 7 ' Disable analog comparator
ANSEL = %01000000 ' set AN6 (RB7) as analog, others to digital
ADCON1.7 = 1 '

GLCDBM VAR WORD


PAUSE 1000 ' lcd settle time
DEBUG 10,13

loop:
ADCIN 6,GLCDBM ' Read channel 6 (RB7)

DEBUG "*.*",DEC5 GLCDBM,13,10


Goto loop

End


The DEBUG line gives the compiling error "bad expression"

If I use for example :

DEBUG GLCDBM

then no compiling error shows up. Doesnīt mean that it works.