12f675 A/d Miseries


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default thanks for clear

    I thank you of your time
    The code
    define adc_bits 10 'adc settings
    define adc_clock 3 ' adc setting
    define adc_sampleus 50 'adc setting

    should set up the a the analog to digital converters (adc)
    the output from the adc converter should be 0 to 1023
    but i get just 0 to 3
    I will work on the sound after I can get the 0 to 1023to work.

  2. #2
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Smile In CASE this helps...

    Hi mystified,
    Quote Originally Posted by mystified View Post
    I thank you of your time
    The code
    define adc_bits 10 'adc settings
    define adc_clock 3 ' adc setting
    define adc_sampleus 50 'adc setting

    should set up the a the analog to digital converters (adc)
    the output from the adc converter should be 0 to 1023
    but i get just 0 to 3
    I will work on the sound after I can get the 0 to 1023to work.
    Take a look at this informative thread by Melanie.

    Quote Originally Posted by Melanie View Post
    ... Watch the SPELLING of your DEFINEs

    Is your program not working as expected? ...

    Do you have any DEFINEs in your program? ...
    http://www.picbasic.co.uk/forum/showthread.php?t=558

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  3. #3
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default I changed clock 3 to clock 0

    cannot find clock 3 in datasheet it now works thank you

  4. #4
    Join Date
    Aug 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    OK , I put clock back to 3 but used upper chase in the define statement and that is what made it work
    Thank You very much.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mystified View Post
    cannot find clock 3 in datasheet it now works thank you
    Page 45 of the latest PBP manual

    and

    Page 44 of DS41190E, PIC12F675 datasheet.

    See any similarity between DEFINE ADC_CLOCK 3 and bits 6 thru 4 of ANSEL?

Similar Threads

  1. How do I use 10 bit A/D on 8 bit Pic? 12F675
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2020, 20:10
  2. Need help with LM34 and 12F675
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 6th December 2009, 13:06
  3. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 14:39
  4. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 19:30
  5. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57

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