I2C LCD - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 47 of 47

Thread: I2C LCD

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    midali,

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

    in your example above just replace the "hello" with X (no quotes this time)
    you might need to choose how you want X to display... in the manual you should find where you can use modifiers like DEC for a decimal value or HEX for the hex value, etc.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    I2CWRITE SDA, SCL,com,$40,"hello"
    looks like incorrect syntax , should be like this
    Code:
    I2CWRITE SDA, SCL,com,[$40,"hello"]
    to display x (assume pbp3)

    Code:
    buff var byte[16]
    
    ARRAYWRITE buff,[dec3 x]
    I2CWRITE SDA, SCL,com,[$40,str buff"]
    [/CODE]

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    Now that I think about it you probably will need to include a "Modifer" before your variable.

    Otherwise your LCD display may think the number is some sort of control character or it may be a non displayable character.


    from the PBP manual...


    An assortment of string-formatting modifiers is available for use within the item list
    of this command. These modifiers can be used to format string output that includes
    numeric values converted from variables:
    Output Modifiers for Formatting Strings
    Modifier Operation
    {I}{S}DEC{1..10} Send decimal digits
    {I}{S}BIN{1..32} Send binary digits
    {I}{S}HEX{1..8} Send hexadecimal digits
    REP char\count Send character c repeated n
    times
    STR ArrayVar{\count} Send string of n characters
    See section 2.11 for details on string-formatting modifiers.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  4. #4
    Join Date
    Jan 2014
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: I2C LCD

    Nothing on LCD: I2CWRITE SDA, SCL,com,$40, x
    In ST7036 manual I not found how I can display a decimal number.

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