⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ra8806.lst

📁 320x240驱动程序(网上搜集资料).rar
💻 LST
📖 第 1 页 / 共 5 页
字号:
 879          //Subroutine:   Only_Show_Page2
 880          //Function:
 881          //==============================================================================
 882          void Only_Show_Page2(void)
 883          {
 884   1              uchar temp;
 885   1              
 886   1              LCD_CmdWrite(MAMR);
 887   1              temp = LCD_DataRead();
 888   1              temp &= cClrb6;
 889   1              temp |= cSetb5;
 890   1              temp &= cClrb4;
 891   1              LCD_CmdWrite(MAMR);
 892   1              LCD_DataWrite(temp);
 893   1      }
 894          
 895          //==============================================================================
 896          //Subroutine:   Only_Show_Page1
 897          //Function:
 898          //==============================================================================
 899          void Only_Show_Page1(void)
 900          {
 901   1              uchar temp;
 902   1              
 903   1              LCD_CmdWrite(MAMR);
 904   1              temp = LCD_DataRead();
 905   1              temp &= cClrb6;
 906   1              temp &= cClrb5;
 907   1              temp |= cSetb4;
 908   1              LCD_CmdWrite(MAMR);
 909   1              LCD_DataWrite(temp);
 910   1      }
 911          
 912          //==============================================================================
 913          //Subroutine:   Show_Two_Layer
 914          //Function:
 915          //==============================================================================
 916          void Show_Two_Layer(void)
 917          {
 918   1              uchar temp;
 919   1              
 920   1              LCD_CmdWrite(MAMR);
 921   1              temp = LCD_DataRead();
 922   1              temp &= cClrb6;
 923   1              temp |= cSetb5;
C51 COMPILER V7.50   RA8806                                                                01/08/2009 15:49:24 PAGE 16  

 924   1              temp |= cSetb4;
 925   1              LCD_CmdWrite(MAMR);
 926   1              LCD_DataWrite(temp);
 927   1      }
 928          
 929          //==============================================================================
 930          //Subroutine:   XOR_Two_Layer
 931          //Function:
 932          //==============================================================================
 933          void XOR_Two_Layer(void)
 934          {
 935   1              uchar temp;
 936   1              
 937   1              LCD_CmdWrite(MAMR);
 938   1              temp = LCD_DataRead();
 939   1              temp &= cClrb3;
 940   1              temp |= cSetb2;
 941   1              LCD_CmdWrite(MAMR);
 942   1              LCD_DataWrite(temp);
 943   1      }
 944          
 945          //==============================================================================
 946          //Subroutine:   Reverse_Block
 947          //Function:
 948          //==============================================================================
 949          void Reverse_Block(uchar XP, uchar YP)
 950          {
 951   1              uchar i;
 952   1              LCD_Graphic();
 953   1              LCD_GotoXY(XP,YP);
 954   1              
 955   1              for(i=0;i<16;i++)
 956   1              {
 957   2                      LCD_CmdWrite(0xb0);
 958   2                      LCD_DataWrite(0xff);
 959   2                      LCD_DataWrite(0xff);
 960   2                      LCD_GotoXY(XP,YP+i+1);
 961   2              }
 962   1      }
 963          
 964          //==============================================================================
 965          //Subroutine:   Access_2Page
 966          //Function:
 967          //==============================================================================
 968          void Access_Page0(void)
 969          {
 970   1              uchar temp;
 971   1              
 972   1              LCD_CmdWrite(MAMR);
 973   1              temp = LCD_DataRead();
 974   1              temp &= cClrb1;
 975   1              temp &= cClrb0;
 976   1              LCD_CmdWrite(MAMR);
 977   1              LCD_DataWrite(temp);
 978   1      }
 979          
 980          //==============================================================================
 981          //Subroutine:   Access_Page2
 982          //Function:
 983          //==============================================================================
 984          void Access_Page2(void)
 985          {
C51 COMPILER V7.50   RA8806                                                                01/08/2009 15:49:24 PAGE 17  

 986   1              uchar temp;
 987   1              
 988   1              LCD_CmdWrite(MAMR);
 989   1              temp = LCD_DataRead();
 990   1              temp |= cSetb1;
 991   1              temp &= cClrb0;
 992   1              LCD_CmdWrite(MAMR);
 993   1              LCD_DataWrite(temp);
 994   1      }
 995          
 996          //==============================================================================
 997          //Subroutine:   Access_Page1
 998          //Function:
 999          //==============================================================================
1000          void Access_Page1(void)
1001          {
1002   1              uchar temp;
1003   1              
1004   1              LCD_CmdWrite(MAMR);
1005   1              temp = LCD_DataRead();
1006   1              temp &= cClrb1;
1007   1              temp |= cSetb0;
1008   1              LCD_CmdWrite(MAMR);
1009   1              LCD_DataWrite(temp);
1010   1      }
1011          
1012          //==============================================================================
1013          //Subroutine:   Access_2Page
1014          //Function:
1015          //==============================================================================
1016          void Access_2Page(void)
1017          {
1018   1              uchar temp;
1019   1              
1020   1              LCD_CmdWrite(MAMR);
1021   1              temp = LCD_DataRead();
1022   1              temp |= cSetb1;
1023   1              temp |= cSetb0;
1024   1              LCD_CmdWrite(MAMR);
1025   1              LCD_DataWrite(temp);
1026   1      }
1027          
1028          //==============================================================================
1029          //Subroutine:   Two_Layer_OR
1030          //Function:
1031          //==============================================================================
1032          void Two_Layer_OR(void)
1033          {
1034   1              uchar temp;
1035   1              
1036   1              LCD_CmdWrite(MAMR);
1037   1              temp = LCD_DataRead();
1038   1              temp &= cClrb3;
1039   1              temp &= cClrb2;
1040   1              LCD_CmdWrite(MAMR);
1041   1              LCD_DataWrite(temp);
1042   1      }
1043          
1044          //==============================================================================
1045          //Subroutine:   Two_Layer_XOR
1046          //Function:
1047          //==============================================================================
C51 COMPILER V7.50   RA8806                                                                01/08/2009 15:49:24 PAGE 18  

1048          void Two_Layer_XOR(void)
1049          {
1050   1              uchar temp;
1051   1              
1052   1              LCD_CmdWrite(MAMR);
1053   1              temp = LCD_DataRead();
1054   1              temp &= cClrb3;
1055   1              temp |= cSetb2;
1056   1              LCD_CmdWrite(MAMR);
1057   1              LCD_DataWrite(temp);
1058   1      }
1059          
1060          //==============================================================================
1061          //Subroutine:   Two_Layer_NOR
1062          //Function:
1063          //==============================================================================
1064          void Two_Layer_NOR(void)
1065          {
1066   1              uchar temp;
1067   1              
1068   1              LCD_CmdWrite(MAMR);
1069   1              temp = LCD_DataRead();
1070   1              temp |= cSetb3;
1071   1              temp &= cClrb2;
1072   1              LCD_CmdWrite(MAMR);
1073   1              LCD_DataWrite(temp);
1074   1      }
1075          
1076          //==============================================================================
1077          //Subroutine:   Two_Layer_XOR
1078          //Function:
1079          //==============================================================================
1080          void Two_Layer_AND(void)
1081          {
1082   1              uchar temp;
1083   1              
1084   1              LCD_CmdWrite(MAMR);
1085   1              temp = LCD_DataRead();
1086   1              temp |= cSetb3;
1087   1              temp |= cSetb2;
1088   1              LCD_CmdWrite(MAMR);
1089   1              LCD_DataWrite(temp);
1090   1      }
1091          
1092          
1093          //==============================================================================
1094          //Subroutine:   LCD_PrintStr 1
1095          //Function:             
1096          //==============================================================================
1097          void LCD_PrintStrD100ms(uchar *ptr, uchar x, uchar y, uchar time)
1098          {
1099   1              LCD_GotoXY(x, y);
1100   1              
1101   1              while(*ptr != 0)
1102   1              {
1103   2                      LCD_DataWrite(*ptr);
1104   2                      ptr++;
1105   2                      Delay100ms(time);
1106   2              }
1107   1      }
1108          
1109          //==============================================================================
C51 COMPILER V7.50   RA8806                                                                01/08/2009 15:49:24 PAGE 19  

1110          //Subroutine:   LCD_PrintStr 2
1111          //Function:             
1112          //==============================================================================
1113          void LCD_PrintStr(uchar *ptr, uchar cXSize)
1114          {
1115   1              uchar temp;
1116   1      
1117   1              LCD_CmdWrite(0xB0);
1118   1              for(temp=0 ; temp<cXSize ; temp++)
1119   1              {
1120   2                      LCD_DataWrite(*ptr);
1121   2                      Delay2us(50);
1122   2                      ptr++;
1123   2              }
1124   1      }
1125          
1126          //==============================================================================
1127          //Subroutine:   LCD_PrintStr 2
1128          //Function:             
1129          //==============================================================================
1130          void LCD_PrintStr_Delay_100us(uchar *ptr, uchar cXSize, uchar Delay_time)
1131          {
1132   1              uchar temp;
1133   1      
1134   1              LCD_CmdWrite(0xB0);
1135   1              for(temp=0 ; temp<cXSize ; temp++)
1136   1              {
1137   2                      LCD_DataWrite(*ptr);
1138   2                      Delay100us(Delay_time);
1139   2                      ptr++;
1140   2              }
1141   1      }
1142          
1143          //==============================================================================
1144          //Subroutine:   LCD_PrintStr 2
1145          //Function:             
1146          //==============================================================================
1147          void LCD_PrintStr_Delay_100ms(uchar *ptr, uchar cXSize, uchar Delay_time)
1148          {
1149   1              uchar temp;
1150   1      
1151   1              LCD_CmdWrite(0xB0);
1152   1              for(temp=0 ; temp<cXSize ; temp++)
1153   1              {
1154   2                      LCD_DataWrite(*ptr);
1155   2                      Delay100ms(Delay_time);
1156   2                      ptr++;
1157   2              }
1158   1      }
1159          
1160          
1161          //==============================================================================
1162          //Subroutine:   Bold
1163          //Function:
1164          //==============================================================================
1165          void LCD_Bold(void)
1166          {
1167   1              uchar temp;
1168   1              
1169   1              LCD_CmdWrite(WCCR);
1170   1              temp = LCD_DataRead();
1171   1              temp |= cSetb4;
C51 COMPILER V7.50   RA8806                                                                01/08/2009 15:49:24 PAGE 20  

1172   1              LCD_CmdWrite(WCCR);
1173   1              LCD_DataWrite(temp);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -