LCD hd44780 works but displays for just a sec

Discussion in 'General Electronics Chat' started by avditk, May 29, 2014.

  1. avditk

    Thread Starter New Member

    May 10, 2014
    2
    0
    Hi,
    I am working with hd44780 with a freescale UC s08(clock frequency 8MHz) family. The output on the LCD disappears after a second or so even when in the infinite loop and when the cursor is also set to the left top.

    Help

    Avdit

    p.s. i have included my while loop

    Code ( (Unknown Language)):
    1.  
    2. while(1)
    3.     {  
    4.             TOGG=1;
    5.             delay(100);
    6.             TOGG=0;
    7.             delay(100);
    8.  
    9.            
    10.             s_data();
    11.             datawrite('J');
    12.             datawrite('e');
    13.             datawrite('q');
    14.             datawrite(' ');
    15.             datawrite('D');
    16.             datawrite('A');
    17.             datawrite('T');
    18.             datawrite('A');
    19.             datawrite(' ');
    20.             TOGG=0;
    21.             datawrite('L');
    22.             datawrite('O');
    23.             datawrite('G');
    24.             datawrite('G');
    25.             datawrite('E');
    26.             datawrite('R');
    27.            
    28.             delay(6000);
    29.            
    30.             s_inst();
    31.             commandwrite(0x02);   // goes back to top left
    32.            
    33.             /*for(k=0;k<9;k++)
    34.             {
    35.                 s_data();
    36.                 DATA = x[k];    // It will send x[0] as ASCII to the port
    37.                 s_latch();
    38.                
    39.             }*/
    40.            
    41.         }
    42.  
     
    Last edited by a moderator: May 29, 2014
Loading...