why do we need to define lCD_COMMANDUS and LCD_DATAUS


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tamersoss View Post
    Dear Freinds ...
    I can't understand precisely what is the delay we control using these two defines :
    DEFINE LCD_COMMANDUS 1000 ' SET COMMAND DELAY TIME IN us.
    DEFINE LCD_DATAUS 40 ' SET DATA DELAY TIME IN us.
    Please help me to understand precisely what we aim to control through these defines ... also , What are the defaults ?
    A parallel LCD, Hitachi 44780 compatible LCD, is basically a smart LCD. It has a processor of sorts, it's own RAM, it's own way of talking. So basically, when you LCDOUT, you ARE communicating with another processor.
    Those delays are needed to let the LCD processor have time to do what it needs to do.
    In short, start big and work your way down until the LCD fails, then add a bit for a fudge factor.
    CommandUs (word value) generally works with 1000, but some LCDs want 2,000 or more.
    DataUs (byte value) usually works at 100, again, some want more.

    Most of the LCDs I've got here in my shop will work with as little as CommandUs of 200 and DataUs of 35.
    YMMV...

  2. #2
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    But i need to know the meening of lcd command delay and data delay ... In my application i have to know the time period every statement consums ... so i need to understand when these delays take place ?

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by tamersoss View Post
    But i need to know the meening of lcd command delay and data delay ... In my application i have to know the time period every statement consums ... so i need to understand when these delays take place ?
    Huh? Didn't I just tell you what the DEFINE's meant?
    Light an LED before the LCD command, turn off the LED after the LCD command, measure the pulse width on a 'scope. Or run it thru the MPLAB simulator...

  4. #4
    Join Date
    Dec 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Ok ... Many thanks ... i will try it.

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