新闻中心

EEPW首页>嵌入式系统>设计应用> PIC16Fxxx的LCD驱动程序(适用于HD44780兼容的驱动器)

PIC16Fxxx的LCD驱动程序(适用于HD44780兼容的驱动器)

作者: 时间:2012-08-12 来源:网络 收藏

bsf_CNTL,E ; Clock nibble into
bcf_CNTL,E
return
;
;*******************************************************************
;* clrLCD - Clear the contents of the LCD *
;*******************************************************************
clrLCD
movlw CLR_DISP ; Send the command to clear display
call SendCmd
return
;
;*******************************************************************
;* L1homeLCD - Moves the cursor to home position on Line 1 *
;*******************************************************************
L1homeLCD
movlw DD_RAM_ADDR|0x00 ; Send command to move cursor to
call SendCmd ; home position on line 1
return

本文引用地址: //m.amcfsurvey.com/article/171045.htm

;*******************************************************************
;* L2homeLCD - Moves the cursor to home position on Line 2 *
;*******************************************************************
L2homeLCD
movlw DD_RAM_ADDR|0x28 ; Send command to move cursor to
call SendCmd ; home position on line 2
return


;*******************************************************************
;* Delay - Generic LCD delay (1.024mS @ 4MHz) *
;* Since the microcontroller can not read the busy flag of the *
;* LCD, a specific delay needs to be executed between writes to *
;* the LCD. *
;*******************************************************************
Delay_1MS ; 2 cycles for call
clrf Count ; 1 cycle to clear counter variable
Dloop
nop
decfsz Count,F ; These two instructions provide a
goto Dloop ; (256 * 3) -1 cycle count
return ; 2 cycles for return
;
;*******************************************************************
;* Delay - 1mS base delay *
;* input : W Reg. *
;* *
;*******************************************************************
Delay_MS
movwf Count1
;
DLop1 call Delay_1MS
decfsz Count1,F
goto DLop1
return
;
END

LCD显示屏相关文章:lcd显示屏原理


lcd相关文章:lcd原理

上一页 1 2 3 下一页

评论


相关推荐

技术专区

关闭