لقد حاولت التحكم بشاشة LCD من نوع lm020 عن طريق المتحكم PIC 16F84 عبر برنامج بسيط فقط لإظهار كلمة HELLO على الشاشة لكن عند تشغيل الدارة فإنها أظهرت
محارف غريبة .....
لا أدري أي الخطأ ( ربما في تهيئة الشاشة )
و هذا هو البرنامج الذي كتبته :
list p=16c84
radix hex
indf equ 0x00
status equ 0x03
fsr equ 0x04
porta equ 0x05
portb equ 0x06
trisa equ 0x85
trisb equ 0x86
count1 equ 0x0c
count2 equ 0x0d
timer equ 0x0e
z equ 2
rp0 equ 5
;********************************************************************
org 0x00
start bsf status,rp0
movlw 0x00
tris porta
tris portb
bcf status,rp0
movlw 0x00
movwf porta
movwf portb
call blanks
call dimitri
call del_5
call initlcd
call disp
circle goto circle
;---------------------------------------------------------------------------------------------
blanks movlw 0x10
movwf count1
movlw 0x20
movwf fsr
movlw 0x20
store movwf indf
decfsz count1,f
goto incfsr
return
incfsr incf fsr,f
goto store
;**********************************************************************
dimitri movlw 'H'
movwf 0x20
movlw 'E'
movwf 0x21
movlw 'L'
movwf 0x22
movlw 'L'
movwf 0x23
movlw 'O'
return
;*****************************************************************
initlcd bcf porta,1
bcf porta,2
call del_125
movlw 0x38
movwf portb
call pulse
movlw 0x0c
movwf portb
call pulse
movlw 0x06
movwf portb
call pulse
call del_5
return
;******************************************************************
disp bcf porta,1
bcf porta,2
call del_125
movwf 0x80
movwf portb
call pulse
bsf porta,2
call del_125
movlw 0x20
movwf fsr
getchar movf 0x00,w
movwf portb
call pulse
movlw 0x27
subwf fsr,w
btfsc status,z
goto half
movlw 2f
subwf fsr,w
btfsc status,z
return
incf fsr,f
goto getchar
half bcf porta,2
call del_125
movlw 0xc0
movwf portb
call pulse
bsf porta,2
incf fsr,f
call del_125
goto getchar
;---------------------------------------------------------------------------------
del_125 movlw 0x2a
movwf count1
x1 decfsz count1,f
goto x1
return
;--------------------------------------------------------------------------------
;---------------------------------------------------------------------------------
del_5 movlw 0x29
movwf count2
x2 call del_125
decfsz count2,f
goto x2
return
;****************************************************************
pulse bsf porta,1
nop
bcf porta,1
call del_125
return
;-----------------------------------------------------------------------
end
و ارفقت صورة الدارة التي توصل مع المتحك لأداء هذا البرنامج
ارجو أن يدلني أحد اين الخطأ في عمل الشاشة أو شرح التحكم بهذا النوع من الشاشات مع برنامج مثال

