• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 多谢版主帮忙!
#8
版主
版主


查看用戶資訊
能解決問題的就是聰明人

發表於: 2004/10/28 14:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


多谢版主帮忙!
#7
初級會員
初級會員


查看用戶資訊
多谢版主帮忙!
关于驱动HT1621,源于前些天不忙,想在俺的桌面上增加一个表,用来显示时间。
无奈,太笨;

现解决。

不好意思说。

脸红。

發表於: 2004/10/28 11:10
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于HT1621驱动LCD
#6
版主
版主


查看用戶資訊
這是將HD44780 initial to 4-bit mode的程式,不知是否與Holtek's HT1621是否有差別??

; LCD Module commands
DISP_ON EQU 0x00C ; Display on
DISP_ON_C EQU 0x00E ; Display on, Cursor on
DISP_ON_B EQU 0x00F ; Display on, Cursor on, Blink cursor
DISP_OFF EQU 0x008 ; Display off
CLR_DISP EQU 0x001 ; Clear the Display
ENTRY_INC EQU 0x006 ;
ENTRY_INC_S EQU 0x007 ;
ENTRY_DEC EQU 0x004 ;
ENTRY_DEC_S EQU 0x005 ;
DD_RAM_ADDR EQU 0x080 ; Least Significant 7-bit are for address
DD_RAM_UL EQU 0x080 ; Upper Left coner of the Display
;
;*******************************************************************
;* The LCD Module Subroutines *
;* Command sequence for 2 lines of 5x16 characters *
;*******************************************************************
InitLCD
BANKSEL TRISB
movlw 0xc0 ; Initialize inputs/outputs for LCD
movwf TRISB
BANKSEL LCD_DATA
clrf LCD_DATA ; Clear LCD data & control bits
;
movlw .50 ; Power=On delay 50mS
Call Delay_MS
;
movlw 0x02 ; Init for 4-bit interface
call Send_4bit
movlw .10 ; Delay 10 mS
Call Delay_MS
;
movlw b'00000011' ; Fully Initial LCD module
call Send_4bit ; Sent '0011' data 4 time
movlw .5 ; Delay 5mS
Call Delay_MS
movlw b'00000011'
call Send_4bit
call Delay_1MS ; Delay 1mS
movlw b'00000011'
call Send_4bit
movlw b'00000010'
call Send_4bit
;
movlw b'00101000' ; Set 2 lines & 5 x 7 dots
call SendCmd
movlw DISP_ON ; Turn display on (0x0C)
call SendCmd
movlw ENTRY_INC ; Configure cursor movement
call SendCmd
movlw DD_RAM_ADDR ; Set writes for display memory
call SendCmd
return
;
;*******************************************************************
;* SendCmd - Sends command to LCD *
;* This routine splits the command into the upper and lower *
;* nibbles and sends them to the LCD, upper nibble first. *
;*******************************************************************
SendCmd
banksel Byte
movwf Byte ; Save WREG in Byte variable
call Delay_1MS
swapf Byte,W ; Send upper nibble first
andlw 0x0f
movwf LCD_DATA
bcf LCD_CNTL,RS ; Clear for command
bsf LCD_CNTL,E ; Clock nibble into LCD
bcf LCD_CNTL,E
movf Byte,W ; Write lower nibble last
Send_4bit andlw 0x0f
movwf LCD_DATA
bcf LCD_CNTL,RS ; Clear for command
bsf LCD_CNTL,E ; Clock nibble into LCD
bcf LCD_CNTL,E
return
;

發表於: 2004/10/26 10:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于HT1621驱动LCD
#5
初級會員
初級會員


查看用戶資訊
关于驱动,我换了。
等待。
LCD和HT1621是画在电路板上的
估计应该没有什么问题。

郁闷。
等待。


發表於: 2004/10/25 16:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于HT1621驱动LCD
#4
版主
版主


查看用戶資訊
我比較相信是LCD MODULE接觸不良造成。用手到處壓,或把所有接點清乾淨,或用烙鐵到處補焊看看。

發表於: 2004/10/25 11:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于HT1621驱动LCD
#3
初級會員
初級會員


查看用戶資訊
我用的是4-BIT 的,还有8位的吗?
俺在网上,只能找到4-BIT的资料。用的是定制的,即LCD与驱动芯片是厂家整合的,为了LOGO和自身需要。
就在我写这个帖子的时候,我又启动了仿真器,显示正常!
难道真的与温度有关?!现在这里大概在0度左右,俺正开窗换气。
版主号脉为初始化不良, 本人驽钝,既然这样,该有明显破绽。版主开药!
俺不明,既然初始化不良,为何每个RAM(4BITS)的最后一位不显示,而前3个BITS正常?且现在全部正常?!


俺换上877芯片后,就又出问题了。
可能是PIN接触问题吗,但也不至于一个现象呀!
示波器观测正常,现在只有研究初始化了。

發表於: 2004/10/25 8:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 关于HT1621驱动LCD
#2
版主
版主


查看用戶資訊
PIC與HT1621是用8-bit還是4-bit interface ?
看起來有點像 Initial 4-bit mode時出現initial不完全的問題導致LCD有點錯亂。

發表於: 2004/10/24 12:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


关于HT1621驱动LCD
#1
初級會員
初級會員


查看用戶資訊
用PIC16C65与HT1621通讯,来驱动LCD
出现一个问题,即LCD的每个RAM的最后一个数据写不进!
导致如数字8没有最下面的一横,所有32个字节都如此

我一度猜度仿真器的头有松动,因为有的时候重新插入,还能够全部写入,即正常显示,但多数情况是每个RAM的最后一个数据写不进,即显示少一笔。

但,从示波器监测看到,数据确实发出了。

到底是LCD有问题,还是我的程序有问题?!
从示波器显示看,程序没有问题,而且正常的时候,一直都正常,但第2天,或别人动过后,就如上述了。
郁闷,前辈号脉!!!

發表於: 2004/10/21 11:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------