Intense assembly help within 3 days...

Discussion in 'Embedded Systems and Microcontrollers' started by sanwa, Mar 26, 2009.

  1. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    There is an include file for my project, which is the lcd.asm.
    From my main file, i have Print_Char:
    In the lcd.asm:
    Code ( (Unknown Language)):
    1. ;---------------------------------------------------
    2. ;         Show an ASCII Character on the LCD
    3. ;
    4. ; Input: W = character
    5. ;
    6. Print_Char:
    7.     goto    LCDdata
    8.  
    Code ( (Unknown Language)):
    1. ;------------------------------------------------------------------
    2. ;              Send Data Byte to LCD
    3. ;
    4. ; Input: W = data byte
    5. ;
    6. LCDdata:
    7.     incf    lcd_address ; update cursor position
    8.     bsf LCD_RS
    9. LCD_write:
    10.     movwf   lcd_dat
    11.     call    lcd_hi
    12.     bsf LCD_E
    13.     nop
    14.     bcf LCD_E
    15.     call    lcd_lo
    16.     bsf LCD_E
    17.     nop
    18.     bcf LCD_E
    19.     goto    wait100     ; wait 100uS
    20.  
    21.  
    22. ;------------------------------------------------------------------
    23.  
    Is this code the one that will display the character as what we can see on the LCD? (I mean decimal). As I am planning to use this to convert my binary string to readable decimal at the hyperterminal. Thanks
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    LCD needs either 4 bit (nybble) or 8 bit (byte) input. There are serial to LCD driver ICs available, otherwise, 7 pins are needed for R/W, 6 pins for write only to LCD.

    They are also somewhat fussy about timing, especially in nybble mode.
     
  3. sanwa

    Thread Starter Active Member

    Jan 18, 2009
    36
    0
    I am using 4 bits by the way. Can I know anything frm this?
     
Loading...