261
CHAPTER 12 LCD CONTROLLER/DRIVER
●
Coding example
LCRAM EQU 0064H ;Starting address of LCD display RAM
LCDR EQU 0079H ;Address of LCD control register (LCDR)
SEGR EQU 007AH ;Address of segment output select register (SEGR)
LCD SEG CSEG ;8-segment LCD data
LCDDATA DB 11011111B ;"0"
DB 11001000B ;"1"
DB 11110110B ;"2"
DB 11111100B ;"3"
DB 11101001B ;"4"
DB 01111101B ;"5"
DB 01111111B ;"6"
DB 11011001B ;"7"
DB 11111111B ;"8"
DB 11111101B ;"9"
DB 00000000B ;END
LCD SEG ENDS
;-----Main program----------------------------------------------------------------
CSEG ; [CODE SEGMENT]
:
MOVW EP,#LCRAM ; Set LCD RAM address.
MOVW IX,#LCDDATA ; Set LCD data table address.
MOV SEGR,01111111B ; Set the segment output function.
LCDSET
MOV A,@IX+00H
MOV @EP,A
INCW EP
INCW IX
BNZ LCDSET ; Continue until data end (00H) is detected.
MOV LCDR,#00101111B ; Set LCDR and turn LCD display on.
:
ENDS
;---------------------------------------------------------------------------------
END
Summary of Contents for MB89950 Series
Page 2: ......
Page 3: ...FUJITSU LIMITED F2MC 8L 8 BIT MICROCONTROLLER MB89950 950A Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 34: ...20 CHAPTER 2 HANDLING DEVICES ...
Page 134: ...120 CHAPTER 6 WATCHDOG TIMER ...
Page 236: ...222 CHAPTER 10 UART ...
Page 276: ...262 CHAPTER 12 LCD CONTROLLER DRIVER ...
Page 310: ...296 APPENDIX ...
Page 311: ...297 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 316: ...302 INDEX ...
Page 318: ......