DCD command - need some advice


Results 1 to 21 of 21

Threaded View

  1. #14
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1277&stc=1&d=116632121 9">

    Have a look at the chart above, which shows the lower nibble of ADCON1 (it's in the datasheet in section 11). ADCON1 = $0F sets PORTA.2 (pin4 ) as the Vref-. Try ADCON1=$07. This will make all PORTA pins digital.

    This should allow the Pot on PORTA.1 (pin 3) and the switch on PORTA.2 (pin4 ).

    I haven't looked real closely at the rest of the code yet, but this should help.

    SteveB

    EDIT: I should have read up on the POT command (never had a use for it), so I had to make a couple of changes.
    Attached Images Attached Images  
    Last edited by SteveB; - 17th December 2006 at 00:56.

Similar Threads

  1. Need "PIC16F84A" Controler schematic Advice...
    By Kyo_89 in forum Schematics
    Replies: 1
    Last Post: - 27th May 2009, 23:03
  2. Design Advice
    By isaac in forum General
    Replies: 38
    Last Post: - 11th October 2008, 23:07
  3. Your OTP advice?
    By truvahorse in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th June 2008, 16:37
  4. NCD vs. DCD - Commentary
    By andrewroz in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th November 2007, 23:16
  5. Advice needed on 'neat' Project!
    By vacpress in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th February 2007, 06:21

Members who have read this thread : 0

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