good day,
I have to interface the I2C LCD (arduino like) using picbasic.
Any suggestion or code example please ?
Thanks in advance.
Ambrogio
IW2FVO
good day,
I have to interface the I2C LCD (arduino like) using picbasic.
Any suggestion or code example please ?
Thanks in advance.
Ambrogio
IW2FVO
Have a look at this :-
Forgive some of the comments.... Code did help me out :-)
http://www.picbasic.co.uk/forum/showthread.php?t=17302
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
This does not look straight forward to use. How for have you got? Have you found its address for example?
Steve Earl www.datageo.co.uk
Steve,
the address is 0x20.
Thanks
Ambrogio
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
Steve Earl www.datageo.co.uk
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
Ambrogio
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 am looking to find a new pic programmer to buy: what do you recommend to me ? Is the pickit3 really good ?
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.I really hope to test your programs soon. I will let you know.
Steve Earl www.datageo.co.uk
Steve Earl www.datageo.co.uk
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.
Steve Earl www.datageo.co.uk
there is a similar thread on the pbp3 forum it might be worth a look
http://support.melabs.com/threads/98...F8574-20x4-LCD
Last edited by richard; - 18th May 2014 at 07:27. Reason: linked it
this looks very interesting if you are open to alternatives.
http://www.robot-italy.com/en/lcd05-...ackground.html
I have used similar in the past and found them very easy, this one includes keypad inputs.
Steve Earl www.datageo.co.uk
Richard's link looks to be the solution you are looking for.
Last edited by EarlyBird2; - 18th May 2014 at 07:54.
Steve Earl www.datageo.co.uk
Thanks Steve,
I am running the PBP 2.50B version: is the Darrel include applicable to my pbp version ?
If not, what could I do ? Any possible modification to the program ?
Regards,
ambrogio
IW2FVO
are you sure the new board has 8574t on it not a 8574A ?
that might make a world of difference
It is definitely a 8574T as shown in #36 and copied below.=richard;127791]are you sure the new board has 8574t on it not a 8574A ?
that might make a world of difference
[
Steve Earl www.datageo.co.uk
Steve,
I did run the program:
P0, P5 and P6 do not toggle: they are always at 0vdc as seen by the scope.
I did check the tracks : there is good continuity between each pin of the PCF and the display pins.
I assume the pcf is gone or the module has been sent with a broken pcf.
As you have seen in the photos, I have changed the contrast pot because it was shorting the 5 vdc to ground , I fit a new one with a "crossed" pins.
Will order a new board from a reliable seller ... I am searching for it here.
Thanks for all.
Ambrogio
this looks cheap
http://www.dx.com/p/raspberry-pi-pcf...Q#.U8OsSWflp_Q
is that the current device or the one that got zapped ?
I found a 8574a in my junk box and fed your code into it (no lcd) and it seems ok (address is $78 for a version)
the attached pcf8574a.txt file is really a salea logic data/setting file and should be renamed to pcf8574a.logicdata , if you don't have a salea logic analyser you can download the software from salea logic and view the complete data
Thanks Richard,
I confirm that the address is OK since I can get some pins toggling correctly.
the PCF has definitively some "broken" port pins.
I still have the suspect that this is a fake board: It has the contrast pot error ... and now it has this issue !
Thanks a lot
Ambrogio
iw2fvo
Bookmarks