ANSEL command


Results 1 to 5 of 5

Thread: ANSEL command

Threaded View

  1. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Wink

    [ Humour ON ]
    Who is problem here?
    You really sure to want the answer ???

    [ Humour OFF ]

    Now,

    Code:
    DEFINE OSCALL_2K 1
    MUCH Better :

    Code:
    DEFINE OSCCAL_1K 1

    Code:
    ANSEL = 1 
    ADCON0 = 3
    Much better

    Code:
    ANSEL    = %01110001 ; RC - GPIO.0 ana.
    ADCON0 = %10000000 ; for 10 bits ... right justif !!! - wait for ADCIN to start.

    AND For the end ...

    You did not define the I/Os ...

    Code:
    TRISIO = %11001001 ; if you want GPIO.0 to work as an ADC input. ( see manual ! )

    At this level ...
    You MIGHT open

    1) THE Manual
    2) The Pic relevant Datasheet ...

    Alain
    Last edited by Acetronics2; - 9th January 2009 at 14:31.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Easy HID Command -Response application
    By ptig185 in forum USB
    Replies: 25
    Last Post: - 22nd September 2010, 19:56
  3. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 20:31
  4. Can I do this???
    By noobie in forum mel PIC BASIC
    Replies: 2
    Last Post: - 10th June 2006, 18:57
  5. Interupts and Command string
    By Tissy in forum Serial
    Replies: 13
    Last Post: - 17th March 2006, 23:59

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