16F629A ?
might you mean 12f629 ?
if so you need to set the " lcd " pins to digital
16F629A ?
might you mean 12f629 ?
if so you need to set the " lcd " pins to digital
Warning I'm not a teacher
Sorry, I should have said 16F628A. I did set my pins as digital? I want to display data from my program but that seems far away at this point?? I cut the program down to the below lines and I get a custom character and a blinking cursor the backlight stays on. I guess that is progress ?
Thank You!
;----[16f628A Hardware Configuration]-------------------------------------------
#config
__config _INTOSC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_ON & _BODEN_OFF
#endconfig
SDA var porta.7
SCL var porta.6
;----[Initialize Hardware]------------------------------------------------------
CMCON = 7 'CHANGES PORTA TO DIGITAL
;----[Setup LCD using PCF8574 Port Expander]------------------------------------
LCD_Addr CON $7E
INCLUDE "LCD_PCF8574.pbp" ; Include LCD module for PCF8574
ARRAYWRITE LCD_Buff,[$FE,$50,$04,$0A,$15,$0E,$04,$0A,$0A,$00]:LCD_WriteBuff ' #2
Main:
GOTO Main
there is more info here . note the slightly differing versions of the include
INCLUDE "LCD_PCF8574.pbp" ; Include LCD module for PCF8574
INCLUDE "LCD_PCF8574a.pbp" ; Include LCD module for PCF8574
http://support.melabs.com/threads/10...hlight=PCF8574
http://support.melabs.com/threads/10...hlight=PCF8574
ps
LCD_Addr CON $7E is way different to addr used in above threads
Warning I'm not a teacher
Richard thank you for your help.
I have read most of the threads but will read them again. I will find and download both version of the include. On Arduino this is the Initialization for my display the 3F turns into 7E when you shift the bits one to the left.
"LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE)"
I have used serial lcd displays in the past with no issues. So far I am not a fan of this i2c version. I think someone is missing a market for easy to use i2c displays?
Thanks again!
Last edited by n0yox; - 27th February 2017 at 01:50.
"LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE)"
interpreted as [( 7bit_addr, EN, RW, RS, D4, D5, D6, D7, Backlight, POLARITY) ]
the PCF8574 datasheet indicates the 7bit addr range is 0x20--0x27
0x3f is not valid afaik.
default with a0:2 open = 7bit_addr of 0x27 , pbp addr would be $4e
Last edited by richard; - 27th February 2017 at 02:38.
Warning I'm not a teacher
I see on the data sheet for the PCF8574 you are right I used the Arduino i2c address finder to get the address. I have tried it using the 4E address and get nothing however with the 7E I do get some response from the display. I am still trying to understand the Initialization string and how to use it if you can offer guidance it would be appreciated. This is a little beyond my current ability but I will continue to try to learn and get this project going.
Thank You!
did it work with the Arduino sketch ?
if so what was the init command [I assume a0:2 are open]
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE) or LiquidCrystal_I2C lcd(0x27, 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE);
afaik there is at least two types there may be others.
if the addr is not between 0x20 and 0x27 then its a going to be different animal and the include files may need modification
would not hurt to trace out the cct and see what bits are wired to rs,e,rd/wr etc
Warning I'm not a teacher
Bookmarks