How do I use 10 bit A/D on 8 bit Pic? 12F675


Results 1 to 9 of 9

Threaded View

  1. #8
    Join Date
    Mar 2008
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Re: How do I use 10 bit A/D on 8 bit Pic? 12F675

    Can anyone tell me what I am doing wrong? This code just returns " 0 0 " with 3 volts on gpio.0

    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50

    CMCON = 7
    ANSEL = %00000001
    ADCON0.7 = 1
    TRISIO = %00000001
    adval var word
    ADH var word
    ADL var word
    over:
    pause 1000
    ADCIN 0, adval ' Read channel 0 to adval
    Serout2 5,16488,[#adval.HighByte," ",#adval.LowByte,13]
    goto over
    Last edited by n0yox; - 1st April 2020 at 16:58.

Similar Threads

  1. Serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 94
    Last Post: - 25th February 2007, 13:33
  2. Need help with 16f819 10 bit ADC
    By bannrikae in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 26th September 2005, 15:20
  3. Need clever way to convert 10 bits to 8 bits
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd September 2005, 15:13
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. 8 Bit output
    By barkerben in forum General
    Replies: 3
    Last Post: - 17th November 2004, 14:39

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