![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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/ | |
| |
| | (permalink) | |
| Quote:
You should have, Pin 1 to Gnd. Pin 2 to Vcc. A capacitor from pin 1 to pin 2. Mike. | ||
| |
| | (permalink) | |
| Quote:
Thanks for your suggestion! | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
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. | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
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/ | ||
| |
| | (permalink) |
| 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!!! | |
| |
| | (permalink) | |
| Quote:
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) | |
| Quote:
Thanks!! | ||
| |
| | (permalink) | |
| Quote:
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.
__________________ 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. | ||
| |
| | (permalink) | |
| Quote:
Erm... could you help me to double check again my connection of LCD? I've attached it above. Thanks!! | ||
| |
| | (permalink) |
| 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. ![]() | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| 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 Photo 1 Photo 2
__________________ ========================= Futz's Microcontrollers & Robotics ========================= Last edited by futz; 5th January 2008 at 05:57 AM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |