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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/07 07:07
Read: times


 
#132335 - You didn't take the challenge
Responding to: ???'s previous message
Mike, check this:

;
; lcd data ->port bit. Any order or port as you like as long it 
; is available and usable
;
LCD_D4 equ P0.2
LCD_D5 equ P0.1
LCD_D6 equ P0.3
LCD_D7 equ P0.0
LCD_RS equ P3.2
LCD_DEN equ P3.3
;----------------------------------------------------------------------------
;
;
;  send a command to the lcd display. command in A
;  Zaps: A,B
;
;----------------------------------------------------------------------------
lcd_comm_wr
        clr     LCD_RS
        mov     b,a             ;save the command
        swap    a               ;get hi nibble into low nibble
        anl     a,#0fh          
        mov     c,a.0           ;Mike ->the translation done here
        mov     LCD_D4,c
        mov     c,a.1
        mov     LCD_D5,c
        mov     c,a.2
        mov     LCD_D6,c
        mov     c,a.3
        mov     LCD_D7,c
        nop
        nop
        setb    LCD_DEN
        nop
        nop
        clr     LCD_DEN
        mov     a,b
        anl     a,#0fh
        mov     c,a.0
        mov     LCD_D4,c
        mov     c,a.1
        mov     LCD_D5,c
        mov     c,a.2
        mov     LCD_D6,c
        mov     c,a.3
        mov     LCD_D7,c
        nop
        nop
        setb    LCD_DEN
        nop
        nop
        clr     LCD_DEN
;
;  delay for lcd controller
;
        mov     b,#25      ;at least 40uS
ldrw_1
        djnz    b,ldrw_1    ;waste some time
        ret


However, I do note that I was lazy when writing this code, the first part of the initialisation needs fixing, equates for the port pins and maybe a macro or subroutine to output the data. You can also mix ports.

If I was making a plainly false statement, I'm sure the others would've picked me up real quick. So open that flexible mind of yours and take the challenge. I know it works.


List of 70 messages in thread
TopicAuthorDate
LCD Help needed            01/01/70 00:00      
   as replied in parallel thread            01/01/70 00:00      
   try this...            01/01/70 00:00      
      Not this bit            01/01/70 00:00      
         I do both software and hardware.            01/01/70 00:00      
            diffference            01/01/70 00:00      
   What assembler??            01/01/70 00:00      
   No Initializatoin            01/01/70 00:00      
      Wait There it is.            01/01/70 00:00      
   Ah lcd problems!            01/01/70 00:00      
   Hardware problem?            01/01/70 00:00      
      Well i think its the Hardware + Software problem            01/01/70 00:00      
         Half of display            01/01/70 00:00      
            8 bit initialization            01/01/70 00:00      
               This is New Program            01/01/70 00:00      
                  nothing new            01/01/70 00:00      
                     Well sir Erik there is my code commented            01/01/70 00:00      
                        sparsely and nit using <pre> and </pre>            01/01/70 00:00      
                           It's not that difficult            01/01/70 00:00      
                              Well its not being good            01/01/70 00:00      
                                 OK, down to brass tacks and babysteps            01/01/70 00:00      
            Right Sid of LCD is Fading            01/01/70 00:00      
         normal?            01/01/70 00:00      
      LCD's vary, and contrast voltage is NEGATIVE!            01/01/70 00:00      
         sometimes            01/01/70 00:00      
            I heard that once ...            01/01/70 00:00      
         HUH?            01/01/70 00:00      
            guilty as charged            01/01/70 00:00      
               two            01/01/70 00:00      
                  I reuse mine            01/01/70 00:00      
   try this one            01/01/70 00:00      
      why try something that can not be unbderstood            01/01/70 00:00      
   Solve            01/01/70 00:00      
      Nothing is happining with New LCD also            01/01/70 00:00      
         Sorry guys...            01/01/70 00:00      
         Try            01/01/70 00:00      
            Well sir I am using HD44780            01/01/70 00:00      
               sloooow down coders            01/01/70 00:00      
   TESTED code for LCD            01/01/70 00:00      
      It may be tested..            01/01/70 00:00      
         blame            01/01/70 00:00      
            Circuit configuration for LCD interfacing            01/01/70 00:00      
               P1.x control?            01/01/70 00:00      
                  No problem with pin configuration            01/01/70 00:00      
                     Well i have changed Pin configuration back            01/01/70 00:00      
                        Pullups on P1.0,1            01/01/70 00:00      
                           about P1.0 and P1.1            01/01/70 00:00      
                        Does your micro work at all?            01/01/70 00:00      
                           to be specific...            01/01/70 00:00      
                        my issue            01/01/70 00:00      
      debugging            01/01/70 00:00      
   Finally i have did it.....            01/01/70 00:00      
      go high            01/01/70 00:00      
   Code for 8-Bit LCD (HD44780)            01/01/70 00:00      
      perfect            01/01/70 00:00      
         Perfect for some...            01/01/70 00:00      
            it is important with the at89c2051            01/01/70 00:00      
               i am noob, so dont worry about pins :-)            01/01/70 00:00      
                  no encryption required            01/01/70 00:00      
               Real world            01/01/70 00:00      
                  answer            01/01/70 00:00      
                     Is this true?            01/01/70 00:00      
                        To some people it seems            01/01/70 00:00      
                           kindof            01/01/70 00:00      
                              You can get by with this some of the time            01/01/70 00:00      
                              Point missed            01/01/70 00:00      
                                 check this            01/01/70 00:00      
                                    You didn't take the challenge            01/01/70 00:00      
   why should you            01/01/70 00:00      
   Help on LCD code            01/01/70 00:00      

Back to Subject List