📄 xianshi.lst
字号:
244 void test_number_2()
245 {
246 1 int i,k,m;
247 1 clear();
248 1 for(i=0;i<2;i++)
249 1 {
250 2 write_command(0xb4+4*i);
251 2 write_command(0x10);
252 2 write_command(0x00);
253 2 for(k=0;k<8;k++)
254 2 for(m=0;m<16;m++)
255 2 {
256 3 write_data(number_2[m]);
257 3 write_data(number_2[m]);
258 3 }
259 2 write_command(0xb5+4*i);
260 2 write_command(0x10);
261 2 write_command(0x00);
262 2 for(k=0;k<8;k++)
263 2 for(m=0;m<16;m++)
264 2 {
265 3 write_data(number_2[16+m]);
266 3 write_data(number_2[16+m]);
267 3 }
268 2 write_command(0xb6+4*i);
269 2 write_command(0x10);
270 2 write_command(0x00);
271 2 for(k=0;k<8;k++)
272 2 for(m=0;m<16;m++)
273 2 {
274 3 write_data(number_2[32+m]);
275 3 write_data(number_2[32+m]);
276 3 }
277 2 write_command(0xb7+4*i);
278 2 write_command(0x10);
279 2 write_command(0x00);
280 2 for(k=0;k<8;k++)
281 2 for(m=0;m<16;m++)
282 2 {
283 3 write_data(number_2[48+m]);
284 3 write_data(number_2[48+m]);
285 3 }
286 2 }
287 1 }
288 void test_number_3()
289 {
290 1 int i,k;
291 1 clear();
292 1 for(i=0;i<16;i++)
293 1 {
294 2 write_command(0xb0+i);
295 2 write_command(0x10);
296 2 write_command(0x00);
297 2 for(k=0;k<128;k++)
298 2
299 2 {
300 3 write_data(number_3[128*i]);
301 3 write_data(number_3[128*i+k]);
302 3 }
303 2
C51 COMPILER V7.06 XIANSHI 02/18/2008 17:11:24 PAGE 6
304 2 /* for(k=0;k<8;k++)
305 2 for(m=0;m<16;m++)
306 2 {
307 2 write_data(number_2[16+m]);
308 2 write_data(number_2[16+m]);
309 2 }
310 2 write_command(0xb6+4*i);
311 2 write_command(0x10);
312 2 write_command(0x00);
313 2 for(k=0;k<8;k++)
314 2 for(m=0;m<16;m++)
315 2 {
316 2 write_data(number_2[32+m]);
317 2 write_data(number_2[32+m]);
318 2 }
319 2 write_command(0xb7+4*i);
320 2 write_command(0x10);
321 2 write_command(0x00);
322 2 for(k=0;k<8;k++)
323 2 for(m=0;m<16;m++)
324 2 {
325 2 write_data(number_2[48+m]);
326 2 write_data(number_2[48+m]);
327 2 }*/
328 2 }
329 1 }
330 void test_frame()
331 {
332 1 int i;
333 1 clear();
334 1 write_command(0xb0);
335 1 write_command(0x00);
336 1 write_command(0x10);
337 1 write_data(0xff);
338 1 write_data(0xff);
339 1 for(i=0;i<126;i++)
340 1 {
341 2 write_data(0x01);
342 2 write_data(0x01);
343 2 }
344 1 write_data(0xff);
345 1 write_data(0xff);
346 1 for(i=0;i<14;i++)
347 1 {
348 2 write_command(0xb1+i);
349 2 write_command(0x00);
350 2 write_command(0x10);
351 2 write_data(0xff);
352 2 write_data(0xff);
353 2 write_command(0x0f);
354 2 write_command(0x17);
355 2 write_data(0xff);
356 2 write_data(0xff);
357 2 }
358 1 write_command(0xb15);
359 1 write_command(0x00);
360 1 write_command(0x10);
361 1 write_data(0xff);
362 1 write_data(0xff);
363 1 for(i=0;i<126;i++)
364 1 {
365 2 write_data(0x80);
C51 COMPILER V7.06 XIANSHI 02/18/2008 17:11:24 PAGE 7
366 2 write_data(0x80);
367 2 }
368 1 write_data(0xff);
369 1 write_data(0xff);
370 1 }
371
372
373 void test_full()
374 {
375 1 int i,j;
376 1 for(i=0;i<16;i++)
377 1 {
378 2 write_command(0xb0+i);
379 2 write_command(0x10);
380 2 write_command(0x00);
381 2 for(j=0;j<128;j++)
382 2 {
383 3 write_data(0xff);
384 3 write_data(0xff);
385 3 }
386 2 }
387 1 }
388
389 void test_full1()
390 {
391 1 int i,j;
392 1 for(i=0;i<16;i++)
393 1 {
394 2 write_command(0xb0+i);
395 2 write_command(0x10);
396 2 write_command(0x00);
397 2 for(j=0;j<128;j++)
398 2 {
399 3 write_data(0x00);
400 3 write_data(0x00);
401 3 }
402 2 }
403 1 }
404
405 void test_gray()
406 {
407 1 int i,j,k;
408 1 uchar code gray[]={
409 1 0x00,0x00,
410 1 0xff,0x00,
411 1 0x00,0xff,
412 1 0xff,0xff
413 1 };
414 1 for(i=0;i<16;i++)
415 1 {
416 2 write_command(0xb0+i);
417 2 write_command(0x10);
418 2 write_command(0x00);
419 2 for(j=0;j<4;j++)
420 2 for(k=0;k<32;k++)
421 2 {
422 3 write_data(gray[2*j]);
423 3 write_data(gray[2*j+1]);
424 3 }
425 2 }
426 1 }
427 void main()
C51 COMPILER V7.06 XIANSHI 02/18/2008 17:11:24 PAGE 8
428 {
429 1 delay(10);
430 1 while(1)
431 1 {
432 2 // led_en=1;
433 2 // led_dim=0;
434 2 initialization();
435 2 test_characters();
436 2 delay(200);
437 2 //test_gray();
438 2 //delay(200);
439 2 // wait_key();
440 2 test_number_2();
441 2 delay(200);
442 2 // wait_key();
443 2 /////test_number_3();
444 2 // wait_key();
445 2 delay(200);
446 2 ///test_frame();
447 2 // wait_key();
448 2 delay(200);
449 2 test_full();
450 2 // wait_key();
451 2
452 2 // wait_key();
453 2 // test_1();
454 2 // wait_key();
455 2 delay(200);
456 2 test_full1();
457 2 delay(320);
458 2 }
459 1 }
460 uchar code number_2[4096] = {//2:16*32
461 /*-- 调入了一幅图像:C:\Documents and Settings\liminglcm\桌面\1.bmp --*/
462 /*-- 宽度x高度=16x32 --*/
463 0x00,0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0x20,0x40,0xC0,0x80,0x00,0x00,0x00,
464 0x00,0xF8,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFE,0xF8,0x00,
465 0x00,0x0F,0x3F,0xF0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x3F,0x0F,0x00,
466 0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x02,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00
467
468 };
469 uchar code number_3[] = {
470 /*-- 调入了一幅图像:C:\Documents and Settings\wangyouren.BYDHQ\桌面\1010559419.bmp --*/
471 /*-- 宽度x高度=128x128 --*/
472 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xF0,0xF0,
473 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,
474 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
475 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
476 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
477 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
478 0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
479 0xF0,0xF0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
480 0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
481 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xFC,
482 0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
483 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
484 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
485 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,
486 0xFC,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
487 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
488 0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
489 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
C51 COMPILER V7.06 XIANSHI 02/18/2008 17:11:24 PAGE 9
490 0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,
491 0x30,0x30,0x30,0x3C,0x3F,0x3F,0x3F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
492 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x3F,0x3F,0x3F,0x0C,0x30,0x30,0x30,
493 0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF,
494 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
495 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -