Display problems


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76

    Unhappy Display problems

    Howdeedoo all...

    I'm stuck here. I'm trying to get an Optrex DMC20481 (4 x 20 display) to work with a 16f877 and I'm getting nuttin! It doesn't even flicker. I've checked and re-check the wiring. It all looks good. I disconnected the LCD and wrote a simple program to pulse the connector pins... the data seems to be getting through fine telling me it's not likely a circuit board problem.

    This is a new circuit board with a 3-8 decoder enabling one of several paths for portd through 74HC373 chips. The decoder inputs are connected to porte of the 877.

    I am using Microcode Studio with the latest version of PicBasic Pro.

    I've probably dones something screwie. Any input here would be most appreciated.

    Thank you,

    Ross


    DEFINE LOADER_USED 1
    DEFINE osc 20
    ADCON1 = 7 'set porta to digital
    TRISA = 0 'set porta to output
    TRISD = 0 'set portd to output
    TRISE = 0 'set porte to output

    Define LCD_DREG PORTD 'I/O port where LCD is connected
    DEFINE LCD_DBIT 4
    DEFine LCD_RSREG PORTD 'Port where RS pin located
    define LCD_RSBIT 2 'Register select pin
    Define LCD_EREG PORTD 'Port where Enable pin located
    DEFINE LCD_EBIT 3 'Enable pin
    DEFINE LCD_BITS 4 '4-Bit data bus
    define LCD_LINES 4 'Number of LCD Character Display lines

    'Porte is connected to 74HC138 3-to-8 line decoder which directs portd to one
    'of several devices by enabling the correct 74hc373.

    porte = 5 'Enable 74hc373 connecting Portd output to LCD
    pause 2000 'Two seconds for display power-up (should be enough)
    lcdout $fe,1 'Clear the LCD screen
    pause 100 'Don't think I need this pause

    porta.0 = 1 'initialize porta.0 (where LED is connected)


    main:
    gosub flash_led
    lcdout "Success"
    pause 1000
    lcdout $fe,1
    pause 500
    goto main
    end

    'Led is connected to porta.0. As the main program loops, it flashes the LED as
    'visual feedback that the program is at least trying to work. *razzberry*

    flash_led:
    pulsout porta.0,50
    return
    Attached Files Attached Files
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

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


    Did you find this post helpful? Yes | No

    Default

    hi rossfree,

    what about if you try to modify connections and DEFINEs as follow
    [php]

    DEFINE LCD_DREG PORTD 'LCD data pins connected to
    DEFINE LCD_DBIT 0 'd.0 - d.3

    DEFINE LCD_RSREG PORTD 'LCD RS bit connected to
    DEFINE LCD_RSBIT 4 'd.4

    DEFINE LCD_EREG PORTD 'LCD E bit connected to
    DEFINE LCD_EBIT 5 'd.5

    DEFINE LCD_BITS 4 '4-Bit data bus
    DEFINE LCD_LINES 4 'Number of LCD Character Display lines
    [/php]

    let me know

    regards
    Steve

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

  3. #3
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Hi Steve,

    Thanks for the input.

    Your suggestion would be a fair piece of work on this end. The circuit is hardwired into a circuit board and would require cutting and jumping several lines.

    The Optrex manual says when connecting a 4 bit bus, use the higher order bits, 4 thru 7. The lower four should be tied to ground.

    See table 1.3 on page 11:

    http://www.optrex.com/SiteImages/Lit...mcman_full.pdf

    Still... if you have reason to believe that your suggested fix will work, I'll get cuttin'.

    Could you please take a look and elaborate on your suggestion.

    Thanks,

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

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


    Did you find this post helpful? Yes | No

    Default

    Hi rossfree,
    The Optrex manual says when connecting a 4 bit bus, use the higher order bits, 4 thru 7. The lower four should be tied to ground.
    that's true... usually i left other pin connection. could be safe to tie them to ground.

    Still... if you have reason to believe that your suggested fix will work, I'll get cuttin'.

    Could you please take a look and elaborate on your suggestion.
    But before cutting everything may you try highest PAUSE delay at the begining... let's say 5 secondes. I often heard about long startup delay on OPTREX. Also what about if you play with trim on VEE contrast pin. Is it display at least on line with black square characters???

    can you also add this line
    DEFINE LCD_COMMANDUS 2000

    tell me if it's working with this add.

    If i refer to some developpement board, they use lower bit for data. PBP use them also by default. i got some problem also in the past when using other bit to access to it.

    may this thread help you also
    http://www.picbasic.co.uk/forum/show...8&pagenumber=1

    regards
    Steve

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

  5. #5
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    76


    Did you find this post helpful? Yes | No

    Default Optrex DMC20481... a PUZZLEMENT!!!

    Hi Steve,

    Thanks for your continued support.

    I placed the additional define statement in the program. It still did not work.

    I'm at home now and have wired up an Optrex DMC16230 2 x 16 display. It works!

    So... the problem is either with the code... subtle differences with the DMC20481? Or timing? Or maybe it needs to be wired slightly differently? I wired the 230 exactly the same way as the 481.

    I don't know... I'm guessing here.

    At least the board checks out. I was starting to wonder.

    To restate the problem... I am trying to coax an Optrex DMC20481 into spitting out some characters. As of right now. it just sits there... blank. And I do mean blank. It don't flicker, it don't make black squares... it don't do nuttin!

    Could go for some more ideas... anyone... anybody? HMMM???

    Ross
    Never enough knowledge to be called intelligent but just enough knowledge to be considered dangerous!

    I like that! :-)

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


    Did you find this post helpful? Yes | No

    Default

    i'll get into datasheet in a few moment... maybe a little difference... memory addressing or something.

    Have you try other LCDouts...

    LCDOUT $fe,1
    LCDOUT "1 st line",$fe,$c0,"2nd line",$fe,$94,"3rd line"

    is writing something on now???


    what about now if we manually initialize LCD
    [php]
    Define LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFine LCD_RSREG PORTD
    define LCD_RSBIT 2
    Define LCD_EREG PORTD
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    define LCD_LINES 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 100

    pause 2000
    LCDOUT $fe,$28 '2 lines display
    LCDOUT $fe,$0C 'turn on display
    LCDOUT $fe,$06 'increment adress
    LCDOUT $fe,1 'clear display

    start:
    LCDOUT $fe,1,"hello"
    pause 200
    goto start

    [/php]
    what about now ???
    Last edited by mister_e; - 17th November 2004 at 23:54.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    have you try left d0-d3 open not ground?


    here's the datasheet for 20481
    http://www.optrex.com/SiteImages/Par...C/20481bie.PDF

    but less documented.

    regards

    Last edited by mister_e; - 17th November 2004 at 23:55.
    Steve

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

Similar Threads

  1. Hdsp 21xx display
    By Original in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th June 2012, 20:07
  2. Replies: 2
    Last Post: - 14th July 2008, 22:11
  3. DS1820 display with 7-seg 4 digits
    By chai98a in forum Code Examples
    Replies: 12
    Last Post: - 10th April 2008, 13:12
  4. 64 led display problems
    By battousai923 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 29th November 2007, 09:19
  5. Replies: 14
    Last Post: - 26th September 2007, 05:41

Members who have read this thread : 1

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