新聞中心

        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

        本文引用地址:http://www.104case.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 下一頁

        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 津南区| 东乡县| 汝城县| 双鸭山市| 客服| 奉新县| 金昌市| 分宜县| 肇庆市| 子洲县| 镇江市| 宁武县| 淮北市| 瑞安市| 尚志市| 交口县| 长白| 晋宁县| 宜阳县| 十堰市| 广灵县| 河北区| 攀枝花市| 红原县| 龙南县| 斗六市| 西充县| 出国| 襄樊市| 伊吾县| 沂南县| 界首市| 威信县| 清河县| 全椒县| 周口市| 盐边县| 萨嘎县| 辽宁省| 运城市| 柏乡县|