1 / 9

void write_one_text(char line,char colu, char data) { write_addr_lcm(line, 4+ 6 *colu);

void write_one_text(char line,char colu, char data) { write_addr_lcm(line, 4+ 6 *colu); write_lcm_command( LCM_ADDR_INC_MODE ); one_text( data); write_lcm_command( LCM_ADDR_INC_END ); }. void one_text(char ascii) { char j; write_lcm_data(0x00); for(j=0;j<5;j++) {

urit
Download Presentation

void write_one_text(char line,char colu, char data) { write_addr_lcm(line, 4+ 6 *colu);

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. void write_one_text(char line,char colu, char data) • { • write_addr_lcm(line, 4+6*colu); • write_lcm_command( LCM_ADDR_INC_MODE ); • one_text( data); • write_lcm_command( LCM_ADDR_INC_END ); • }

  2. void one_text(char ascii) • { • char j; • write_lcm_data(0x00); • for(j=0;j<5;j++) • { • write_lcm_data(font[ascii][j]); } • }

  3. for (;;) • { • write_one_text(1,0, 0xd);//顯示學號0 • write_one_chinese(2,0, 0); //顯示姓名 • } • }

  4. void write_one_chinese(char line,char colu, char data) • {int j; • write_addr_lcm(line,4+ 24*colu); • write_lcm_command( LCM_ADDR_INC_MODE ); • for(j=0; j<24; j++) • { • write_lcm_data(name [data] [j]); • } • write_lcm_command( LCM_ADDR_INC_END );

  5. write_addr_lcm(line+1, 4+24*colu); • write_lcm_command( LCM_ADDR_INC_MODE ); • for(j=0;j<24;j++) //display一字 8x5 • { • //read text data=font[字的位置][第一筆資料],字的位置=page[第幾頁][第幾個字] • write_lcm_data(name [data] [j+24]); //write text • } • write_lcm_command( LCM_ADDR_INC_END );

  6. write_addr_lcm(line+2,4+ 24*colu); • write_lcm_command( LCM_ADDR_INC_MODE ); • for(j=0;j<24;j++) //display一字 8x5 • { • //read text data=font[字的位置][第一筆資料],字的位置=page[第幾頁][第幾個字] • write_lcm_data(name [data] [j+48]); //write text • } • write_lcm_command( LCM_ADDR_INC_END ); • }

  7. char name[2][2]= • {0,0,0,0 • };

  8. Disp_lcm_10(int a) • { • write_one_text(1,8, (a%10)+0xd);顯示個位數 • write_one_text(1,7, (a/10%10)+0xd);顯示拾位數 • write_one_text(1,6, (a/10%100)+0xd);顯示佰位數 • }

More Related