Hi all, I am new to the PIC world and I am pulling the hair out of the old bald head. Can someone point me to a ADC example that includes the ADCON setup on a PIC18F4620.
Printable View
Hi all, I am new to the PIC world and I am pulling the hair out of the old bald head. Can someone point me to a ADC example that includes the ADCON setup on a PIC18F4620.
TrevorDawes,
Do a search in this forum. I did a quick search and found many results for what you are looking for. The following link is one of the results I found.
http://picbasic.co.uk/forum/showthre...ght=PIC18F4620
Robert
I had a problem with ADCIN on my 18F2221's. I solved the problem by doing it the "old fashioned way":
Code:
ADCON0 = (channel << 2) + $3 ;Set up the ADC channel, turn on the A/D
PAUSEUS 20 ; wait for the analog switch 'glitch' to die down
ADCON1.1 = 1 ;Set the Go/Done bit
PAUSEUS 2 ; insure minimum time
WHILE ADCON1.1 = 1:WEND ; wait for the go/done bit to clear
Result.HighByte = ADRESH
Result.LowByte = ADRESL