Can sombody please give me a hint what i am do-ing wrong i keep getting the following error
C:\PBP246\PIC18EXT.BAS ERROR Line 12: Redefinition of VAR.
Here is the code i use

Code:
INCLUDE "MODEDEFS.BAS"
INCLUDE "18F4550.BAS" ; USB descriptors for CDC demo
DEFINE OSC 20 ' Define crystal as 20Mhz
'Define ACDIN parameters
Define ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source ( 3 = RC )
DEFINE ADC_SAMPLEUS 50 ' Set sampling time to micro-seconds
'This Part set PORTA 0-3 an analog inputs,4 as digital
TRISA = %00011111 'set PORTA 0-5 as inputs
ADCON1 = %00001010 'ADC use vss and vdd as ref.
ADCON2 = %10000111 'FRC (clock derived from A/D RC oscillator),Right justify output
TRISD = %00001111 'Set port d 0-3 as inputs and 4-7 as outputs
TRISB = %10011000
'**************************************Variables*********************************************
buffer Var Byte[16]
cnt Var Byte
LED Var PORTD.4
USBInit
Low LED ' LED off
'**************************************Main Program******************************************
' Wait for USB input
idleloop:
USBService ' Must service USB regularly
cnt = 1 ' Specify input buffer size
USBIn 3, buffer, cnt, idleloop
' Message received
Toggle LED
outloop:
USBService ' Must service USB regularly
USBOut 3, buffer, cnt, outloop
Goto idleloop ' Wait for next buffer
END
Bookmarks