I2C lcd ( arduino ) with PICBASIC, help


Closed Thread
Results 1 to 40 of 93

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

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

    the ext modifier should help
    lcdb VAR BYTE[22]

    ASM
    lcd_cmd = _lcdb
    lcd_buff = _lcdb+2

    ENDASM
    these must be after the asm code

    lcd_cmd var byte EXT
    lcd_buff var byte EXT




    lcdb[0]=$fe
    lcdb[1]= your lcd command eg 1 $80 $c0

    use arraywrite to load lcd_buff (max 20 chrs)

    then you can pass
    lcd_cmd to your lcd write code if you need to send a cmd with your lcd string
    or pass lcd_buff if no cmd required

    ps don't forget to add a dely after a cmd to give the lcd time to act

    ps ps
    the asm names are case sensitive


    left a bit out

    lcd_cmd var byte EXT
    lcd_buff var byte EXT

    not sure if it needs to be try it and see

    lcd_cmd var byte[2] EXT
    lcd_buff var byte[20] EXT
    Last edited by richard; - 17th July 2014 at 08:53. Reason: typo's

  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

    Quote Originally Posted by richard View Post
    the ext modifier should help
    lcdb VAR BYTE[22]

    ASM
    lcd_cmd = _lcdb
    lcd_buff = _lcdb+2

    ENDASM

    lcdb[0]=$fe
    lcdb[1]= your lcd command eg 1 $80 $c0

    use arraywrite to load lcd_buff (max 20 chrs)

    then you can pass
    lcd_cmd to your lcd write code if you need to send a cmd with your lcd string
    or pass lcd_buff if no cmd required

    ps don't forget to add a dely after a cmd to give the lcd time to act

    ps ps
    the asm names are case sensitive


    left a bit out

    lcd_cmd var byte EXT
    lcd_buff var byte EXT

    not sure if it needs to be try it and see

    lcd_cmd var byte[2] EXT
    lcd_buff var byte[20] EXT
    Steve,
    the point is that I do not have PBP_3.
    My pbp is 2.50 B.
    No arraywrite or read, no usercommand ... are available to me .
    Thanks
    Ambrogio
    Ambrogio is using pbp2.5 and I am even older on 2.46.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

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

    without arraywrite that's a lot of code

  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

    Quote Originally Posted by richard View Post
    without arraywrite that's a lot of code
    and a lot more fun!

    I am only along for the ride and to keep my brain ticking over.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

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

    does 2.5 have the dig command

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

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

    The DIG modifier has been there forever....
    Dave Purola,
    N8NTA
    EN82fn

  7. #7
    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 to all of you for the assistance.
    What is the dig modifier please ?
    Thnaks
    Ambrogio

  8. #8
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

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

    From manual:
    DIG returns the value of a decimal digit. Input the digit number (0 – 9, with 0 being the rightmost digit). DIG returns the value of the decimal digit that you specified. DIG is commonly used to distill BCD digits from numeric values and to isolate single digits for display on seven-segment LCD.
    B0 = 123 ' Set B0 to 123
    B1 = B0 DIG 2 ' Sets B1 to 1 (digit 2 of 123)

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