I've compared this code on 16F1939 @ 16 Mhz and 18F45K80 @ 64 Mhz and see zero improvement in speed (screen redraw time). I'm doing something wrong, or it should be that way? Here's config for 18F:
And this is the main code (ST7920 library with custom fonts)Code:OSCTUNE.6 = 1 ; Enable 4x PLL OSCCON = %01110000 ANCON1=0 'DISABLE ADC D3-D2-D1-D0- ANCON0=0 ADCON0=0 TRISC=%00000000 'set PORTC as output all TRISD=%00000000 'set PORTD as output all TRISB=%00000000 'set PORTB as output all TRISA=%00000000 'set PORTA 2 as input, others as output TRISE=%0000000 'set PORTE as output all define OSC 64
Code:topline var byte [18] arraywrite topline, ["SOMETEXT HERE 123"] C=0 gosub GCODER arraywrite topline, ["SOMETEXT HERE 567"] c=8 gosub gcoder arraywrite topline, ["SOMETEXT HERE 890"] c=16 gosub gcoder C=24 arraywrite topline, ["SOMETEXT HERE XXX"] GOSUB GCODER stop GCODER: FOR X=0 TO 17 step 2 'READ ARRAY INTO VARIABLE, ARRAY MEMBER CHAR=EEPROM OFFSET Y=(topline[x]-65)*8 Z=(topline[x+1]-65)*8 'READ INTO VARIABLE AS TWINS FOR I=0 TO 7 'HELPER LOOP FOR CHARACTER READING READ Y+I,A 'READ EEPROM BYTES INTO VAR READ 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 LCDOUT a LCDOUT b 'WRITE TO SCREEN NEXT I NEXT X return




Bookmarks