Feel free to move it.it should be moved to another section.
Feel free to move it.it should be moved to another section.
Code:'ARDUINO IIC LCD GY-LCD-V1 'PIC 12F629 'PRINTS " HELLO RCG!_" Define OSC 20 DEFINE I2C_SLOW 1 CMCON = $7 OPTION_REG.7 = 0 C VAR GPIO.1 D VAR GPIO.0 ADDR VAR BYTE ADDR = $40 CMD VAR BYTE LCD_CMD VAR BYTE E VAR LCD_CMD.BIT4 RS VAR LCD_CMD.BIT6 E=0:RS=0 LCD_CMD = 0 PAUSE 1000 LCD_CMD = $2 GOSUB LCDWRITE GOSUB LCDWRITE LCD_CMD = $8 GOSUB LCDWRITE LCD_CMD = $0 GOSUB LCDWRITE LCD_CMD = $E GOSUB LCDWRITE LCD_CMD = $0 GOSUB LCDWRITE LCD_CMD = $6 GOSUB LCDWRITE RS=1 LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $48 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $45 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $4C GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $4C GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $4F GOSUB LCDWRITE LCD_CMD = $42 GOSUB LCDWRITE LCD_CMD = $40 GOSUB LCDWRITE LCD_CMD = $45 GOSUB LCDWRITE LCD_CMD = $42 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $43 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $47 GOSUB LCDWRITE LCD_CMD = $42 GOSUB LCDWRITE LCD_CMD = $41 GOSUB LCDWRITE RETURN LCDWRITE: I2CWRITE D,C,ADDR,[LCD_CMD] E=1 I2CWRITE D,C,ADDR,[LCD_CMD] E=0 I2CWRITE D,C,ADDR,[LCD_CMD] RETURN END
Has anyone done this?
I have downloaded the Aduino LCD libraries and there are differences between them and the above code.
Last edited by EarlyBird2; - 3rd June 2014 at 08:09.
Steve Earl www.datageo.co.uk
Just curious where RETURN right before LCDWRITE subroutine returns to?
Don't have one to test.
Robert
From what I have read the code is correct in that it will print to the LCD on a one shot basis then return to nowhere.
Return to nowhere?
Does anyone have one to test?
Having used serial LCDs which were easy to use by sending ascii commands and data using serout2 these look very difficult. I just wonder why make something difficult when there is an easier way.
I have done more research and I believe that all Arduino I2C LCDs are not the same. I guess it depends on the manufacturers implementation and the chips used on the backpack.
Steve Earl www.datageo.co.uk
So I'm not missing a label then, the code just isn't terminated "properly".
I kept going through it thinking I was missing something obvious.
Robert
Not that I can see but then I always wonder if I am missing something whether it is obvious or not.
I have been trying to work out what the $44 do because they are not printed on the screen.Code:LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $48 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $45 GOSUB LCDWRITE LCD_CMD = $44 GOSUB LCDWRITE LCD_CMD = $4C GOSUB LCDWRITE
Steve Earl www.datageo.co.uk
Bookmarks