ADC Config


Closed Thread
Results 1 to 3 of 3

Thread: ADC Config

  1. #1
    TrevorDawes's Avatar
    TrevorDawes Guest

    Default ADC Config

    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.

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    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
    Charles Linquist

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts