Tuesday, 26 August 2014

LCD-2000_Function manual

1.Introduce

  This manual mainly introduced the function examples from the LCD-2000 driver library. Every driving function is included in the driver file. We have a total of three electronic screen, they are LCD-2000-3916/LCD-2000-9225/LCD-2000-7775. The
driver of them is not exactly the same, but the driving way is the same. We can call function in the same way. So this manual is suitable for three kinds of LCD screen.

We can description the functional use the format as fellow:

Table 1.Function Description format

Table 2.Function drawLine
Example:/*draw a black line between(0,0)and(100,100)*/
drawline(0,0,100,100,RGB(0,0,0));

Table 3.Function drawFastVLine
Example:/*draw a black line which length is 50 and start with(0,100)*/
drawFastVLine(0,100,50,RGB(0,0,0));

Table 4.Function drawFastHLine
Example:/* draw a black line which length is 80 and start with(20,0)*/
drawFastHLine(20,0,80,RGB(0,0,0));

Table 5.Function fillRect
Example:/*fill a black rectangle start with (0,0),its length is 100,the width is 50 */
fillRect(0,0,100,50,RGB(0,0,0));

Table 6.Function fillScreen
Example:/*fill the screen with red*/
fillScreen(RGB(255,0,0));

Table 7.Function drawCircle
Example  :/*draw a red circle*/
drawCircle(50,100,50,RGB(255,0,0));

Table 8.Function drawCircleHelper

Table 9.cornername value
Example:/*draw the top of the circle*/
drawCircleHelper(50,100,50,1+8, RGB(255,0,0);

Table 10.Function fillCircle
Example:/*fill a red circle*/
fillCircle(50,100,50, RGB(255,0,0));

Table 11.Function fillCircleHelper
Example:/*fill a circle*/
fillCircleHelper(50,100,50,1, 20,RGB(255,0,0));

Table 12.Function drawTriangle
Example: /*draw a rad triangle*/
drawTriangle(0,0,0,100,50,0, RGB(255,0,0));

Table 13.Function fillTriangle
Example: /*fill a triangle use red*/
fillTriangle(0,0,0,100,50,0, RGB(255,0,0));

Table 14.Function drawRoundRect
Example: /*draw a red roundrect */
drawRoundRect(20,20,100,80, 20,RGB(255,0,0));

Table 15.Function fillRoundRect
Example: /*fill a drawRoundRect with red*/
fillRoundRect(20,20,100,80,20, RGB(255,0,0));

Table 16.Function drawChar
Example: /* a black characters write on a write paper*/
drawChar(10,10,'A', RGB(255,255,255), RGB(0,0,0),5) ;

Table 17.Function setstroke

Table 18.Function setTextColor

Table 19.Function setTextSize
Example: /*set a stroke, and a text color, a text size*/
TFTscreen.stroke(255,255,255);
TFTscreen.setTextColor(0xffff, 0xf000);
TFTscreen.setTextSize(2);

Table 20.Function text
Example: /* output a string*/
Text ("abcd: \n ",0,0);

No comments:

Post a Comment