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

📄 ra8806.lst

📁 Radio公司的最新控制器RA8806只要一条命令就可以实现硬件上90度的滚屏效果
💻 LST
📖 第 1 页 / 共 5 页
字号:
 879   1              uchar temp;
 880   1      
 881   1              LCD_CmdWrite(KSCR1);    
 882   1              temp = LCD_DataRead();
 883   1              temp |= cSetb3;
 884   1              LCD_CmdWrite(KSCR1);
 885   1              LCD_DataWrite(temp);
 886   1      }
 887          
 888          //==============================================================================
 889          //Subroutine:   Only_Show_Page2
 890          //Function:
 891          //==============================================================================
 892          void Only_Show_Page2(void)
 893          {
 894   1              uchar temp;
 895   1              
 896   1              LCD_CmdWrite(MAMR);
 897   1              temp = LCD_DataRead();
 898   1              temp &= cClrb6;
 899   1              temp |= cSetb5;
 900   1              temp &= cClrb4;
 901   1              LCD_CmdWrite(MAMR);
 902   1              LCD_DataWrite(temp);
 903   1      }
 904          
 905          //==============================================================================
 906          //Subroutine:   Only_Show_Page1
 907          //Function:
 908          //==============================================================================
 909          void Only_Show_Page1(void)
 910          {
 911   1              uchar temp;
 912   1              
 913   1              LCD_CmdWrite(MAMR);
 914   1              temp = LCD_DataRead();
 915   1              temp &= cClrb6;
 916   1              temp &= cClrb5;
 917   1              temp |= cSetb4;
 918   1              LCD_CmdWrite(MAMR);
 919   1              LCD_DataWrite(temp);
 920   1      }
 921          
 922          //==============================================================================
 923          //Subroutine:   Show_Two_Layer
C51 COMPILER V7.50   RA8806                                                                03/31/2008 16:56:28 PAGE 16  

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

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

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

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

1172          //Subroutine:   Bold
1173          //Function:

⌨️ 快捷键说明

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