I2C LCD


Closed Thread
Results 1 to 40 of 47

Thread: I2C LCD

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    On my lcd, I adjust contrast with the potentiometer on pin V0.

    Robert

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


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    Without the LCD data sheet I don't think I can help ay more. Looking at the controller data sheet does not tell the whole story. There are different interfaces and component combinations for different VDD voltages and LCD manufactures. Where did you buy this LCD?

    Dave

  3. #3
    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
    Without the LCD data sheet I don't think I can help ay more. Looking at the controller data sheet does not tell the whole story. There are different interfaces and component combinations for different VDD voltages and LCD manufactures. Where did you buy this LCD?

    Dave
    You are right Dave !

    All LCD's was a gift for me from a friend. He gave me a printed paper with sumary of LCD(7pins):
    - Display Type : TM202SIFSUGWA
    - LCD OPERATING VOLTAGE : 4.8V
    - VDD : 5V
    - DRIVE METHOD : 1/16 DUTY ; 1/5 BIAS
    - CONTROLLER : ST7036i
    - pinouts, tolerance, etc

    Really on boards I found 3 LCDs with different serials, but the boards are same, with the same functions. Actually I work on TM202SGFSGWA-B-1A . On internet I dont find a datasheet for them. I suppose that all LCDs with ST7036 controllers have the same init. The serials depending from manufacturers.

    The LCD's are mounted on a working factory boards. I desolder the LCD from motherboard for test...also I make a test on a LCD directly on board ( of course that I cuted the tracks from sda, scl and reset pins for separate of rest components board) because I want to be sure that LCD was not destroied from desoldering. Any code I wrote in pic, I tested with potentiometer divider , with V0 short with Vdd.

    I see in datasheet that contrast can be configured from registry(case V0 short with Vdd) or from external resistors divider.

    Also I have LCDs with 8 pins but I have not any information about them....I have a information only from a serial printed on back LCD side(TM202TCCWUGWA)...here I suppose that have a 7032 controller, but is no important at this time.

    Again thx for your help !

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    I think the LCDs that googled up for TM202 were Tienma. None of them were TM202T or S. It looks like these are custom made, specs could be anything.

    I suggest contacting Tienma and asking for a datasheet.

    Robert

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


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    As an outside chance change your pullup resistors to 4.7K, I have never used 1k. The contrast is set in the initialization of the display. I do not think you can change it on the fly.
    And lastly give this a try
    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : Dave Cutliff                                      *
    '*  Notice  : Copyright (c) 2014 Use at your own risk           *
    '*          : All Rights Reserved                               *
    '*  Date    : 12/29/2014                                        *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
     #CONFIG
            __CONFIG _CONFIG1, _FCMEN_OFF & _FOSC_INTOSC & _WDTE_OFF & _MCLRE_OFF & _CP_ON & _IESO_OFF & _BOREN_OFF & _PWRTE_OFF
            __CONFIG _CONFIG2, _PLLEN_OFF & _STVREN_OFF & _LVP_OFF
    #ENDCONFIG
    OSCCON = %01101010   'sets the internal oscillator to 4Mhz
          
    TRISA  = %00000000  
    TRISC  = %00000000  
    ANSELA = %00000000  
    ANSELC = %00000000  
    
    OPTION_REG.7 = 0
    SCL   VAR PORTC.0
    SDA   var PORTC.1
    Reset    var PORTC.2     'could tie reset pin to   vdd through 10K resistor
    
    
    pause 100
    HIGH Reset
    'OPF1 = 0 
    goto StartProgram
    '********************************************************************************
    '=============Initializing LCD==========
    ST7036Init:
    
    
     
    
    
    I2CWRITE PORTC.1, PORTC.0,$78,[$00,$38, $39,$14,$79,$50,$6C,$0C,$01,$06] ' 
    
    
    
    Return
    '********************************************************************************
    
    
    
    startProgram:
    gosub  ST7036Init
    I2CWRITE PORTC.1, PORTC.0,$78,[$40,$48,$65,$6c,$6c,$6f] ' Hello
    
    IdleLoop:
          ' could blink an led here
    goto Idleloop
    Last edited by DaveC3; - 30th December 2014 at 23:52.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    Quote Originally Posted by DaveC3 View Post
    As an outside chance change your pullup resistors to 4.7K, I have never used 1k. ...
    Yup, from the manual:
    The I2C clock and data lines should be pulled up to Vcc with a 4.7K
    Could this be an issue?
    Transfer on the I2C bus can be paused by the receiving device by its holding the clock line low (not supported on 12-bit core PIC MCUs). To enable this the following DEFINE should be added to the program:

    DEFINE I2C_HOLD 1
    Robert


    EDIT: I would try one last thing with Dave's code, add PAUSE 250 before every write to the LCD, just to eliminate that possibility.
    Last edited by Demon; - 31st December 2014 at 01:45.

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 : 1

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