How to work with LCD in a mode of 8 bits?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    MCU Destroyer's Avatar
    MCU Destroyer Guest


    Did you find this post helpful? Yes | No

    Default

    Please look my code:

    ++++++++++++++++++++++++++++++++++++++
    define osc 20
    Define LCD_DREG PORTA
    Define LCD_DBIT 0
    Define LCD_RSREG PORTE
    Define LCD_RSBIT 0
    Define LCD_EREG PORTE
    Define LCD_EBIT 1
    DEFINE LCD_RWREG PORTE
    DEFINE LCD_RWBIT 2

    ADCON1 = 7
    Pause 3000
    loop: Lcdout $fe, 1
    Pause 9000

    Lcdout "Hello"
    Pause 9000

    Lcdout $fe, $c0, "World"
    Pause 9000

    Goto loop
    End
    ++++++++++++++++++++++++++++++++++++++++++++++++
    LCD model: MT-16S2H (v.3) - this LCD full combine on conclusions with any LCD (for example Data Vision). And I use PIC16F877A, quartz 20 MHz (mode HS for PIC).

    Probably really wash PIC works too quickly but how I then can increase a delay of commands for LCD? I have not found suitable commands...

  2. #2
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    From the PBP manual
    5.39. LCDOUT

    ‘ Set command delay time in us
    DEFINE LCD_COMMANDUS 2000

    ‘ Set data delay time in us
    DEFINE LCD_DATAUS 50


    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    how about PORTA.4??? is this pin tie with pull-up resistor???

    Not sure if PBP handle the R/W pin for you. Can you add a LOW PORTE.0 and post results...
    Steve

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

  4. #4
    MCU Destroyer's Avatar
    MCU Destroyer Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    Great thank All !

    Now all worked.

    When I use commands

    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50

    and increased delays by 30 %, LCD has earned in a mode 4 bits.

    But nevertheless it is possible in PBP to work with LCD in a mode 8 bits?

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by MCU Destroyer
    But nevertheless it is possible in PBP to work with LCD in a mode 8 bits?
    DEFINE LCD_BITS 8

    But why would you want to waste 4 Port Bits?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  6. #6
    MCU Destroyer's Avatar
    MCU Destroyer Guest


    Did you find this post helpful? Yes | No

    Default

    Now I any more do not wish to spend all for nothing a bits of port. It simply question for the my general development - became already interestingly can-whether PBP work with LCD in a mode 8 bits.

    Once again all many thanks !

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 20:14
  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. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 17:56
  4. assembly in Pic
    By lerameur in forum Off Topic
    Replies: 11
    Last Post: - 1st May 2008, 21:06
  5. 16f88 can't get lcd to work
    By nicjo in forum General
    Replies: 12
    Last Post: - 13th December 2006, 03:20

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