Bob Edge
Junior Member level 2
- Joined
- Apr 5, 2011
- Messages
- 23
- Helped
- 3
- Reputation
- 6
- Reaction score
- 2
- Trophy points
- 1,283
- Location
- Holmfirth UK
- Activity points
- 1,441
Hi,
I am trying to use the A/D converter on the PIC18F1220, but I just can't get it to work. I know the answer to this is RTFDS, but I have, & I just don't know what I'm doing wrong. I am using pic basic pro by the way.
I am setting the chip up in the following way:
define OSC 20
'channel 0 analog all others digital
TRISA = 255
ADCON0 = %00000001
ADCON1 = %11111110
ADCON2 = %10000010
define adc_bits 10
define adc_sampleus 50
There must be something I am doing wrong, or not doing at all.
Regards
Bob...
I am trying to use the A/D converter on the PIC18F1220, but I just can't get it to work. I know the answer to this is RTFDS, but I have, & I just don't know what I'm doing wrong. I am using pic basic pro by the way.
I am setting the chip up in the following way:
define OSC 20
'channel 0 analog all others digital
TRISA = 255
ADCON0 = %00000001
ADCON1 = %11111110
ADCON2 = %10000010
define adc_bits 10
define adc_sampleus 50
There must be something I am doing wrong, or not doing at all.
Regards
Bob...