128240A 1/128 duty T6963C lcd still black

Discussion in 'Programmer's Corner' started by mariammo, Jun 19, 2010.

  1. mariammo

    Thread Starter New Member

    Jun 19, 2010
    4
    0
    please i have 128240A 1/128 duty T6963C based graphic display after setting as following
    ;graphic home set;graphic area set
    ;text home set;text area set
    ;or mode ,internal cg rom mode
    ;mode set lcd on curser on and blink off
    ; cursor 1 line ;set cursor pos at 0,0
    ;address pointer set to text area address 5000h
    ;write 21h "A charecter" at all area
    it is still black
    not display any thing
    what is the problem
    ;========================================================== call read_status
    MOV PA_BUFFER,#90h ; lcd off curser off
    call CNTRL_WRITE
    ;==========================================================
    lcd contrast is ok it is changing from min to max by pot
    the last code i believe it will change lcd from black to white but it is not . why?
    please send to me as soon as you can
    thanks for your responce
     
  2. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    If you are asking for help, here are few things to keep in mind.

    State very clearly what ur project is.
    attach schematics if any.
    Explain what ur goal is and what you have done so far.
    Inform us on your basic skill levels, what u are familiar with and not.
    Post the code if any.
    All and every bit of detail will be needed if you want any one of us to respond quickly.
     
  3. mariammo

    Thread Starter New Member

    Jun 19, 2010
    4
    0
    i need to write arabic messages
    i use keil asm.
    i tried this code but it is still black
    please help me

    Code ( (Unknown Language)):
    1.  
    2.  
    3.  lcdcd bit p2.5;
    4.  lcdrd bit p2.6;
    5.  lcdwr bit p2.7;
    6.  lcdreset bit p2.0;
    7.  lcdce bit p2.1;
    8.  lcdfs bit p2.2  ; 1= 6x8 ,0=8x8
    9.  LCD_PORT data 080H ;p0
    10.  ORG   0000H
    11.  JMP   RESET
    12.  RESET:
    13.  CPL WD_RESET
    14.  setb lcdcd  ;
    15.  setb lcdrd  ;
    16.  setb lcdwr  ;
    17.  setb lcdreset ;
    18.  setb lcdce ;
    19.  setb lcdfs ;
    20.   mov LCD_PORT,#0ffh  ;input
    21.     clr lcdreset     ; reset
    22.  LCALL WRITE_DELAY  ; 20 microsec
    23.     setb lcdreset
    24.  LCALL WRITE_DELAY
    25.  clr lcdfs
    26.  LCALL WRITE_DELAY
    27. // ;==================================================================
    28.  call read_status
    29.   MOV PA_BUFFER,#00h  ; text home set
    30.  call DATA_WRITE
    31. ; LCALL WRITE_DELAY
    32.  call read_status
    33.   MOV PA_BUFFER,#00h ;050h
    34.  call DATA_WRITE
    35. ; LCALL WRITE_DELAY
    36.  call read_status
    37.   MOV PA_BUFFER,#40h
    38.  call CNTRL_WRITE
    39. ; LCALL WRITE_DELAY
    40.  
    41.  call read_status
    42.   MOV PA_BUFFER,#1eh  ; text area set 30 charecter for 1 row
    43.  call DATA_WRITE
    44. ; LCALL WRITE_DELAY
    45.  call read_status
    46.   MOV PA_BUFFER,#00h
    47.  call DATA_WRITE
    48. ; LCALL WRITE_DELAY
    49.  call read_status
    50.   MOV PA_BUFFER,#41h
    51.  call CNTRL_WRITE
    52. ; LCALL WRITE_DELAY
    53. // ;==================================================================
    54.  call read_status
    55.   MOV PA_BUFFER,#080h ;or ,internal cg rom mode
    56.  call CNTRL_WRITE
    57. ; LCALL WRITE_DELAY
    58.  ;==================================================================
    59.  call read_status
    60.   MOV PA_BUFFER,#094h ;mode set text on ,graphic off ,curser off and blink off
    61.  call CNTRL_WRITE
    62. ; LCALL WRITE_DELAY
    63.  ;==================================================================
    64. ; LCALL WRITE_DELAY
    65.  call read_status
    66.   MOV PA_BUFFER,#0a0h ; cursor 1 line
    67.  call CNTRL_WRITE
    68. ; LCALL WRITE_DELAY
    69. // ;==================================================================
    70. // ;==================================================================
    71.  call read_status
    72.    MOV PA_BUFFER,#00h ;address pointer set to text area address 00
    73.  call DATA_WRITE
    74. ; LCALL WRITE_DELAY
    75.  call read_status
    76.   MOV PA_BUFFER,#00h
    77.  call DATA_WRITE
    78. ; LCALL WRITE_DELAY
    79.  call read_status
    80.   MOV PA_BUFFER,#24h
    81.  call CNTRL_WRITE
    82. ; LCALL WRITE_DELAY
    83.  ;==================================================================
    84.  ;==================================================================
    85.  call read_status
    86.   MOV PA_BUFFER,#00h    ;set cursor pos at 0,0
    87.  call DATA_WRITE
    88. ; LCALL WRITE_DELAY
    89.  call read_status
    90.   MOV PA_BUFFER,#00h
    91.  call DATA_WRITE
    92. ; LCALL WRITE_DELAY
    93.  call read_status
    94.   MOV PA_BUFFER,#21h
    95.  call CNTRL_WRITE
    96. ; LCALL WRITE_DELAY
    97. //// ;==================================================================
    98. ////// ;==================================================================
    99.  MAIN:
    100.  
    101.   CPL WD_RESET
    102.     push 00      ;1 screen
    103.  push 01
    104.  mov r1,#04h
    105.   wrire0ag:
    106.  mov r0,#078h
    107.   wrireag:
    108.  
    109.  call read_status
    110.   MOV PA_BUFFER,#021h  ;write 21h A charecter
    111.  call DATA_WRITE
    112. ; LCALL WRITE_DELAY
    113.  call read_status
    114.   MOV PA_BUFFER,#0c0h
    115.  call CNTRL_WRITE
    116. ; LCALL WRITE_DELAY
    117.     djnz r0,wrireag
    118.  djnz r1,wrire0ag
    119.  pop 01
    120.  pop 00
    121.  main1:
    122.    CPL WD_RESET
    123.  jmp main1
    124.  
    125.  ;==================================================================
    126.  
    127.  ;==================================================================
    128.  CNTRL_WRITE:
    129.  setb LCDce
    130.  setb  LCDcd
    131.  setb lcdrd
    132.  setb LCDwr
    133.  MOV  LCD_PORT,PA_BUFFER
    134.  nop
    135.  clr  LCDce
    136.  clr  LCDwr
    137.  LCALL WRITE_DELAY
    138.  setb LCDwr
    139.  setb LCDce
    140.  RET
    141.  
    142.  ;==================================================================
    143.  DATA_WRITE:
    144.  setb LCDce
    145.  setb  LCDcd
    146.  setb lcdrd
    147.  setb LCDwr
    148.  MOV  LCD_PORT,PA_BUFFER
    149.  nop
    150.  clr  LCDcd
    151.  clr  LCDce
    152.  clr  LCDwr
    153.  LCALL WRITE_DELAY
    154.  setb LCDwr
    155.  setb LCDce
    156.  setb lcdcd
    157.  RET
    158.  ;==================================================================
    159.  DATA_read:
    160.  clr LCDcd
    161.  NOP
    162.  setb LCDwr
    163.  nop
    164.  clr lcdrd
    165.  nop
    166.  clr LCDce
    167.  NOP
    168.  NOP
    169.  NOP
    170.  MOV  LCD_PORT,PA_BUFFER
    171.  nop
    172.  nop
    173.  setb LCDce
    174.  LCALL WRITE_DELAY
    175.  RET
    176.  ;==================================================================
    177.  read_status:
    178.  push acc
    179.  mov  LCD_PORT,#0ffh  ; input
    180.  setb LCDce
    181.  setb  LCDcd
    182.  setb lcdrd
    183.  setb LCDwr
    184.  nop
    185.   redstag:
    186.         clr LCDce
    187.  clr lcdrd
    188.  LCALL WRITE_DELAY
    189.  MOV  a,LCD_PORT
    190.  ;LCALL WRITE_DELAY
    191.  setb lcdrd
    192.  setb LCDce
    193.  anl a,#03h
    194.  cjne a,#03h,redstag
    195.  pop acc
    196.  RET
    197.  ;==================================================================
    198.  error_status:
    199.  push acc
    200.  mov  LCD_PORT,#0ffh  ; input
    201.  setb LCDce
    202.  setb  LCDcd
    203.  setb lcdrd
    204.  setb LCDwr
    205.  nop
    206.   rederstag:
    207.         clr LCDce
    208.  clr lcdrd
    209.  LCALL WRITE_DELAY
    210.  MOV  a,LCD_PORT
    211.  ;LCALL WRITE_DELAY
    212.  setb lcdrd
    213.  setb LCDce
    214.  anl a,#040h
    215.  cjne a,#00h,rederstag
    216.  pop acc
    217.  RET
    218.  ;==================================================================
    219.  lcd_chick:
    220.  push acc
    221.  anl  LCD_PORT,#0ffh  ; input
    222.  setb  LCDcd
    223.  setb LCDwr
    224.  clr lcdrd
    225.   lcdstag:
    226.  LCALL WRITE_DELAY
    227.  MOV  a,LCD_PORT
    228.  jnb acc.7,lcdstag
    229.  setb lcdrd
    230.  pop acc
    231.  RET
    232.  
    233.    ;==================================================================
    234.  WRITE_DELAY: PUSH 02
    235.  MOV R2,#28H ;28H=40 MICROSEC,46H=70
    236.  DJNZ R2,$
    237.  POP 02
    238.  CPL WD_RESET
    239.  RET
    240.  ;==================================================================
    241.  end
    242.  
    243.  
     
    Last edited by a moderator: Jun 21, 2010
  4. coldpenguin

    Active Member

    Apr 18, 2010
    165
    9
    How have you wired up the LCD?
     
  5. mariammo

    Thread Starter New Member

    Jun 19, 2010
    4
    0
    lcdcd bit p2.5;
    lcdrd bit p2.6;
    lcdwr bit p2.7;
    lcdreset bit p2.0;
    lcdce bit p2.1;
    lcdfs bit p2.2 ; 1= 6x8 ,0=8x8
    LCD_PORT data 080H ;p0
    all outputs are pulled up
    inputs and outputs used before in many systems
    and i used it with powertip 2x20 character display it was work
    vout(-15v) output lcd socket pin 20 is connected to vo lcd socket pin 4 by pot 10k
     
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Is it all black? If so, the negative voltage may be too high. That negative voltage is used to make more contrast, if you remove it, you should still have your characters.

    Have you tried a simple 'hello, world" with it?

    I would grab a simple basic compiler with LCD functions, that will allow you to send characters to the LCD with a 'printLED "Hello",2' type statement.

    That will help to determine if it is your code, your wiring, or maybe you have a faulty LCD display.
     
  7. mariammo

    Thread Starter New Member

    Jun 19, 2010
    4
    0
    thanks for answer
    the negative voltage come from built in generator into lcd socket pin 20 and i adjust it by pot 10k but same result all black
     
  8. arry

    New Member

    Apr 2, 2010
    26
    4
    When you send a message to the Lcd try adjusting the pot from 0 to its maximum value. Sometimes the voltage level for visible contrast is very sensitive.

    You could try programs like lcdstudio or LcdInfo to see if your Lcd is not broken.
     
Loading...