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


Browsing this Thread:   1 Anonymous Users






請問使用PIC16F73控制文字型LCM的問題
#1
新會員
新會員


查看用戶資訊
各位好,先說聲抱歉,我對PIC這顆微處理器一點都不懂,
但是客戶問了一個問題必須馬上回覆,所以希望各位大哥能
能撥冗幫我解答一下,感謝你們!!
使用的IC是:PIC16F73,使用4 bit方式傳輸
LCM是16x2的Module,Controller是相容於HD44780的IC,
問題如下:
當想要顯示的字元後4bit都為0時,此字元的下一個字元都會
顯示錯誤,例如:
input 0x20, 0x46 → output 0x20, 0xf4
input 0x20, 0x53 → output 0x20, 0xf5
input 0x20, 0x46, 0x53 → output 0x20, 0xf5, 0x53
input 0x40, 0x41, 0x31 → output 0x40, 0xf4, 0x31
input 0x50, 0x51, 0x21 → output 0x50, 0xf5, 0x21

程式如下:
Main loop:

start
call init_proc ; initialise the processor
bcf status,RBSEL ; select Register Bank 0
call init_timer ; initialise the timer
; call init_eeprom ; initialise the eeprom interface
call dsp_init ; initialise the display
bsf intcon,gie ; enable global interrupts
; call sign_on ; display sign on message on both displays

; call dsp_team ; initial display on line 2


mainlp
; tstf rxcmnd ; if a command is not ready to process then don't do it

; call proc_buf ; process the recieve buffer
call do_states ; process the main state machine
; call update_done
; call update_mins ; update the time display
; call update_secs
; tstf notdone ; test to see if all teams have succeeded

; bz timeuplp ; if they have then stop and freeze display

; movfw secs ; have we timed out?
; iorwf mins,W ; W != 0 if we haven't
; bnz mainlp ; so keep looping

; movlw 100 ; **** test line ****
; movwf dlyval ; **** test line ****
; call delay ; **** test line ****
movlw ' ' ; send sign on message to both chips
call dsp_chr
movlw 'S' ; send sign on message to both chips
call dsp_chr
movlw 'F' ; send sign on message to both chips
call dsp_chr
movlw '@' ; send sign on message to both chips
call dsp_chr
movlw 'A' ; send sign on message to both chips
call dsp_chr
movlw '1' ; send sign on message to both chips
call dsp_chr
movlw 'P' ; send sign on message to both chips
call dsp_chr
movlw 'Q' ; send sign on message to both chips
call dsp_chr
movlw '!' ; send sign on message to both chips
call dsp_chr
; goto mainlp ; so keep looping

; call update_mins ; update the time display
; call update_secs
; call dsp_boom ; else display time up message
timeuplp
goto timeuplp ; and finish

感謝各位大哥,因我從未接觸過PIC,不好意思佔用你們的時
間,謝謝!!

發表於: 2005/9/9 0:05
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... ]

教育訓練中心

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