Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Issue successfully resolved

???
04/22/07 06:01
Read: times


 
#137748 - program
Responding to: ???'s previous message
this is the program i used which displayed only "hello" in the first line.

DB0 EQU P2.0
DB1 EQU P2.1
DB2 EQU P2.2
DB3 EQU P2.3
DB4 EQU P2.4
DB5 EQU P2.5
DB6 EQU P2.6
DB7 EQU P2.7

EN EQU P3.5
RS EQU P3.7
RW EQU P3.6
DATA1 EQU P2

org 0000h
LJMP START

org 2300h

WAIT_LCD:
CLR EN ;Start LCD command
CLR RS ;It's a command
SETB RW ;It's a read command
MOV DATA1,#0FFh ;Set all pins to FF initially
SETB EN ;Clock out command to LCD
MOV A,DATA1 ;Read the return value
JB ACC.7,WAIT_LCD ;If bit 7 high, LCD still busy
CLR EN ;Finish the command
CLR RW ;Turn off RW for future commands
RET



INIT_LCD:

SETB EN
CLR RS
MOV DATA1,#38h
CLR EN
lcall wait_lcd


SETB EN
CLR RS
MOV DATA1,#0eh
CLR EN
LCALL wait_lcd

SETB EN
CLR RS
MOV DATA1,#06h
CLR EN
LCALL wait_lcd
RET

CLEAR_LCD:

SETB EN
CLR RS
MOV DATA1,#01h
CLR EN
LCALL wait_lcd
RET

WRITE_TEXT:

SETB EN
SETB RS
MOV DATA1,A
CLR EN
LCALL wait_lcd
RET

START:

LCALL INIT_LCD
LCALL CLEAR_LCD


MOV A,#'h'
LCALL WRITE_TEXT
MOV A,#'e'
LCALL WRITE_TEXT
MOV A,#'l'
LCALL WRITE_TEXT
MOV A,#'l'
LCALL WRITE_TEXT
MOV A,#'o'

SETB EN
CLR RS
MOV DATA1,#0c0h
CLR EN
LCALL wait_lcd

MOV A,#'W'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'R'
LCALL WRITE_TEXT
MOV A,#'l'
LCALL WRITE_TEXT
MOV A,#'d'
LCALL WRITE_TEXT

LJMP $
END
the program is from the tutorial.
please i need some help
thank you
jayanth

List of 78 messages in thread
TopicAuthorDate
LCD Problem            01/01/70 00:00      
   stop shouting - also            01/01/70 00:00      
      Sorry Erik            01/01/70 00:00      
         no need to be 'sorry'            01/01/70 00:00      
            timing            01/01/70 00:00      
               delays aren't necessary if you monitor busy            01/01/70 00:00      
   Pullup resistors on P0            01/01/70 00:00      
      already answered            01/01/70 00:00      
   make sure            01/01/70 00:00      
      Is there any test procedure to test LCD Module?            01/01/70 00:00      
         from the shop            01/01/70 00:00      
   did you try...            01/01/70 00:00      
      tthat is SOME wait            01/01/70 00:00      
         ...            01/01/70 00:00      
            well, maybe is is a good thing            01/01/70 00:00      
               i need a lcd testing procedure            01/01/70 00:00      
                  like this            01/01/70 00:00      
                     lcd testing            01/01/70 00:00      
                        Couple of links            01/01/70 00:00      
                           no datasheet            01/01/70 00:00      
                              Should work the same...            01/01/70 00:00      
                                 +1 for this answer            01/01/70 00:00      
                                    LJMP limits            01/01/70 00:00      
      delays aren't necessary if you monitor busy            01/01/70 00:00      
      May be LCD is damaged!!            01/01/70 00:00      
         Pin 3 may require a negative voltage            01/01/70 00:00      
            PLEASE!!!!            01/01/70 00:00      
               There is a "convention"            01/01/70 00:00      
            to clarify?            01/01/70 00:00      
         two problems with the 'advice' you followed            01/01/70 00:00      
            Only lower line of LCD is showing!            01/01/70 00:00      
               looks like pretty normal behavior to me ...            01/01/70 00:00      
                  'cheap' -5 for a LCD            01/01/70 00:00      
   where is that standard?            01/01/70 00:00      
      It's not an EIA or a DIN standard ...            01/01/70 00:00      
         you said exactly that            01/01/70 00:00      
            We've all told him to read his LCD datasheet            01/01/70 00:00      
               this is getting ridiculous.            01/01/70 00:00      
                  ok, I deserve -1 from before            01/01/70 00:00      
                     why not spell it correctly            01/01/70 00:00      
                  That's why there are datasheets            01/01/70 00:00      
   LCD is workingggg!!!!!!            01/01/70 00:00      
      Now get to work            01/01/70 00:00      
         MISTAKES made            01/01/70 00:00      
   Datasheet, which created a problem.            01/01/70 00:00      
   Can LCD datasheet be uploaded for others referen.?            01/01/70 00:00      
      You have to get the correct datasheet            01/01/70 00:00      
         need lcd testing procedure            01/01/70 00:00      
            You need more data!            01/01/70 00:00      
               addendum to Richards post            01/01/70 00:00      
                  There is a de-facto standard            01/01/70 00:00      
                     lcd problem            01/01/70 00:00      
                        Disconnect d1            01/01/70 00:00      
                        problem with second line of lcd            01/01/70 00:00      
                           program            01/01/70 00:00      
                              your code has a problem?            01/01/70 00:00      
                                 looks like experimenting again ...            01/01/70 00:00      
                                 from hitachi data sheet on HD44780            01/01/70 00:00      
                                    I'm starting to hate these datasheets            01/01/70 00:00      
                                       BULL            01/01/70 00:00      
                                          get it RIGHT before you deviate from spec's            01/01/70 00:00      
                                       OK... I give up...            01/01/70 00:00      
                                    8 bit Initialization            01/01/70 00:00      
                                       lcd problem            01/01/70 00:00      
                                          program i used            01/01/70 00:00      
                                             driving voltage            01/01/70 00:00      
                                                its not the contrast problem            01/01/70 00:00      
                                                   why?            01/01/70 00:00      
                                                   Contrast and Initialization            01/01/70 00:00      
                                             you are, I hope, aware            01/01/70 00:00      
                                       That's the one...thanks            01/01/70 00:00      
   about P0            01/01/70 00:00      
      It shows that you "experiment" instead of reading            01/01/70 00:00      
      gibberish            01/01/70 00:00      
   small correction            01/01/70 00:00      
      thanks a lot            01/01/70 00:00      
         Thanks for informing us.            01/01/70 00:00      
            so, next time            01/01/70 00:00      

Back to Subject List