Configuring Defines For 8-bit LCD


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    so far so good, I do get someting on the lcd. I had wire connection problems
    I found a chip that I have that did A/D conversion. Now I have another problem, my output value is always the same (around 500). It should read the input portC.0 from analog and display its decimal value to the lcd. The analog input is between 2 to 5 volt. I am using a Pic16F876a.

    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 0
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    Define ADC_BITS 10
    Define ADC_CLOCK 3
    Define ADC_SAMPLEUS 50

    adval var word

    TRISC = %11111111
    ADCON1 = %10000010
    Low PORTB.2
    Pause 500

    loop: ADCIN 4, adval
    Lcdout $fe, 1 Lcdout "Value: ", DEC adval
    Pause 100
    Goto loop
    End

    end

  2. #2
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Hi,
    why don't you use the internal A/D of your microcontroller?

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 20:54
  2. first project, and yes, doesn`t work
    By bogdan in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th April 2009, 07:13
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30
  4. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 22:56
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

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