I2C LCD


Closed Thread
Results 1 to 40 of 47

Thread: I2C LCD

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Gerogetown, Texas
    Posts
    94


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    If you saw something on the display we are getting close. When you get a chance post the code where you saw "ell o Hello "

    Here is an initialization for a 5v display data sheet simular to yours.

    Code:
    INITIALIZE: (5V)
    MOV I2C_CONTROL,#00H ;WRITE COMMAND
    MOV I2C_DATA,#38H ;Function Set
    LCALL WRITE_CODE
    MOV I2C_CONTROL,#00H ;WRITE COMMAND
    MOV I2C_DATA,#39H ;Function Set
    LCALL WRITE_CODE
    MOV I2C_DATA,#14H ;Internal OSC frequency
    LCALL WRITE_CODE
    MOV I2C_DATA,#79H ;Contrast set
    LCALL WRITE_CODE
    MOV I2C_DATA,#50H ;Power/ICON control/Contrast set
    LCALL WRITE_CODE
    MOV I2C_DATA,#6CH ;Follower control
    LCALL WRITE_CODE
    MOV I2C_DATA,#0CH ;Display ON/OFF
    LCALL WRITE_CODE
    MOV I2C_DATA,#01H ;Clear Display
    LCALL WRITE_CODE
    Based on this information try to change your code to
    Code:
    ST7036Init:
    
    
     
    
    
    I2CWRITE PORTC.1, PORTC.0,$78,[$00,$38]
    PAUSE 10 
    I2CWRITE PORTC.1, PORTC.0,$78,[$00, $39,$14,$79,$50,$6C,$0C,$01,$06] ' 
    
    
    
    Return

  2. #2
    Join Date
    Jan 2014
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    Quote Originally Posted by DaveC3 View Post
    If you saw something on the display we are getting close. When you get a chance post the code where you saw "ell o Hello "

    Here is an initialization for a 5v display data sheet simular to yours.

    Code:
    INITIALIZE: (5V)
    MOV I2C_CONTROL,#00H ;WRITE COMMAND
    MOV I2C_DATA,#38H ;Function Set
    LCALL WRITE_CODE
    MOV I2C_CONTROL,#00H ;WRITE COMMAND
    MOV I2C_DATA,#39H ;Function Set
    LCALL WRITE_CODE
    MOV I2C_DATA,#14H ;Internal OSC frequency
    LCALL WRITE_CODE
    MOV I2C_DATA,#79H ;Contrast set
    LCALL WRITE_CODE
    MOV I2C_DATA,#50H ;Power/ICON control/Contrast set
    LCALL WRITE_CODE
    MOV I2C_DATA,#6CH ;Follower control
    LCALL WRITE_CODE
    MOV I2C_DATA,#0CH ;Display ON/OFF
    LCALL WRITE_CODE
    MOV I2C_DATA,#01H ;Clear Display
    LCALL WRITE_CODE
    Based on this information try to change your code to
    Code:
    ST7036Init:
    
    
     
    
    
    I2CWRITE PORTC.1, PORTC.0,$78,[$00,$38]
    PAUSE 10 
    I2CWRITE PORTC.1, PORTC.0,$78,[$00, $39,$14,$79,$50,$6C,$0C,$01,$06] ' 
    
    
    
    Return
    I tried ...
    if I write the PIC and turn ON the board with Vcc = 3,6V I see on LCD this:
    Name:  3v6.JPG
Views: 6128
Size:  46.3 KB
    ...then I move the Vcc to 5V, on LCD appear :
    Name:  5v.JPG
Views: 6188
Size:  50.3 KB
    In this case I can set a contrast from 5k potentiometer on V0 LCD pin, but I see only full dots.

    If I write the PIC and turn ON the board with Vcc = 5v, I see nothing on LCD. No effect if I down the voltage to 3,6V !

Similar Threads

  1. I2C lcd ( arduino ) with PICBASIC, help
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 92
    Last Post: - 10th September 2014, 18:00
  2. I2C variable to LCD
    By pointjohn in forum Serial
    Replies: 7
    Last Post: - 19th October 2011, 08:53
  3. I2C to LCD display
    By Ron Marcus in forum Serial
    Replies: 3
    Last Post: - 29th December 2007, 14:53
  4. Need cheap i2c LCD for 16F877a
    By CodeShredder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th December 2006, 01:25

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts