Ok, I splashed out and bought a PICKit 3, the latest upgrade to PBP, I'm now using MPASM as it recommends using it, I'm only an occasional user of PBP

However I get a tonne of errors Why doesnt' it just work? If I spend money I expect it to work without too much drama.

Errors are things such as: symbol not previously defined (ADRESH)
Illegal opcode

But there are tonnes...

Here's my code: - BTW - how do I put this in that neat little code window on here?


@ DEVICE PIC16F722, _DEBUG_OFF
@ DEVICE PIC16F722, _BOR_OFF
@ DEVICE PIC16F722, _MCLRE_OFF
@ DEVICE PIC16F722, _PWRT_EN
@ DEVICE PIC16F722, _WDT_ON
@ DEVICE PIC16F722, _XT_OSC


DEFINE OSC 4
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 1 ' Set clock source Fosc/8 "2uS"
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

ADCON0 = %110011
ADCON1 = %1000000

TRISA= %00000000 'Set 'em all to outputs
ANSELA= %00000000 'Set 'em all to digital
TRISB= %11111111 'all input
ANSELB= %00000111 'LAST THREE ANALOGUE
TRISC= %00000000 'Set portC all outputs

CPSCON0 = %00001101 'Cap sense off


'-----Allocate Variables
ButtonSense VAR byte

Start:

ADCIN 13,ButtonSense
PORTA = ButtonSense
goto start
end