I2C LCD


Closed Thread
Results 1 to 40 of 47

Thread: I2C LCD

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    '************************************************* *******************************
    IdleLoop:
    I2CWRITE PORTC.1, PORTC.0,$78,[$00, $39,$14,$79]
    pause 250
    goto Idleloop
    end[/CODE]

    With this line is nothing on display. One time appeared undefinited characters, who move to right one by one.

    Identically, in this case I run initially Vcc at 3,6V and after few seconds I changed to 5v.

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


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    In the above loop you are writing commands over and over again. I would not expect anything to display. I have to assume the supply to this display needs to be 5v (according to the paper you received from your friend). The connections should look like this with 5vName:  lcd5v.png
Views: 5974
Size:  19.1 KB

    Also change the address to $7C again according to the data sheet i found.

    Code:
    I2C interface
    It just only could write Data or Instruction to ST7032 by the IIC Interface.
    It could not read Data or Instruction from ST7032 (except Acknowledge signal).
    SCL: serial clock input
    SDA: serial data input
    Slaver address could only set to 0111110, no other slaver address could be set
    I found this data sheet at http://www.farnell.com/datasheets/1669635.pdf

    The pinouts are the same as your display

    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,$7C,[$00,$38]
    PAUSE 10 
    I2CWRITE PORTC.1, PORTC.0,$7C,[$00, $39,$14,$79,$50,$6C,$0C,$01,$06] ' 
    
    
    
    Return
    '********************************************************************************
    
    
    
    startProgram:
    gosub  ST7036Init
    I2CWRITE PORTC.1, PORTC.0,$7C,[$40,$48,$65,$6c,$6c,$6f] ' Hello
    
    IdleLoop:
          ' could blink an led here
    goto Idleloop
    give the above a try, that a look at the data sheet.

    Good luck

    Dave

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