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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/14/04 09:43
Read: times


 
#62521 - LCD Part 2: 4-bit Mode (Tutorial Error)
Dear All,

In Tutorial: Introduction to LCD Programming 2: Driving 4-bit Mode
<pre>http://www.8052.com/tutlcd2.phtml
  • There are errors in the mentioned data like that:-

    WRITE_2_NIBBLES:

    PUSH ACC ;Save A for low nibble
    ORL DATA,#0F0h ;Bits 4..7 <- 1
    ORL A,#0F0h ;Don't affect bits 0-3
    ANL DATA,A ;High nibble to display
    SETB EN
    CLR EN
    POP ACC ;Prepare to send
    SWAP A ;...second nibble
    ORL DATA,#0F0h ; Bits 4...7 <- 1
    ORL A,#0F0h ; Don't affect bits 0...3
    ANL DATA,A ;Low nibble to display
    SETB EN
    CLR EN
    RET

  • Should be like that:-

    WRITE_2_NIBBLES:

    PUSH ACC ;Save A for low nibble
    ORL DATA,#0F0h ;Bits 4..7 <- 1
    ORL A,#0Fh ;Don't affect bits 4...7
    ANL DATA,A ;High nibble to display
    SETB EN
    CLR EN
    POP ACC ;Prepare to send
    SWAP A ;...second nibble
    ORL DATA,#0F0h ; Bits 4...7 <- 1
    ORL A,#0Fh ; Don't affect bits 4...7
    ANL DATA,A ;Low nibble to display
    SETB EN
    CLR EN
    RET





  • List of 21 messages in thread
    TopicAuthorDate
    LCD Part 2: 4-bit Mode (Tutorial Error)            01/01/70 00:00      
       RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
          RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
             RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                   RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                      RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                         RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                            RE: MOV NI**LE, #BB            01/01/70 00:00      
          RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
             RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
                   RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
       RE: LCD Part 2: 4-bit Mode (Tutorial Error)            01/01/70 00:00      
          RE: LCD Part 2: 4-bit Mode (Tutorial Error)            01/01/70 00:00      
             RE: LCD Part 2: 4-bit Mode (Tutorial Error)            01/01/70 00:00      
          RE: LCD Part 2: 4-bit Mode (Tutorial Err            01/01/70 00:00      
             RE: LCD Part 2: 4-bit Mode            01/01/70 00:00      
                RE: LCD Part 2: 4-bit Mode            01/01/70 00:00      
                   RE: LCD Part 2: 4-bit Mode            01/01/70 00:00      

    Back to Subject List