Richard,
I'm just starting to experiment with displaying a simple number count ie. clearing the screen, incrementing a number and displaying that number using the larger numerical font and looping that process. So, everything's good until I'm getting to either 6 or 7 loops (doesn't matter what number I start with) and then something happens. The count stops where it should be displayed and appears to continue... like... 20 or so pixels above the nominated location and the font is now only 1 pixel high.
Any ideas what's happening or what I'm doing wrong?
Code:DEFINE OSC 64 #DEFINE colours 1 ;1 mono 2 rg or 3 rgb width con 128 ; height con 64 ; 'use serial i/f #define stserial 1 include "grx.pbpMOD" include "st7920b.pbpmod" include "font.bas" include "bignum.bas" include "bigchr.bas" BUFF VAR BYTE[4] ani_h var word bank0 ani_r var byte ani_c var byte OSCCON=$70 OSCTUNE.6=1 while ! osccon2.7 :WEND ;wait for pll ANSELB=0 ANSELC=0 ANSELA=0 'trisc = %11010101 ;cs,sck,sdo are output trisc = %11010101 ;cs,sck,sdo are output TRISB = %11111111 TRISA = %11111111 n var word gosub st7920_init 'graphic mode OSCCON=$70 OSCTUNE.6=1 while ! osccon2.7 :WEND ;wait for pll ANSELB=0 ANSELC=0 ANSELA=0 Pause 500 ' LCD initialize time lcdout $FE,1 gosub st7920_init 'graphic mode n=0 main gosub grf_clr n= n+1 SETFONT bignum ARRAYWRITE BUFF,[dec4 n] DMDSTR 40,30, Buff,1 gosub show pause 1000 goto main


Reply With Quote

Bookmarks