Can you try to compile this?
I suspect DONE (only needs to be a bit as can only be 0 or 1) and maybe BUFFER to be reserved words.
Mike.
Code:
Define CONFIG1L = 0x00
Define CONFIG1H = 0x06 '8mHz XTL x4 =32mHz
Define CONFIG2L = 0x0c
Define CONFIG2H = 0x20
Define CONFIG3L = 0x04
Define CONFIG3H = 0x80
Define CONFIG4L = 0x80 'Set for HVP
Define CONFIG4H = 0x00
Define CONFIG5L = 0x0f
Define CONFIG5H = 0xc0
Define CONFIG6L = 0x0f
Define CONFIG6H = 0xe0
Define CONFIG7L = 0x0f
Define CONFIG7H = 0x40
Define CLOCK_FREQUENCY = 32
Define SINGLE_DECIMAL_PLACES = 2
Define STRING_MAX_LENGTH = 20
Define SIMULATION_WAITMS_VALUE = 1 'Comment in for SIM out for PIC
Const NUM_SERVOS = 10
Const buf_len = 80
Dim Buff(buf_len) As Byte
Dim StrCount As Byte
Dim isDone As Bit
Dim WordTemp As word
Dim Ms As Long
Dim Count As Byte
Dim ServoCount As Byte
Dim I As Byte
Dim ServoPos(NUM_SERVOS) As word
Dim Char As Byte
Mike.