LCD data filter


Closed Thread
Results 1 to 3 of 3

Thread: LCD data filter

  1. #1
    Join Date
    Mar 2005
    Posts
    15

    Question LCD data filter

    I'm working on a LCD data filter. I've got a milling machine with a display. This machine is controlled by a processor board, with a display for instructions and measurement values. I would like to change the language of the display. My idea is to disconnect the display cable from the processor board and connect a pic to the display cable and try to receive the data from the processor board. My pic will act like a display controller and receives the messages from the milling machine. The only information I need, are the measurment values. My pic will be connected to the display. The display will show the information messages in my own language and it will display the measurment values i've received from the processor board.

    I'm using the following code to receive the display instructions from the processorboard. The original display is connected in 4 bit mode.

    Code:
    Main:
        if changed = 1 then
            timeout = timeout + 1
        endif
        LCDdataold = LCDdata
     
        lcddata.0 = LCD_E               ' Copy the pin-states to the LCDdata variable
        lcddata.1 = LCD_RS
        lcddata.4 = LCD_DB4
        lcddata.5 = LCD_DB5
        lcddata.6 = LCD_DB6
        lcddata.7 = LCD_DB7
        
        if LCDdataold <> LCDdata then   ' Compare the pin states withe the old pin states
            LCDlog[j] = lcddata         ' Save the received data in the log array
            j = j + 1
            changed = 1
        Endif
    
        if timeout >= 10000 then        ' after a while, display the received data
            timeout = 0
            changed = 0
            j = 0
            for i = 0 to 20
                Debug "Received data: ", dec2 i, "-", bin8 LCDlog[i],13,10
                LCDlog[i] = 0           'Clear the log
            next i
            debug 13,10,13,10
        Endif
    Goto Main
    Now the problem:
    The data I receive is not consequent. When I display the same text on the display (by pussing a button on the machine) a few times, i get different log-information from my pic-system. I think it has to something with timing, but I'm not shure were it goes wrong. Any ideas?

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


    Did you find this post helpful? Yes | No

    Default

    i've never done something like this before.. may LCDIN help? unless you may need to be in synch with the LCD RS/E pins.

    I would suggest to record the LCD output and see what hapen. PoScope or whatever else much fancy stuff you have on had.
    Steve

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

  3. #3
    Join Date
    Mar 2005
    Posts
    15


    Did you find this post helpful? Yes | No

    Smile

    Thanks for the tip. I now have a 'Logicport'. It works great. I think that I can fix the problem with the information of this logic analzyer.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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