16F913 setup


Results 1 to 32 of 32

Thread: 16F913 setup

Threaded View

  1. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Code:
    'This Part set PORTA 0-5 an analog inputs
    
    ADCON1 = %111 'FRC (clock derived from a dedicated internal oscillator = 500 kHz max)
    ANSEL = 0 'The ANSEL (91h) and CMCON0 (9Ch)registers must be initialized to configure an
    CMCON0= 0 'analog channel as a digital input. Pins configured as analog inputs will read ‘0’.
    TRISA = %00011111 'set PORTA 0-5 as inputs
    Nope, it disable all ADC channel <7:0>.
    http://ww1.microchip.com/downloads/e...Doc/41250F.pdf
    PDF page 45, Ansel Register.
    should be
    ANSEL = %00011111

    PDF page 183, ADCON1
    ADCON1 should be
    ADCON1=%01110000

    To disable comparators, cm<2:0> bits have to be = to 111

    so PDF page 118, CMCON0
    CMCON0=%00000111
    Last edited by mister_e; - 9th December 2007 at 20:00.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. ADCIN - setup of ADCON2
    By Lowell314 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th December 2009, 18:41
  2. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  3. ADCIN setup for PIC16F688
    By PixController in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th February 2008, 18:38
  4. ADCIN setup help need
    By dangill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th February 2008, 15:22
  5. Use Button For setup
    By tump in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 21st November 2007, 19:43

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