I2C LCD


Results 1 to 40 of 47

Thread: I2C LCD

Threaded View

  1. #34
    Join Date
    Jan 2014
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    I'm back after exactly 1 year.
    I changed the 16LF1824 with 16F1503 and now LCD is working !
    Many thx to Dave and Robert !

    Now I need again a your help. How i can display a variable ? (for example, x from my code )

    Working code:

    Code:
    DEFINE I2C_HOLD 1 
    TRISA  = 000000  
    TRISC  = 000000  
    ANSELA = 000000  
    ANSELC = 000000  
    OPTION_REG.7 = 0
    
    SCL   VAR PORTC.0
    SDA   var PORTC.1
    Reset var PORTC.2    
    x     var byte   :x=12
    com   con $78
    
    pause 100
    HIGH Reset
    
    goto StartProgram
    '********************************************************************************
    '=============Initializing LCD==========
    ST7036Init:
    I2CWRITE SDA,SCL,com,[$00,$38]'function set
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$39]'function set
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$14]'internal OSC
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$6A]'follower control
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$0C]'display on/off
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$01]'clear display
    pause 1
    I2CWRITE SDA,SCL,com,[$00,$06]'entry mode set
    pause 1
    Return
    '********************************************************************************
    startProgram:
    gosub  ST7036Init
    I2CWRITE SDA, SCL,com,$40,"hello" 
     
    Main:
    'program
    goto Main
    Last edited by midali; - 28th December 2015 at 15: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 : 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