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

    Thanks Andy for the code,

    I am not a good programmer and I would like to convert the PBP program that is normally used now to EASY control the I2C display.
    At the moment I am using this piece of code:

    INS CON 254 ' $FE: INSTRUCTION COMMAND MODE
    CLR CON 1 ' CLEAR LCD , GOTO FIRST LINE, FIRST CHARACTER
    DG CON 223 ' DEG SYMBOL °
    LINE1 CON 128 ' $80: GOTO LINE 1
    LINE2 CON 192 ' $C0: GOTO LINE 2
    LINE3 CON 148 ' $94: GOTO LINE 3
    LINE4 CON 212 ' $D4: GOTO LINE 4

    And then I do the the following to write my own data on it:

    LCDOUT INS, LINE2, " V=", DEC2 VLT/10, ".", DEC1 VLT

    How could I translate the above in I2C enviroment for displaying ?

    Thanks for the assistance
    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

    This does not look straight forward to use. How for have you got? Have you found its address for example?

  3. #3
    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,
    the address is 0x20.
    Thanks
    Ambrogio

  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

    Do you need any more help?

  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

    Quote Originally Posted by iw2fvo View Post
    INS CON 254 ' $FE: INSTRUCTION COMMAND MODE
    CLR CON 1 ' CLEAR LCD , GOTO FIRST LINE, FIRST CHARACTER
    DG CON 223 ' DEG SYMBOL °
    LINE1 CON 128 ' $80: GOTO LINE 1
    LINE2 CON 192 ' $C0: GOTO LINE 2
    LINE3 CON 148 ' $94: GOTO LINE 3
    LINE4 CON 212 ' $D4: GOTO LINE 4
    Assuming $80 is line 1/0 then we can add

    PAUSE 2 ; Let command finish
    LCD_Data = $80
    gosub LCD_Write_

    to position the cursor. As this is a command it goes before we switch to data mode like this

    PAUSE 2 ; Let command finish
    LCD_Data = $80
    gosub LCD_Write_
    PAUSE 2 ; Let command finish
    LCD_RS = 1 ' this is data
    goto main

  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

    Dear Steve,

    I am not able to findout the detailed spec for the QC2004A display. I can tell it is working well using the standard PBP connection diagram.
    I am posting a general spec for LCD addressing ( attached ).

    I did a very bad experience with the PCF expander board that was attached to the LCD: the trim pot that should adjust the contrast of the display has the cursor connected to ground and one side connected to 5VDC. I did turn it just to be sure of the contrast setting and I got a short circuit of the 5Vdc to ground when turned fully clockwise. The result is that my ICD2 programmer smoked and it is no longer working. I have attached the photo of the PCF expander to warn about this item: there is a very very gross design error on it.
    I am looking to find a new pic programmer to buy: what do you recommand to me ? Is the pickit3 really good ?
    I have a pic16f877 to replace on the ICD2 programmer but I do not have any possibiliity to program it with the required bootloader... I will ask someone tomorrow !
    I really hope to test your programs soon. I will let you know.
    I want to thank you once again for the help you are giving to me .
    Regards,
    Ambrogio
    Attached Images Attached Images    
    Attached Images Attached Images

  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

    Ambrogio

    I am looking to find a new pic programmer to buy: what do you recommend to me ? Is the pickit3 really good ?
    I have no experience of programmers as I inherited all of my hardware from my son, he took an electronics course before going to university. I have a Picstart Plus that I have never used.

    I really hope to test your programs soon. I will let you know.
    Please do as you have sparked my interest now and all sorts of bright ideas are formulating in my mind to the point that I am loosing sleep.

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

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

    I have a pickit3 and a pickit2 programmer the pk3 only ever gets used if its the only choice (and it very seldom is) . the gui for the pk2 is just so much better to use . serial debugging is just so easy with the pk2 and its built in comms package . by far the pk2 is my tool of choice for icsp.
    I have never bothered to use either of them in command line mode for programming directly from micro code studio although it is fairly easy to do .
    I must admit that I have not looked to see if microchip have made a better/upgraded gui for the pk3 for at least a year now , my info may be out of date .
    I also wonder if any body has tried the cheap pk2 clones that are on ebay , are they compatible with the microchip pk2 gui ? are they any good?
    Last edited by richard; - 30th June 2014 at 08:45. Reason: can't tpye ca'nt spell

  9. #9
    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

    Is there a lista of PICs programmable by PICKIT2 ?
    Thanks
    Ambrogio

  10. #10
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

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

    Quote Originally Posted by iw2fvo View Post
    Is there a lista of PICs programmable by PICKIT2 ?
    not that I can find ,but there is not many that aren't on the supported device list.
    you can download the pickit2 program(its free) from microchip site and check out the supported device list if you have specific devices to check
    http://www.microchip.com/Development...tDocumentation

  11. #11
    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 iw2fvo View Post
    I am not a good programmer and I would like to convert the PBP program that is normally used now to EASY control the I2C display.
    At the moment I am using this piece of code:

    INS CON 254 ' $FE: INSTRUCTION COMMAND MODE
    CLR CON 1 ' CLEAR LCD , GOTO FIRST LINE, FIRST CHARACTER
    DG CON 223 ' DEG SYMBOL °
    LINE1 CON 128 ' $80: GOTO LINE 1
    LINE2 CON 192 ' $C0: GOTO LINE 2
    LINE3 CON 148 ' $94: GOTO LINE 3
    LINE4 CON 212 ' $D4: GOTO LINE 4

    And then I do the the following to write my own data on it:

    LCDOUT INS, LINE2, " V=", DEC2 VLT/10, ".", DEC1 VLT

    How could I translate the above in I2C enviroment for displaying ?

    Thanks for the assistance
    Regards,
    Ambrogio
    IW2FVO
    How to do this as neatly as possible are the next steps.

  12. #12
    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,
    it is a very good new !
    I am looking to place an order for a couple of new extender boards. The point is the lead time .
    I will let you know.
    I appreciate your assistance.
    Regards,
    Ambrogio

  13. #13
    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 iw2fvo View Post
    Steve,
    it is a very good new !
    I am looking to place an order for a couple of new extender boards. The point is the lead time .
    I will let you know.
    I appreciate your assistance.
    Regards,
    Ambrogio
    No next day delivery in Italy?

    I ordered my LCD and backpack for £9.30 including next day delivery, details in #66.

    The test program is not very useful as it only tests the LCD is working. I will add commands so that the screen can be cleared and the cursor can be positioned anywhere on the screen.

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