I2C lcd ( arduino ) with PICBASIC, help


Closed Thread
Results 1 to 40 of 93

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    Steve,
    Thanks.
    I have no more pins available on the pic and I have this LCD on my hands.
    Anyway, what LCD ( 20x4) with serial interface could you suggest to me ? I could try to get one.
    Regards,
    Ambrogio
    IW2FVO

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    See post 6 above

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help


  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    The good news is that it can be done here is some code.

    Code:
    'ARDUINO IIC LCD GY-LCD-V1
    'PIC 12F629
    'PRINTS " HELLO RCG!_"
    Define OSC 20               
    DEFINE I2C_SLOW 1           
    CMCON = $7           
    OPTION_REG.7 = 0
    C VAR GPIO.1         
    D VAR GPIO.0
    ADDR VAR BYTE           
    ADDR = $40
    CMD VAR BYTE
    LCD_CMD VAR BYTE            
    E VAR LCD_CMD.BIT4    
    RS VAR LCD_CMD.BIT6
    E=0:RS=0
    LCD_CMD = 0
    PAUSE 1000                  
    LCD_CMD = $2 
    GOSUB LCDWRITE     
    GOSUB LCDWRITE       
    LCD_CMD = $8  
    GOSUB LCDWRITE       
    LCD_CMD = $0  
    GOSUB LCDWRITE
    LCD_CMD = $E
    GOSUB LCDWRITE       
    LCD_CMD = $0  
    GOSUB LCDWRITE
    LCD_CMD = $6
    GOSUB LCDWRITE       
    RS=1  
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $48
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $45
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $4C
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $4C
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $4F
    GOSUB LCDWRITE
    LCD_CMD = $42   
    GOSUB LCDWRITE
    LCD_CMD = $40
    GOSUB LCDWRITE
    LCD_CMD = $45   
    GOSUB LCDWRITE
    LCD_CMD = $42
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $43
    GOSUB LCDWRITE
    LCD_CMD = $44   
    GOSUB LCDWRITE
    LCD_CMD = $47
    GOSUB LCDWRITE
    LCD_CMD = $42   
    GOSUB LCDWRITE
    LCD_CMD = $41
    GOSUB LCDWRITE
    RETURN
    LCDWRITE:
    I2CWRITE D,C,ADDR,[LCD_CMD]
    E=1
    I2CWRITE D,C,ADDR,[LCD_CMD]
    E=0
    I2CWRITE D,C,ADDR,[LCD_CMD]
    RETURN
    END
    from this thread


    http://www.picbasic.co.uk/forum/showthread.php?t=17302


    If you need more help just ask,

  5. #5
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    Does this code work?

    If it does we can use it as a starting point and adapt it for your use.

  6. #6
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    Thanks Steve for the kind assistance,
    I can not test the code soon : the day before yesterday my display went off. I ordered another one and will be here in two weeks tiime.
    Anyway : the dispaly is exactly the same of the one shown in the images attached to the link you have sent to me.
    I really think that a smart code to control the i2c LCD will be appreciate by a lot of people that use PBP.
    Thanks a lot for helping.
    Regards,
    Ambrogio

  7. #7
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: I2C lcd ( arduino ) with PICBASIC, help

    Let me know when you have a replacement. I am confident that we can get this to work between us. You do the testing and I will help with the programing.

    I would do it all but I do not have the hardware anymore as I went over to touch screen PLCs. I am more interested in touch screen GLCD solutions based on a PIC (Amicus18 for example) which I need the hardware for.

Similar Threads

  1. Interfacing with Arduino I2C LCD
    By norohs in forum Documentation
    Replies: 47
    Last Post: - 30th May 2017, 18:53
  2. I2c ext eeprom picbasic
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th July 2011, 22:00
  3. How do I operate an Arduino I2C LCD
    By menta in forum General
    Replies: 8
    Last Post: - 13th July 2011, 02:28
  4. Still new to PicBasic - i2c questions
    By cometboy in forum mel PIC BASIC
    Replies: 4
    Last Post: - 13th November 2006, 18:27
  5. A little help with I2C and PICBASIC Pro
    By Qacer in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th January 2006, 16:13

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