hi,
Using my mobile phone camera I am unable to get a satisfactory video of the 18F4520 with TFT 9225 running a Oshonsoft Basic program.
Getting interference patterns on the video display, due the TFT and camera pixels.
Will try to find a an alternative camera,
For any Oshonsoft users, the Demo program attached, when using a18F4520 with a 20MHz Xtal and the 4*PLL enabled, the TFT runs at a fast rate.
The font table is called as an Include file in the Basic program, so load it into the same folder as the *.bas.
Eric.
The program has these Objects as Procedures, commented at the end of the Code.
'all variables are global dims
'the program uses hardware SPI functions.
call clear(color As Word)' full screen clr
all WORD's
call hori_line(x1 start, x1 end, @y0, color)
call vert_line(@x0, y0 start, y1 end, color)
call diag_line(x0 , y0 ,x1 y1, color)
call rectangle(x0 , y0 ,x1 y1, color)
call fill_rect(x0 , y0, x1, y1, color)
call draw_circle(x0 , y0 ,x1 y1, color)
call fill_circle(x0 , y0, x1, y1, color)
call msg2lcd(x0 As Word, y0 As Word, msg1 As String, color As Word, bg As Word) ' with Font size option.
call msg2bfr(x0 As Word, y0 As Word, msg1 As String)
call bfr2lcd(x1 As Word, y1 As Word, color As Word, bg As Word)
'the lcd addressing has been normalised so that Xorg, Yorg is at
'the bottom left corner of the lcd, in Landscape mode, x0,y0
'pin connects On right side.
'the long edge is the x axis [0 to 219] and the narrow is the y axis [0 to 175]
'for writing text, lower left pixel is the lower left of the character, the following
'character bits are written upwards.
'for drawing objects, the bottom left corner is x0,y0 is the object start and
'x1,y1 is the objects finish coords.