agentile
12-31-2005, 12:08 PM
Hello,
· I am trying to create a custom character in a parallel 1x16 LCD display.··I have used one of the articles in StampWorks to get as far as I have.· So far, I have successfully created the degree symbol, which I wanted, but I cannot figure out where it is in CGram.· So, the following code·successfully·creates the character.
CX DATA $07, $05, $07, $00, $00, $00, $00, $00·· ' (degree symbol)
char = $40········ ····················· '·point to CGRAM
GOSUB LCD_Command················ ' prepare to write CG data
FOR index1 = CX TO (CX + 7)······ ' create degree symbol
READ index1, char····················· ' get byte from EEPROM
GOSUB LCD_Write······················ ' put into LCD CG RAM
NEXT
So, now I want to display it on the LCD, and so I write the following code
READ CX+k,char····· ' Read·EEPROM??·or CGRAm?··k is offset value·
GOSUB LCD_Write··· ' write degree symbol
So, for reasons I cannot explain, this code works, even though it appears I am simply reading from EEPROM and not CGRam.· The value of k·was found by trial and error.· The degree symbol shows up for any value of k from·3 to 15.· Why does this work?·· And what I am reading?
More specifically, my question is,·once I have written a character to CGRam, how do I access it?
thanks,
Andrew
·
· I am trying to create a custom character in a parallel 1x16 LCD display.··I have used one of the articles in StampWorks to get as far as I have.· So far, I have successfully created the degree symbol, which I wanted, but I cannot figure out where it is in CGram.· So, the following code·successfully·creates the character.
CX DATA $07, $05, $07, $00, $00, $00, $00, $00·· ' (degree symbol)
char = $40········ ····················· '·point to CGRAM
GOSUB LCD_Command················ ' prepare to write CG data
FOR index1 = CX TO (CX + 7)······ ' create degree symbol
READ index1, char····················· ' get byte from EEPROM
GOSUB LCD_Write······················ ' put into LCD CG RAM
NEXT
So, now I want to display it on the LCD, and so I write the following code
READ CX+k,char····· ' Read·EEPROM??·or CGRAm?··k is offset value·
GOSUB LCD_Write··· ' write degree symbol
So, for reasons I cannot explain, this code works, even though it appears I am simply reading from EEPROM and not CGRam.· The value of k·was found by trial and error.· The degree symbol shows up for any value of k from·3 to 15.· Why does this work?·· And what I am reading?
More specifically, my question is,·once I have written a character to CGRam, how do I access it?
thanks,
Andrew
·