Hello.
There are LCD modules, based on ST7920 controller, which are pin and command compatible with HD44780 controllers, so they can be used with PBP, by using LCDOUT statement. This saves a lot of time, can be run on almost any PIC, no need for includes and so on. Also, with these, any existing project can be easily updated, since no need to change PCB or hardware layouts. At the current stage, I'm using a 1602 compatible module, which has same physical outline, but has resolution of 144x32 pixels, instead of 80x16 of standard 1602. This allows to have 4 lines of 18 character text on screen, instead of 2 lines x 16 character, with better looking 7x7 font. If 5x7 font will be used, it will be possible to display 24 characters per line. The attached picture shows my ASCII 7x7 font for that display. The code is here.

Code:
LCDOUT $FE,$2E  'enable graphic mode
pause 1
gosub gpt 'clear screen after switching to graphics mode
topline	var byte [18]
arraywrite topline, ["0123456789:;<=>?@ "]
C=0 'line number multiplied by 8
gosub GCODER
arraywrite topline, ["ABCDEFGHIJKLMNOPQR"]
c=8
gosub gcoder
arraywrite topline, ["STUVXYZ[\]&_`abcde"]
c=16
gosub gcoder
C=24
arraywrite topline, ["fghijklmnopqrstuvw"]
GOSUB GCODER
stop
GCODER:
FOR X=0 TO 17 step 2	'READ ARRAY INTO VARIABLE, ARRAY MEMBER CHAR=EEPROM OFFSET	
Y=(topline[x])*8-264
Z=(topline[x+1])*8-264 'READ  INTO VARIABLE AS TWINS
FOR I=0 TO 7	'HELPER LOOP FOR CHARACTER READING
i2cread sda, scl, adr, y+i, [a]
i2cread sda, scl, adr, z+i, [b]
LCDOUT $FE,$80+i+c 'UPDATE Y POSITION
LCDOUT $FE,$80+x/2 'UPDATE X POSITION
if topline[x]=32 then a=0
if topline[x+1]=32 then b=0 'blanker to display space (32)
LCDOUT a
LCDOUT b 'WRITE TO SCREEN
NEXT I
NEXT X
return
GPT:   'clear screen
z=0
for y=0 to 32
LCDOUT $FE,$80+y
LCDOUT $FE,$80
FOR x=1 TO 18
LCDOUT z
NEXT
next
return
At initial state, I was using on chip eeprom for storing font data, and using READ statement to read it. The speed was very fast - fast enough that I can do smooth scrolling, and some old school jumping lines/letters, parallax scrolling effects. But since in most PICs, on-chip eeprom is limited to 128 or 256 bytes, that amount is not enough to store complete ASCII character set. So I decided to use an external, I2C eeprom for font data storage. In this particular case, I'm using 24C256 chip. It works fine, but there's an issue with speed. Now, to re-read characters needed for complete screen display (576 bytes), it needs approximately 1 second, which makes smooth scrolling and other, "realtime" effects impossible.

So the question is following: This slowdown is definitely happens over I2C, because with on chip eeprom, everything is very fast. Is this caused by PBP limitation of I2C implementation, or the 24C256 is slow by it's nature and can't be read that fast? So what are ways of solving this? Use hardware I2C? (how?) use faster eeprom chip (which?)

Thanks!

Name:  geofont.jpg
Views: 1088
Size:  236.9 KB