Table of Contents

LCD Interface

SDK200 Specifics

Writing to the LCD

Command Write Process

Data Write Process

Initializing the LCD

Send out sequence of commands:

Must repeat the command write process for each of these commands.

Example function to write a command to the LCD:

; Writes value in r20 to the LCD as a command
; Assumes ports configured for LCD and RD is set (PORTD, 7 is high)
; Dependencies: delay2ms
lcd_cmd_write:
        ; Set up LCD for accepting a command
        cbi    PORTC, 6     ; RS low --> put in command mode
        cbi    PORTD, 6     ; WR low --> enable write
        sbi    PORTC, 7     ; E high --> enable LCD interface
        out    PORTA, r20   ; write command to data pins
        ; Place LCD back in default configuration
        cbi    PORTC, 7     ; E low --> disable LCD interface
        sbi    PORTC, 6     ; WR high --> disable write
        sbi    PORTD, 6     ; RS high --> put in data mode
        rcall  delay_2ms    ; delay  TODO: must write this function
        ret

You should be able to write functions for: