Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 3rd January 2008, 02:48 PM   (permalink)
Default

hi,
For the LCD test, you dont have to understand my program, just assemble it and load the hex file into a PIC and run it.

I am beginning to suspect your LCD is faulty.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 3rd January 2008, 02:57 PM   (permalink)
Default

Quote:
Originally Posted by smileguitar
As your suggestion, I've connected a 0.1uF capacitor accross pins 1&2 of the LCD. The circuit have some improvement that the partial dark rectangles appear longer time than before. Erm...I'm not sure that I've use 2 capacitors to accross pins 1&2, which one capacitor connect to pin1 to ground, and another capacitor connect to pin2 to Vcc. Am I correct to connect by this way?
Am I right in thinking you have no connection from pin 1 to ground but instead have a capacitor?

You should have,
Pin 1 to Gnd.
Pin 2 to Vcc.
A capacitor from pin 1 to pin 2.

Mike.
Pommie is offline  
Old 3rd January 2008, 03:03 PM   (permalink)
Default

Quote:
Originally Posted by Pommie
Am I right in thinking you have no connection from pin 1 to ground but instead have a capacitor?

You should have,
Pin 1 to Gnd.
Pin 2 to Vcc.
A capacitor from pin 1 to pin 2.

Mike.
I see... I think I should connect by this way, why I never think of it. Oh my god, I'm totally lost....

Thanks for your suggestion!
smileguitar is offline  
Old 3rd January 2008, 03:06 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
hi,
For the LCD test, you dont have to understand my program, just assemble it and load the hex file into a PIC and run it.

I am beginning to suspect your LCD is faulty.
You mean my LCD is malfunction? But the light can be on, and some dark rectangles appear then faded down......
smileguitar is offline  
Old 3rd January 2008, 03:21 PM   (permalink)
Default

Quote:
Originally Posted by smileguitar
You mean my LCD is malfunction? But the light can be on, and some dark rectangles appear then faded down......
Aa I have indicated last time, generally the failure is also indicated by additional warming-up of one of the COBs behind the JHD162A.

This happens ( at leat happened to me) when a display is inadvertently plugged out when the device is working-- plug and play culture.
__________________
Regards,
Sarma.
mvs sarma is offline  
Old 3rd January 2008, 03:28 PM   (permalink)
Default

Quote:
Originally Posted by mvs sarma
Aa I have indicated last time, generally the failure is also indicated by additional warming-up of one of the COBs behind the JHD162A.

This happens ( at leat happened to me) when a display is inadvertently plugged out when the device is working-- plug and play culture.
COBs behind the JHD162A is slightly warm mean the LCD is burnt? Even it still can on the LCD light?
smileguitar is offline  
Old 3rd January 2008, 03:38 PM   (permalink)
Default

Quote:
Originally Posted by smileguitar
You mean my LCD is malfunction? But the light can be on, and some dark rectangles appear then faded down......
This is what we are trying to find out!

Whats the problem in loading my hex file that works when loaded into a PIC, for driving a HD44870 LCD controller????

At least try it.!
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 4th January 2008, 03:27 PM   (permalink)
Default

Hi, can I know how I test the LCD is faulty or not? Tomorrow I'll buy a new LCD to test it, but before change a new LCD I need to know how to test LCD is either in good condition or not because I need to write a report and prove that LCD is faulty.

Thanks in advance!!!
smileguitar is offline  
Old 4th January 2008, 03:28 PM   (permalink)
Default

Quote:
Originally Posted by smileguitar
Hi, can I know how I test the LCD is faulty or not? Tomorrow I'll buy a new LCD to test it, but before change a new LCD I need to know how to test LCD is either in good condition or not because I need to write a report and prove that LCD is faulty.

Thanks in advance!!!
Have you tried a known working LCD driver program???
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 4th January 2008, 04:00 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
Have you tried a known working LCD driver program???
Sorry, what do you mean a known working LCD driver programme? I think I never tried it before. Really sorry, this is the first time I touch LCD and not really know about the well known LCD driver programme. erm... How it is try...

Thanks!!
smileguitar is offline  
Old 4th January 2008, 04:12 PM   (permalink)
Default

Quote:
Originally Posted by smileguitar
Sorry, what do you mean a known working LCD driver programme? I think I never tried it before. Really sorry, this is the first time I touch LCD and not really know about the well known LCD driver programme. erm... How it is try...

Thanks!!
hi,
Its the one I posted a few days ago,, IIRC.... 'lcd2line'

To determine the cause of a problem, sometimes you have to use a known 'good' program or component.
For example: say you had a spare LCD on the shelf, you would try it in the place of the suspect one. If it worked with the new one that would most likely mean the first one is faulty.
If it still didnt work with a new LCD that would mean the problem is most likely something else other than the LCD.

The same applies to a program,, the program i posted works with a HD44870 LCD controller and the same type of PIC that you are using.
If my program drives the LCD OK, this means the fault is most likely your program,,, if the LCD dosnt work with my program then either the LCD is faulty or the LCD wiring is faulty.

Its necessary when fault finding to go thru a process of elimination, using devices or programs of known quality...

Do You follow this???

Its this one.
Attached Files
File Type: asm lcd2line1.asm (2.6 KB, 2 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 12:23 PM.
ericgibbs is offline  
Old 4th January 2008, 05:04 PM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
hi,
Its the one I posted a few days ago,, IIRC.... 'lcd2line'

To determine the cause of a problem, sometimes you have to use a known 'good' program or component.
For example: say you had a spare LCD on the shelf, you would try it in the place of the suspect one. If it worked with the new one that would most likely mean the first one is faulty.
If it still didnt work with a new LCD that would mean the problem is most likely something else other than the LCD.

The same applies to a program,, the program i posted works with a HD44870 LCD controller and the same type of PIC that you are using.
If my program drives the LCD OK, this means the fault is most likely your program,,, if the LCD dosnt work with my program then either the LCD is faulty or the LCD wiring is faulty.

Its necessary when fault finding to go thru a process of elimination, using devices or programs of known quality...

Do You follow this???

Its this one.
I did test the LCD with the programme that you provided, it not work; means that the possibility for LCD faulty and LCD wiring is faulty. So, I have to use your programme to test in the new LCD. If work in new LCD, I'll know the result, am I right?

Erm... could you help me to double check again my connection of LCD? I've attached it above.

Thanks!!
Attached Images
File Type: jpg LCD schematic.jpg (134.7 KB, 9 views)
smileguitar is offline  
Old 4th January 2008, 05:11 PM   (permalink)
Default

You can't just connect VEE to gnd, it generally need to be adjustable and some LCDs require a small negative voltage.
Put a 10K pot bettween pins 1 & 2 with the wiper going to pin 3.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 4th January 2008, 05:45 PM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics
You can't just connect VEE to gnd, it generally need to be adjustable and some LCDs require a small negative voltage.
Put a 10K pot bettween pins 1 & 2 with the wiper going to pin 3.
Ok, thanks!
smileguitar is offline  
Old 5th January 2008, 02:57 AM   (permalink)
Default

Hey smileguitar. I just wired an LCD up to a 16F877A I had kickin around, using pretty much your original post schematic, but with some minor changes.

I programmed the chip with your original posted code (fixed the BANK0 macro error).

It works fine. Prints "YES" on line 1 and "123" on line 2.

I'll draw up a quicky schematic of how I wired it and post tonight. Meanwhile, here's the code with that one tiny error fixed:
Code:
	LIST P=16F877
	#INCLUDE <P16F877.INC>
	__CONFIG 0X3F32

; MACRO
BANK0	MACRO
	BCF	STATUS,RP0
	BCF	STATUS,RP1
	ENDM

BANK1	MACRO
	BSF	STATUS,RP0
	BCF	STATUS,RP1
	ENDM


CLOCK_E	MACRO
	BSF	PORTD,3
	CALL	DELAY2
	BCF	PORTD,3
	ENDM

; VARIABLE
D1	EQU	0X20
D2	EQU	0X21
D3	EQU	0X22
D4	EQU	0X23
D5	EQU	0X24
D6	EQU	0X25

; MAIN PROGRAM
	ORG	0X0000
	GOTO	START

STOP	ORG	0X0004
	GOTO	STOP

START	BANK0
	CLRF	PORTA
	CLRF	PORTB
	CLRF	PORTC
	CLRF	PORTD
	CLRF	PORTE

	BANK1
	MOVLW	0x06
	MOVWF	ADCON1
	CLRF	TRISA
	CLRF	TRISB
	CLRF	TRISC
	CLRF	TRISD
	CLRF	TRISE

	BANK0
	CLRF	PORTB

; LCD INITIALIZED
	CALL	DELAY1
	BCF	PORTD,2
	MOVLW	B'00110000'
	MOVWF	PORTB
	CLOCK_E

	CALL	DELAY2
	MOVLW	B'00001101'
	MOVWF	PORTB
	CLOCK_E

	CALL	DELAY3
	MOVLW	B'00111000'
	MOVWF	PORTB
	CLOCK_E
	MOVLW	B'00000001'
	MOVWF	PORTB
	CLOCK_E
	MOVLW	B'00000110'
	MOVWF	PORTB
	CLOCK_E

; MESSAGES DISPLAY IN LINE 1
	BSF	PORTD,2
	MOVLW	H'59'
	MOVWF	PORTB	;DISPLAY "YES"
	CLOCK_E
	MOVLW	H'45'
	MOVWF	PORTB
	CLOCK_E
	MOVLW	H'53'
	MOVWF	PORTB
	CLOCK_E

; SET LCD TO SECOND LINE
	BCF	PORTD,2
	MOVLW	B'11000000'
	MOVWF	PORTB
	CLOCK_E

; MESSAGES DISPLAY IN LINE 2
	BSF	PORTD,2
	MOVLW	H'31'
	MOVWF	PORTB	;DISPLAY123
	CLOCK_E
	MOVLW	H'32'
	MOVWF	PORTB
	CLOCK_E
	MOVLW	H'33'
	MOVWF	PORTB
	CLOCK_E

	GOTO	$-1

; SUBROUTINE FOR DELAY
DELAY1 MOVLW D'65' ;DELAY 50ms
	MOVWF	D2
	MOVLW	D'238'
	MOVWF	D1
LOOP1	DECFSZ	D1,1
	GOTO	LOOP1
	DECFSZ	D2,1
	GOTO	LOOP1
	RETURN

DELAY2	MOVLW	D'13'	;DELAY 10ms
	MOVWF	D4
	MOVLW	D'251'
	MOVWF	D3
LOOP2	DECFSZ	D3,1
	GOTO	LOOP2
	DECFSZ	D4,1
	GOTO	LOOP2
	RETURN

DELAY3	MOVLW	D'1'	;DELAY 100us
	MOVWF	D6
	MOVLW	D'31'
	MOVWF	D5
LOOP3	DECFSZ	D5,1
	GOTO	LOOP3
	DECFSZ	D6,1
	GOTO	LOOP3
	RETURN

	END
Couple pics:
Photo 1
Photo 2
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 5th January 2008 at 05:57 AM.
futz is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
LCD 2x16 Demo for the Unicorn (18F4550) blueroomelectronics Micro Controllers 21 31st October 2008 05:17 PM
PIC16F88, PIC simulator lcd trouble superbrew Micro Controllers 11 17th October 2007 03:18 AM
PIC16F628A LCD problems. HerbertMunch Micro Controllers 17 2nd October 2007 10:20 AM
Newbie needs help with LCD backlight dimming Mongoose General Electronics Chat 6 22nd September 2007 12:23 AM
LCD Troubles Kyle-s4h Micro Controllers 13 11th September 2007 01:30 PM



All times are GMT. The time now is 01:05 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker