tft

Dependencies:   mbed Adafruit_GFX

Committer:
603405000053
Date:
Sat Dec 15 19:44:33 2018 +0000
Revision:
0:bd6942344437
Child:
1:8daae36234f1
tft

Who changed what in which revision?

UserRevisionLine numberNew contents of line
603405000053 0:bd6942344437 1 #include "mbed.h"
603405000053 0:bd6942344437 2 #include <Adafruit_GFX.h>
603405000053 0:bd6942344437 3 #define TFTWIDTH 320
603405000053 0:bd6942344437 4 #define TFTHEIGHT 480
603405000053 0:bd6942344437 5
603405000053 0:bd6942344437 6 #define TFT_NORTH {SPFD5408_MADCTL_MY | SPFD5408_MADCTL_BGR}
603405000053 0:bd6942344437 7 #define TFT_EAST {SPFD5408_MADCTL_MX | SPFD5408_MADCTL_MY | SPFD5408_MADCTL_MV | SPFD5408_MADCTL_BGR}
603405000053 0:bd6942344437 8 #define TFT_SOUTH {SPFD5408_MADCTL_MX | SPFD5408_MADCTL_BGR}
603405000053 0:bd6942344437 9 #define TFT_WEST {SPFD5408_MADCTL_MV | SPFD5408_MADCTL_BGR}
603405000053 0:bd6942344437 10
603405000053 0:bd6942344437 11 #define BLACK 0x0000
603405000053 0:bd6942344437 12 #define BLUE 0x001F
603405000053 0:bd6942344437 13 #define RED 0xF800
603405000053 0:bd6942344437 14 #define GREEN 0x07E0
603405000053 0:bd6942344437 15 #define CYAN 0x07FF
603405000053 0:bd6942344437 16 #define MAGENTA 0xF81F
603405000053 0:bd6942344437 17 #define YELLOW 0xFFE0
603405000053 0:bd6942344437 18 #define WHITE 0xFFFF
603405000053 0:bd6942344437 19
603405000053 0:bd6942344437 20 #define SPFD5408_SOFTRESET 0x01
603405000053 0:bd6942344437 21 #define SPFD5408_SLEEPIN 0x10
603405000053 0:bd6942344437 22 #define SPFD5408_SLEEPOUT 0x11
603405000053 0:bd6942344437 23 #define SPFD5408_NORMALDISP 0x13
603405000053 0:bd6942344437 24 #define SPFD5408_INVERTOFF 0x20
603405000053 0:bd6942344437 25 #define SPFD5408_INVERTON 0x21
603405000053 0:bd6942344437 26 #define SPFD5408_GAMMASET 0x26
603405000053 0:bd6942344437 27 #define SPFD5408_DISPLAYOFF 0x28
603405000053 0:bd6942344437 28 #define SPFD5408_DISPLAYON 0x29
603405000053 0:bd6942344437 29 #define SPFD5408_COLADDRSET 0x2A
603405000053 0:bd6942344437 30 #define SPFD5408_PAGEADDRSET 0x2B
603405000053 0:bd6942344437 31 #define SPFD5408_MEMORYWRITE 0x2C
603405000053 0:bd6942344437 32 #define SPFD5408_PIXELFORMAT 0x3A
603405000053 0:bd6942344437 33 #define SPFD5408_FRAMECONTROL 0xB1
603405000053 0:bd6942344437 34 #define SPFD5408_DISPLAYFUNC 0xB6
603405000053 0:bd6942344437 35 #define SPFD5408_ENTRYMODE 0xB7
603405000053 0:bd6942344437 36 #define SPFD5408_POWERCONTROL1 0xC0
603405000053 0:bd6942344437 37 #define SPFD5408_POWERCONTROL2 0xC1
603405000053 0:bd6942344437 38 #define SPFD5408_VCOMCONTROL1 0xC5
603405000053 0:bd6942344437 39 #define SPFD5408_VCOMCONTROL2 0xC7
603405000053 0:bd6942344437 40 #define SPFD5408_MEMCONTROL 0x36
603405000053 0:bd6942344437 41 #define SPFD5408_MADCTL 0x36
603405000053 0:bd6942344437 42 #define SPFD5408_MADCTL_MY 0x80
603405000053 0:bd6942344437 43 #define SPFD5408_MADCTL_MX 0x40
603405000053 0:bd6942344437 44 #define SPFD5408_MADCTL_MV 0x20
603405000053 0:bd6942344437 45 #define SPFD5408_MADCTL_ML 0x10
603405000053 0:bd6942344437 46 #define SPFD5408_MADCTL_RGB 0x00
603405000053 0:bd6942344437 47 #define SPFD5408_MADCTL_BGR 0x08
603405000053 0:bd6942344437 48 #define SPFD5408_MADCTL_MH 0x04
603405000053 0:bd6942344437 49
603405000053 0:bd6942344437 50 #define IDLE 1
603405000053 0:bd6942344437 51 #define ACTIVE 0
603405000053 0:bd6942344437 52 #define COMMAND 0
603405000053 0:bd6942344437 53 #define DATA 1
603405000053 0:bd6942344437 54
603405000053 0:bd6942344437 55 #define TEMPS 60
603405000053 0:bd6942344437 56
603405000053 0:bd6942344437 57 #define VERT_LINE 0
603405000053 0:bd6942344437 58 #define HORI_LINE 1
603405000053 0:bd6942344437 59
603405000053 0:bd6942344437 60 DigitalOut pinRD(A0); //PA_0;
603405000053 0:bd6942344437 61 DigitalOut pinWR(A1); //PA_1;
603405000053 0:bd6942344437 62 DigitalOut pinCD(A2); //PA_4;
603405000053 0:bd6942344437 63 DigitalOut pinCS(A3); //PB_0;
603405000053 0:bd6942344437 64 DigitalOut pinReset(A4);//PC_1;
603405000053 0:bd6942344437 65
603405000053 0:bd6942344437 66 BusInOut portTFT(D8, D9, D2, D3, D4, D5, D6, D7);
603405000053 0:bd6942344437 67
603405000053 0:bd6942344437 68 void WriteCommand(uint8_t c)
603405000053 0:bd6942344437 69 {
603405000053 0:bd6942344437 70 pinCD = COMMAND;
603405000053 0:bd6942344437 71 pinWR = ACTIVE;
603405000053 0:bd6942344437 72 portTFT = c;
603405000053 0:bd6942344437 73 pinWR = IDLE;
603405000053 0:bd6942344437 74 }
603405000053 0:bd6942344437 75
603405000053 0:bd6942344437 76 void WriteData(uint8_t d)
603405000053 0:bd6942344437 77 {
603405000053 0:bd6942344437 78 pinCD = DATA;
603405000053 0:bd6942344437 79 pinWR = ACTIVE;
603405000053 0:bd6942344437 80 portTFT = d;
603405000053 0:bd6942344437 81 pinWR = IDLE;
603405000053 0:bd6942344437 82 }
603405000053 0:bd6942344437 83
603405000053 0:bd6942344437 84 Serial pc(SERIAL_TX, SERIAL_RX);
603405000053 0:bd6942344437 85
603405000053 0:bd6942344437 86 DigitalOut myled(LED1);
603405000053 0:bd6942344437 87
603405000053 0:bd6942344437 88
603405000053 0:bd6942344437 89
603405000053 0:bd6942344437 90 void begin(void) {
603405000053 0:bd6942344437 91
603405000053 0:bd6942344437 92 pinCS = IDLE;
603405000053 0:bd6942344437 93 pinCD = DATA;
603405000053 0:bd6942344437 94 pinWR = IDLE;
603405000053 0:bd6942344437 95 pinRD = IDLE;
603405000053 0:bd6942344437 96 portTFT.output();
603405000053 0:bd6942344437 97
603405000053 0:bd6942344437 98 pinReset = ACTIVE;
603405000053 0:bd6942344437 99 pinReset = IDLE;
603405000053 0:bd6942344437 100
603405000053 0:bd6942344437 101 pinCS = ACTIVE;
603405000053 0:bd6942344437 102
603405000053 0:bd6942344437 103 WriteCommand(SPFD5408_SOFTRESET);
603405000053 0:bd6942344437 104 WriteData(0);
603405000053 0:bd6942344437 105 wait_ms(100);
603405000053 0:bd6942344437 106
603405000053 0:bd6942344437 107 WriteCommand(SPFD5408_MEMCONTROL);
603405000053 0:bd6942344437 108 WriteData(SPFD5408_MADCTL_MY | SPFD5408_MADCTL_BGR);
603405000053 0:bd6942344437 109
603405000053 0:bd6942344437 110 WriteCommand(SPFD5408_PIXELFORMAT);
603405000053 0:bd6942344437 111 WriteData(0x55);
603405000053 0:bd6942344437 112
603405000053 0:bd6942344437 113 WriteCommand(SPFD5408_FRAMECONTROL);
603405000053 0:bd6942344437 114 WriteData(0x00);
603405000053 0:bd6942344437 115 WriteData(0x1B);
603405000053 0:bd6942344437 116
603405000053 0:bd6942344437 117 WriteCommand(SPFD5408_SLEEPOUT);
603405000053 0:bd6942344437 118 WriteData(0);
603405000053 0:bd6942344437 119
603405000053 0:bd6942344437 120 WriteCommand(SPFD5408_DISPLAYON);
603405000053 0:bd6942344437 121 WriteData(0);
603405000053 0:bd6942344437 122 }
603405000053 0:bd6942344437 123
603405000053 0:bd6942344437 124 void setAddrWindow(int x1, int y1, int x2, int y2) {
603405000053 0:bd6942344437 125 pinCS = ACTIVE;
603405000053 0:bd6942344437 126 wait_us(TEMPS);
603405000053 0:bd6942344437 127 WriteCommand(SPFD5408_COLADDRSET);
603405000053 0:bd6942344437 128 WriteData(x1 >> 8);
603405000053 0:bd6942344437 129 WriteData(x1);
603405000053 0:bd6942344437 130 WriteData(x2 >> 8);
603405000053 0:bd6942344437 131 WriteData(x2);
603405000053 0:bd6942344437 132 wait_us(TEMPS);
603405000053 0:bd6942344437 133 pinCS = IDLE;
603405000053 0:bd6942344437 134
603405000053 0:bd6942344437 135 pinCS = ACTIVE;
603405000053 0:bd6942344437 136 wait_us(TEMPS);
603405000053 0:bd6942344437 137 WriteCommand(SPFD5408_PAGEADDRSET);
603405000053 0:bd6942344437 138 WriteData(y1 >> 8);
603405000053 0:bd6942344437 139 WriteData(y1);
603405000053 0:bd6942344437 140 WriteData(y2 >> 8);
603405000053 0:bd6942344437 141 WriteData(y2);
603405000053 0:bd6942344437 142 wait_us(TEMPS);
603405000053 0:bd6942344437 143 pinCS = IDLE;
603405000053 0:bd6942344437 144 }
603405000053 0:bd6942344437 145
603405000053 0:bd6942344437 146 void fillRect(uint16_t x1, uint16_t y1, uint16_t w, uint16_t h, uint16_t fillcolor) {
603405000053 0:bd6942344437 147 uint8_t hi, lo;
603405000053 0:bd6942344437 148 uint16_t x2, y2;
603405000053 0:bd6942344437 149 uint16_t i, j;
603405000053 0:bd6942344437 150
603405000053 0:bd6942344437 151 x2 = x1 + w - 1;
603405000053 0:bd6942344437 152 y2 = y1 + h - 1;
603405000053 0:bd6942344437 153 setAddrWindow(x1, y1, x2, y2);
603405000053 0:bd6942344437 154
603405000053 0:bd6942344437 155 hi = fillcolor >> 8;
603405000053 0:bd6942344437 156 lo = fillcolor;
603405000053 0:bd6942344437 157
603405000053 0:bd6942344437 158 pinCS = ACTIVE;
603405000053 0:bd6942344437 159
603405000053 0:bd6942344437 160 WriteCommand(SPFD5408_MEMORYWRITE);
603405000053 0:bd6942344437 161 pinCD = DATA;
603405000053 0:bd6942344437 162
603405000053 0:bd6942344437 163 for (i = h; i > 0; i--)
603405000053 0:bd6942344437 164 {
603405000053 0:bd6942344437 165 for (j = w; j > 0; j--)
603405000053 0:bd6942344437 166
603405000053 0:bd6942344437 167 {
603405000053 0:bd6942344437 168 pinWR = ACTIVE;
603405000053 0:bd6942344437 169 portTFT = hi;
603405000053 0:bd6942344437 170 pinWR = IDLE;
603405000053 0:bd6942344437 171 pinWR = ACTIVE;
603405000053 0:bd6942344437 172 portTFT = lo;
603405000053 0:bd6942344437 173 pinWR = IDLE;
603405000053 0:bd6942344437 174 }
603405000053 0:bd6942344437 175 }
603405000053 0:bd6942344437 176
603405000053 0:bd6942344437 177
603405000053 0:bd6942344437 178 pinCS = IDLE;
603405000053 0:bd6942344437 179 }
603405000053 0:bd6942344437 180
603405000053 0:bd6942344437 181 void drawLine(uint8_t orientation,uint16_t x1, uint16_t y1, uint16_t lenght, uint16_t fillcolor) {
603405000053 0:bd6942344437 182 uint8_t hi, lo;
603405000053 0:bd6942344437 183 uint16_t x2, y2;
603405000053 0:bd6942344437 184 uint16_t i, j;
603405000053 0:bd6942344437 185
603405000053 0:bd6942344437 186 if(orientation == VERT_LINE)
603405000053 0:bd6942344437 187 {
603405000053 0:bd6942344437 188 x2 = x1 - 1;
603405000053 0:bd6942344437 189 y2 = y1 + lenght - 1;
603405000053 0:bd6942344437 190 }
603405000053 0:bd6942344437 191 else if(orientation == HORI_LINE)
603405000053 0:bd6942344437 192 {
603405000053 0:bd6942344437 193 x2 = x1 + lenght - 1;
603405000053 0:bd6942344437 194 y2 = y1 - 1;
603405000053 0:bd6942344437 195 }
603405000053 0:bd6942344437 196 setAddrWindow(x1, y1, x2, y2);
603405000053 0:bd6942344437 197
603405000053 0:bd6942344437 198 hi = fillcolor >> 8;
603405000053 0:bd6942344437 199 lo = fillcolor;
603405000053 0:bd6942344437 200
603405000053 0:bd6942344437 201 pinCS = ACTIVE;
603405000053 0:bd6942344437 202
603405000053 0:bd6942344437 203 WriteCommand(SPFD5408_MEMORYWRITE);
603405000053 0:bd6942344437 204 pinCD = DATA;
603405000053 0:bd6942344437 205
603405000053 0:bd6942344437 206 for (i = lenght; i > 0; i--)
603405000053 0:bd6942344437 207 {
603405000053 0:bd6942344437 208 pinWR = ACTIVE;
603405000053 0:bd6942344437 209 portTFT = hi;
603405000053 0:bd6942344437 210 pinWR = IDLE;
603405000053 0:bd6942344437 211 pinWR = ACTIVE;
603405000053 0:bd6942344437 212 portTFT = lo;
603405000053 0:bd6942344437 213 pinWR = IDLE;
603405000053 0:bd6942344437 214
603405000053 0:bd6942344437 215 }
603405000053 0:bd6942344437 216
603405000053 0:bd6942344437 217
603405000053 0:bd6942344437 218 pinCS = IDLE;
603405000053 0:bd6942344437 219 }
603405000053 0:bd6942344437 220
603405000053 0:bd6942344437 221
603405000053 0:bd6942344437 222 void drawPixel(uint16_t x1, uint16_t y1, uint16_t fillcolor) {
603405000053 0:bd6942344437 223 uint8_t hi, lo;
603405000053 0:bd6942344437 224 uint16_t x2, y2;
603405000053 0:bd6942344437 225
603405000053 0:bd6942344437 226 x2 = x1 - 1;
603405000053 0:bd6942344437 227 y2 = y1 - 1;
603405000053 0:bd6942344437 228
603405000053 0:bd6942344437 229 setAddrWindow(x1, y1, x2, y2);
603405000053 0:bd6942344437 230
603405000053 0:bd6942344437 231 hi = fillcolor >> 8;
603405000053 0:bd6942344437 232 lo = fillcolor;
603405000053 0:bd6942344437 233
603405000053 0:bd6942344437 234 pinCS = ACTIVE;
603405000053 0:bd6942344437 235
603405000053 0:bd6942344437 236 WriteCommand(SPFD5408_MEMORYWRITE);
603405000053 0:bd6942344437 237 pinCD = DATA;
603405000053 0:bd6942344437 238
603405000053 0:bd6942344437 239 // for (i = 1; i > 0; i--)
603405000053 0:bd6942344437 240 // {
603405000053 0:bd6942344437 241 pinWR = ACTIVE;
603405000053 0:bd6942344437 242 portTFT = hi;
603405000053 0:bd6942344437 243 pinWR = IDLE;
603405000053 0:bd6942344437 244 pinWR = ACTIVE;
603405000053 0:bd6942344437 245 portTFT = lo;
603405000053 0:bd6942344437 246 pinWR = IDLE;
603405000053 0:bd6942344437 247 //
603405000053 0:bd6942344437 248 // }
603405000053 0:bd6942344437 249 //
603405000053 0:bd6942344437 250
603405000053 0:bd6942344437 251 pinCS = IDLE;
603405000053 0:bd6942344437 252 }
603405000053 0:bd6942344437 253 void draw_text_korn(uint64_t rttd,int x_k=100,int y_k=100)
603405000053 0:bd6942344437 254 {
603405000053 0:bd6942344437 255 for(int i=0;i<8;i++)
603405000053 0:bd6942344437 256 {for(int j=0;j<8;j++)
603405000053 0:bd6942344437 257 {
603405000053 0:bd6942344437 258 if( ( (rttd>>(i*8+j)) &0x01)==1){drawPixel(i*3+x_k,-1*2*j+y_k,GREEN);}
603405000053 0:bd6942344437 259 }
603405000053 0:bd6942344437 260 }
603405000053 0:bd6942344437 261 }
603405000053 0:bd6942344437 262 void korn_text(char ttd,int y_k,int x_k)//important note x is y, y is x
603405000053 0:bd6942344437 263 {
603405000053 0:bd6942344437 264 const uint64_t IMAGES[] = {
603405000053 0:bd6942344437 265 0x6666667e66663c00,
603405000053 0:bd6942344437 266 0x3e66663e66663e00,
603405000053 0:bd6942344437 267 0x3c66060606663c00,
603405000053 0:bd6942344437 268 0x3e66666666663e00,
603405000053 0:bd6942344437 269 0x7e06063e06067e00,
603405000053 0:bd6942344437 270 0x0606063e06067e00,
603405000053 0:bd6942344437 271 0x3c66760606663c00,
603405000053 0:bd6942344437 272 0x6666667e66666600,
603405000053 0:bd6942344437 273 0x3c18181818183c00,
603405000053 0:bd6942344437 274 0x1c36363030307800,
603405000053 0:bd6942344437 275 0x66361e0e1e366600,
603405000053 0:bd6942344437 276 0x7e06060606060600,
603405000053 0:bd6942344437 277 0xc6c6c6d6feeec600,
603405000053 0:bd6942344437 278 0xc6c6e6f6decec600,
603405000053 0:bd6942344437 279 0x3c66666666663c00,
603405000053 0:bd6942344437 280 0x06063e6666663e00,
603405000053 0:bd6942344437 281 0x603c766666663c00,
603405000053 0:bd6942344437 282 0x66361e3e66663e00,
603405000053 0:bd6942344437 283 0x3c66603c06663c00,
603405000053 0:bd6942344437 284 0x18181818185a7e00,
603405000053 0:bd6942344437 285 0x7c66666666666600,
603405000053 0:bd6942344437 286 0x183c666666666600,
603405000053 0:bd6942344437 287 0xc6eefed6c6c6c600,
603405000053 0:bd6942344437 288 0xc6c66c386cc6c600,
603405000053 0:bd6942344437 289 0x1818183c66666600,
603405000053 0:bd6942344437 290 0x7e060c1830607e00,
603405000053 0:bd6942344437 291 0x0000000000000000,
603405000053 0:bd6942344437 292 0x7c667c603c000000,
603405000053 0:bd6942344437 293 0x3e66663e06060600,
603405000053 0:bd6942344437 294 0x3c6606663c000000,
603405000053 0:bd6942344437 295 0x7c66667c60606000,
603405000053 0:bd6942344437 296 0x3c067e663c000000,
603405000053 0:bd6942344437 297 0x0c0c3e0c0c6c3800,
603405000053 0:bd6942344437 298 0x3c607c66667c0000,
603405000053 0:bd6942344437 299 0x6666663e06060600,
603405000053 0:bd6942344437 300 0x3c18181800180000,
603405000053 0:bd6942344437 301 0x1c36363030003000,
603405000053 0:bd6942344437 302 0x66361e3666060600,
603405000053 0:bd6942344437 303 0x1818181818181800,
603405000053 0:bd6942344437 304 0xd6d6feeec6000000,
603405000053 0:bd6942344437 305 0x6666667e3e000000,
603405000053 0:bd6942344437 306 0x3c6666663c000000,
603405000053 0:bd6942344437 307 0x06063e66663e0000,
603405000053 0:bd6942344437 308 0xf0b03c36363c0000,
603405000053 0:bd6942344437 309 0x060666663e000000,
603405000053 0:bd6942344437 310 0x3e403c027c000000,
603405000053 0:bd6942344437 311 0x1818187e18180000,
603405000053 0:bd6942344437 312 0x7c66666666000000,
603405000053 0:bd6942344437 313 0x183c666600000000,
603405000053 0:bd6942344437 314 0x7cd6d6d6c6000000,
603405000053 0:bd6942344437 315 0x663c183c66000000,
603405000053 0:bd6942344437 316 0x3c607c6666000000,
603405000053 0:bd6942344437 317 0x3c0c18303c000000,
603405000053 0:bd6942344437 318
603405000053 0:bd6942344437 319 0x0000000000000000,0x7c667c603c000000,0x3e66663e06060600,0x3c6606663c000000,0x3c607c66667c0000,
603405000053 0:bd6942344437 320 0x7c66667c60606000,0x3c067e663c000000,0x0c0c3e0c0c6c3800,0x6666663e06060600,0x3c18181800180000,
603405000053 0:bd6942344437 321 0x1c36363030003000,0x66361e3666060600,0x1818181818181800,0xd6d6feeec6000000,0x6666667e3e000000,
603405000053 0:bd6942344437 322 0x3c6666663c000000,0x06063e66663e0000,0xf0b03c36363c0000,0x060666663e000000,0x3e403c027c000000,
603405000053 0:bd6942344437 323 0x1818187e18180000,0x7c66666666000000,0x183c666600000000,0x7cd6d6d6c6000000,0x663c183c66000000,
603405000053 0:bd6942344437 324 0x3c607c6666000000,0x3c0c18303c000000
603405000053 0:bd6942344437 325 };
603405000053 0:bd6942344437 326 /*switch(ttd)
603405000053 0:bd6942344437 327 {
603405000053 0:bd6942344437 328 case 'F':
603405000053 0:bd6942344437 329 draw_text_korn(0x0606063e06067e00);
603405000053 0:bd6942344437 330 break;
603405000053 0:bd6942344437 331 }*/
603405000053 0:bd6942344437 332 draw_text_korn(IMAGES[ttd-'A'],x_k,480-y_k);
603405000053 0:bd6942344437 333 }
603405000053 0:bd6942344437 334 void korn_text_string(char st[15])
603405000053 0:bd6942344437 335 {int x_s=100,y_s=100;
603405000053 0:bd6942344437 336 for(int sz=0;sz<sizeof(st);st++)
603405000053 0:bd6942344437 337 {
603405000053 0:bd6942344437 338 korn_text(st[sz],x_s,y_s);
603405000053 0:bd6942344437 339 x_s+=16;
603405000053 0:bd6942344437 340 }
603405000053 0:bd6942344437 341 }
603405000053 0:bd6942344437 342 int main()
603405000053 0:bd6942344437 343 {
603405000053 0:bd6942344437 344
603405000053 0:bd6942344437 345
603405000053 0:bd6942344437 346 begin();
603405000053 0:bd6942344437 347 //drawLine(VERT_LINE,0, 20, 60,GREEN );
603405000053 0:bd6942344437 348 //drawLine(HORI_LINE,30, 10, 20, RED);
603405000053 0:bd6942344437 349 drawPixel(100,100,RED);
603405000053 0:bd6942344437 350 drawPixel(200,200,'H');
603405000053 0:bd6942344437 351 fillRect(20, 100, 15,15, RED); //ซ้ายบน
603405000053 0:bd6942344437 352 fillRect(30, 110, 15,15, RED);
603405000053 0:bd6942344437 353 fillRect(40, 120, 15,15, RED);
603405000053 0:bd6942344437 354 fillRect(50, 130, 15,15, RED);
603405000053 0:bd6942344437 355 fillRect(60, 140, 15,15, RED);
603405000053 0:bd6942344437 356
603405000053 0:bd6942344437 357 fillRect(20, 90, 15,15, RED);//ขวาบน
603405000053 0:bd6942344437 358 fillRect(30, 80, 15,15, RED);
603405000053 0:bd6942344437 359 fillRect(40, 70, 15,15, RED);
603405000053 0:bd6942344437 360 fillRect(50, 60, 15,15, RED);
603405000053 0:bd6942344437 361 fillRect(60, 50, 15,15, RED);
603405000053 0:bd6942344437 362
603405000053 0:bd6942344437 363 fillRect(70, 140, 15,15, RED); //ซ้ายล่าง
603405000053 0:bd6942344437 364 fillRect(80, 130, 15,15, RED);
603405000053 0:bd6942344437 365 fillRect(90, 120, 15,15, RED);
603405000053 0:bd6942344437 366 fillRect(100, 110, 15,15, RED);
603405000053 0:bd6942344437 367 fillRect(110, 100, 15,15, RED);
603405000053 0:bd6942344437 368
603405000053 0:bd6942344437 369 fillRect(70, 50, 15,15, RED); //ขวาล่าง
603405000053 0:bd6942344437 370 fillRect(80, 60, 15,15, RED);
603405000053 0:bd6942344437 371 fillRect(90, 70, 15,15, RED);
603405000053 0:bd6942344437 372 fillRect(100, 80, 15,15, RED);
603405000053 0:bd6942344437 373 fillRect(110, 90, 15,15, RED);
603405000053 0:bd6942344437 374 while(1)
603405000053 0:bd6942344437 375 {
603405000053 0:bd6942344437 376 korn_text_string("SF-SYSTEM");
603405000053 0:bd6942344437 377 }
603405000053 0:bd6942344437 378 }