Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

16x02 Lcd properly initialized but doesn't display chars

Status
Not open for further replies.

kgavionics

Full Member level 3
Joined
Jun 12, 2012
Messages
167
Helped
7
Reputation
14
Reaction score
11
Trophy points
1,298
Location
Alberta.Canada
Activity points
2,479
hi
i bought a new 16x02 HD44780 compliant. I can initialize the display and i display the cursor and move it the second line without problem, but it doesn't show any character.When i swap it my other 16x04 display, every thing works fine.
it's pretty weird.Can someone tell me what's going on.

here's my code

Code:
;============================================================
; File name:
; Date:
; Author:
; Processor:
; Reference circuit:
;============================================================
; Copyright notice:
;============================================================
; Program Description:
;
;===========================
; configuration switches
;===========================
list		p=16f877A	; list directive to define processor
	#include	<p16f877A.inc>	; processor specific variable definitions
	
	__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _HS_OSC & _WRT_OFF & _LVP_OFF & _CPD_OFF


;=====================================================
; constant definitions
;=====================================================
;=====================================================
; PIC register equates
pcl  EQU 2
;=====================================================
;=====================================================
; variables in PIC RAM
;=====================================================
cblock 0x20
counter1 :  1 
counter2  : 1
number   : 1
endc
;============================================================
; program
;============================================================
org 0X00 ; start at address
goto main
; Space for interrupt handlers
org 0x08


delay
	movlw	0x30
	movwf	counter2
loop1
	movlw	0xff
	movwf	counter1
loop2
 	nop
	decfsz counter1
	goto loop2
	decfsz counter2
	goto loop1
return

instw  
	movwf	PORTB
	call delay
	bcf	PORTD,4
	call delay
	bsf	PORTD,5
	call delay
	bcf	PORTD,5
	call	delay
return
dataw 
	movwf PORTB
	call delay
	bsf PORTD, 4
	call delay
	bsf PORTD, 5
	call delay
	bcf PORTD, 5 ;Transitional E signal
	call delay
return

main:
	bsf STATUS,RP0
	movlw	0x00
	movwf	TRISB
	movwf	TRISD
	bcf STATUS,RP0
	clrf	PORTD
	clrf	PORTB
	call delay
	call delay
start
	clrf PORTD ;Here RW is pulled down to ground
;LCD routine starts
	call delay
;give LCD module to reset automatically
;Fundtion for 8-bit, 2-line display, and 5x8 dot matrix

	
	movlw 0x38
	call instw
	call delay
	movlw 0x0F
	call instw
	call delay
	movlw 0x01
	call instw
	call delay
	movlw 0x48
	call dataw
	movlw 0x45
	call dataw 
	movlw 0x4c
	call dataw
	movlw 0x4c
	call dataw
	movlw 0x4f
	call dataw 
	movlw 0x20
	call dataw 
	movlw 0x57
	call dataw
	movlw 0x4f
	call dataw 
	movlw 0x52
	call dataw
	movlw 0x4c
	call dataw
	movlw 0x44
	call dataw
	kais
	goto kais
		
;============================================================
end ; END OF PROGRAM
;============================================================
 

pins maybe reversed in 16X4 type.

No, i've checked all the pin and they are OK. I'm gonna unsolder all the wires and i'm gonna start over,because it's pretty weird...

- - - Updated - - -

hello again
problem solved by unsoldering all the wires and changing them.everything is all right now.
 

hi guys
last time, i said that i undersold the wires and it worked, but actually i was wrong because i took one of my 3 working Lcd displays.
i have the same problem.I removed all the wiring and made a clean soldering and i have the same problem, my Lcd shows only the cursor.I can move the cursor, clear the screen etc...,but what ever i do i can't display any char.
When i replace the Lcd by another one, it works and i can see the chars.
can the Lcd be faulty?
can some one help me out?
 

hi
i just made a test and my Lcd is working in 4 bit mode properly.I suspect that a line in circuit board is not working properly,because i did the wiring 2 times with the same result.i'm gonna leave it in 4 bit mode.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top