Port settings - 18F4620


Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    583

    Default Port settings - 18F4620

    Guy's I'm a bit rusty, can someone confirm that the following settings turns off all analogue settings and makes port A digital

    Code:
    ;----[Analog Settings]----------------------------------------------------------
    INCLUDE "alldigital.pbp"                        ' make all pins digital
    
    ;----[Port settings]------------------------------------------------------------
    
    TRISA = %11000111
    TRISB = %00000000
    TRISD = %00000001
    CMCON = 7                                       ' disable Comparators
    ADCON1 = $0F                                    ' %0000 1111 AN2=VSS, AN3=VDD, AN12-0 = Digital 
    ADCON2 = $00                                    ' %0000 0000
    Should ADCON1 be set to $00 ? or does the all digital.php override these settings ?

    I want to use PORTA.0, PORTA.1 and PORTA.2 as digital inputs from switches -
    Last edited by Scampy; - 18th November 2015 at 22:12.

Similar Threads

  1. Serial port settings for given crystal
    By Scampy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 15th December 2013, 22:11
  2. 18F2520 - problem configuring fuse for port B as digital port.
    By hwhisperer in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th October 2010, 11:41
  3. 18f4620
    By Moldava in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 28th January 2010, 08:18
  4. ADCON1 settings 18F4620
    By earltyso in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th February 2008, 06:56
  5. Duplicating port input to port output
    By lwindridge in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th April 2004, 21:43

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