Hi Camerart!!
A couple of queries!! PORTA = 0x1C..
That gives INX, QEA and QEB an input..... BUT!! The two buttons are connected to PORTA 6 & 7.... AND PORTA.0 (AN0) is set up as an analogue input BUT you specify that PORTA 0 & 1 are connected to NFET's???
Hi Ian,
Well spotted, probably from a POT input test program.
PORTA should = 0xDC 110111000.
PORTA.0 should be digital
ADCON0 = %00000000 'A/D Control Register 0
ADCON1 = %00000000
ADCON2 = %10100001 'Not sure>>>>>>>>>>>>>
ADCON3 = %00000000
ADCHS = %00000000 'A/D Channels select
ANSEL0 = %00000000 'Analogue select Register 0
OSCCON = %01110010 'internal 8Mhz clock (Should bit0 be 1?)
TRISA = %11011100 'IN 7AF FOR BUTTON-6AR REV BUTTON-4QEA-3QEA -2IND
TRISB = %00000000 'OUT 4,LED
TRISC = %11000000 'IN 7RX-OUT-6TX-5#-4#-3#-2PWMFOR-1PWMREV
Hopefully these are now correct??
C.