Adc For 16f88


Closed Thread
Results 1 to 12 of 12

Thread: Adc For 16f88

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    I'm not clear on the problem you are having.

    What is it doing or not doing? And what should it do instead?
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Angry

    Quote Originally Posted by Kamikaze47 View Post
    I'm not clear on the problem you are having.

    What is it doing or not doing? And what should it do instead?
    I want to measure the audio input at the left and the right channel of a stereo coder (is for fm transmitter).
    The left channel show on first line and the right channel show on second line on the 2X16 LCD.
    But the LCD first show the left channel and after show the right channel alternately (very fast).

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    you may want to change the line:

    LCDOut $fe,1,"L:"

    to:

    LCDOut $fe,1,$fe,2,"L:"
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

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


    Did you find this post helpful? Yes | No

    Default

    There's something obvious that just jump to my face. You're using the default LCD assignment, and this use a.0, a.1... which is also your adc channels.

    so unless you forgot something in your copy/paste, or i totally misunderstood something

    EDIT: one more... Assuming you're using the internal OSC, you want to configure it properly... unless the whole beast will run @32KHz

    OSCCON = %01100000 ' 4MHz

    Don't forget to check your maths range... sure it will overflow the max 100 soon.
    Last edited by mister_e; - 25th March 2008 at 17:15.
    Steve

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

  5. #5
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    There's something obvious that just jump to my face. You're using the default LCD assignment, and this use a.0, a.1... which is also your adc channels.

    so unless you forgot something in your copy/paste, or i totally misunderstood something

    EDIT: one more... Assuming you're using the internal OSC, you want to configure it properly... unless the whole beast will run @32KHz

    OSCCON = %01100000 ' 4MHz

    Don't forget to check your maths range... sure it will overflow the max 100 soon.
    I use external xtal 4mhz and the below LCD assignment

    Code:
        DEFINE LCD_DREG PORTB		   
        DEFINE LCD_DBIT 4
        DEFINE LCD_RSREG PORTB		   
        DEFINE LCD_RSBIT 2
        DEFINE LCD_EREG PORTB		 
        DEFINE LCD_EBIT 3
        DEFINE LCD_BITS 4		      
        DEFINE LCD_LINES 2

  6. #6
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

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


    Did you find this post helpful? Yes | No

    Default

    it worked fine here... sorry.
    Steve

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

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. 10 bit ADC display on LCD using 16f873
    By pr2don in forum mel PIC BASIC
    Replies: 3
    Last Post: - 6th March 2010, 18:29
  3. Can't get ADC to loop
    By TravisM in forum mel PIC BASIC
    Replies: 2
    Last Post: - 11th October 2009, 15:33
  4. ADC value with 2 decimals on an LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2005, 15:54
  5. 12F675 ADC 'Issues'
    By harrisondp in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2005, 01:55

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