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

📄 mcu.lst

📁 车载SCALER模块源程序
💻 LST
📖 第 1 页 / 共 3 页
字号:
 742          /*==========================================
 743          ==========================================*/
 744          bit DetectBacklight()
 745          {
 746   1              //return I_OBackLightStatus;
 747   1              return 1;
 748   1      }
 749          /*==========================================
 750          ==========================================*/
 751          void PanelPowerOn(void)
 752          {
 753   1              //I_OXRSTLow;
 754   1              I_OLCDSTBLow;
 755   1              Sleep(10);
 756   1              //I_OXRSTHigh;
 757   1              I_OLCDSTBHigh;
 758   1              //I_OPanelPowerHigh;
 759   1      }
 760          /*==========================================
 761          ==========================================*/
 762          void ResetScaler(void)
 763          {
 764   1              I_OResetOn;
 765   1              Sleep(12);
 766   1              I_OResetOff;
 767   1              Sleep(50);
 768   1              WriteIIC563(0x101, 0x20);  
 769   1              Sleep(12);
 770   1              WriteIIC563(0x101, 0x0f);
 771   1      }
 772          /*==========================================
 773          ==========================================*/
 774          bit DetectIRQ()
 775          {
 776   1              return !(PTB_REG & PB2);
 777   1      //      return 0;
 778   1      }
 779          /*==========================================
 780          ==========================================*/
 781          void IntGroup1(void) interrupt 2 using 1
 782          {
 783   1              if(INT_SRC & INT_EXT){
 784   2                      if(INTEXT_FLG & INTE0){
 785   3                              if(FastMuteEnable){
 786   4                                      I_OBackLightLow;
 787   4                                      if(SyncMode <3){                        //add by kevin 92/10/21 if ysnc mode in sep/com/SOG -->COM
 788   5              //                              INTEXT_EN = INTE1;              // Disable interrupt INT0 enable INT1
 789   5                                              FLG_Change_SyncMode=1;
 790   5                                      }
 791   4                              }
 792   3                              Abort = 1;      //abort autotune
 793   3                              if(ChangeMode<10)
 794   3                                      ChangeMode++;
 795   3                              INTEXT_FLG = INTE0;
 796   3                      }
 797   2      /*              
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 14  

 798   2                      if(INTEXT_FLG & INTE1){
 799   2                              INTEXT_FLG = INTE1;
 800   2                              I_OBackLightLow;
 801   2                              WarmUp();                       //reset system
 802   2                              
 803   2                      }
 804   2      */              
 805   2                      
 806   2              }
 807   1      }
 808          void LED_GrnOff(void)
 809          {
 810   1      unsigned char port;
 811   1              port = PTC_REG;
 812   1              port |= RDPC_REG;
 813   1              port |= PC1;
 814   1              PTC_REG = port;
 815   1      }
 816          
 817          void LED_GrnOn(void)
 818          {
 819   1      unsigned char port;
 820   1              port = PTC_REG;
 821   1              port |= RDPC_REG;
 822   1              port &= ~PC1;
 823   1              PTC_REG = port;
 824   1      }
 825          
 826          void LED_RedOff(void)
 827          {
 828   1      unsigned char port;
 829   1              port = PTC_REG;
 830   1              port |= RDPC_REG;
 831   1              port |= PC0;
 832   1              PTC_REG = port;
 833   1      }
 834          
 835          void LED_RedOn(void)
 836          {
 837   1      unsigned char port;
 838   1              port = PTC_REG;
 839   1              port |= RDPC_REG;
 840   1              port &= ~PC0;
 841   1              PTC_REG = port;
 842   1      }
 843          void PowNavOn()
 844          {
 845   1              Byte Port;
 846   1              Port = PTC_REG;         
 847   1              Port |= RDPC_REG;
 848   1              Port |= PC7;
 849   1              PTC_REG = Port; 
 850   1      }
 851          void PowNavOff()
 852          {
 853   1              Byte Port;
 854   1              Port = PTC_REG;         
 855   1              Port |= RDPC_REG;
 856   1              Port &= ~PC7;
 857   1              PTC_REG = Port; 
 858   1      }
 859          void Pow3On()
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 15  

 860          {
 861   1          Byte Port;
 862   1              Port = PTC_REG;         
 863   1              Port |= RDPC_REG;
 864   1              Port &= ~PC5;
 865   1              PTC_REG = Port;
 866   1      }
 867          void Pow3Off()
 868          {
 869   1          Byte Port;
 870   1              Port = PTC_REG;         
 871   1              Port |= RDPC_REG;
 872   1              Port |= PC5;
 873   1              PTC_REG = Port;
 874   1      }
 875          void Pow5On()
 876          {
 877   1          Byte Port;
 878   1              Port = PTC_REG;         
 879   1              Port |= RDPC_REG;
 880   1              Port &= ~PC6;
 881   1              PTC_REG = Port;
 882   1      }
 883          void Pow5Off()
 884          {
 885   1          Byte Port;
 886   1              Port = PTC_REG;         
 887   1              Port |= RDPC_REG;
 888   1              Port &= ~PC6;
 889   1              PTC_REG = Port;
 890   1      }
 891          void Pow9On()
 892          {
 893   1          Byte Port;
 894   1              Port = PTC_REG;         
 895   1              Port |= RDPC_REG;
 896   1              Port &= ~PC3;
 897   1              PTC_REG = Port;
 898   1      }
 899          void Pow9Off()
 900          {
 901   1          Byte Port;
 902   1              Port = PTC_REG;         
 903   1              Port |= RDPC_REG;
 904   1              Port |= PC3;
 905   1              PTC_REG = Port;
 906   1      }
 907          void Pow5150On()
 908          {
 909   1          Byte Port;
 910   1              Port = PTC_REG;         
 911   1              Port |= RDPC_REG;
 912   1              Port |= PC2;
 913   1              PTC_REG = Port;   
 914   1      }
 915          void Pow5150Off()
 916          {
 917   1         Byte Port;
 918   1              Port = PTC_REG;         
 919   1              Port |= RDPC_REG;
 920   1              Port &= ~PC2;
 921   1              PTC_REG = Port;
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 16  

 922   1      }
 923          void ResetVideoOn()
 924          {
 925   1          Byte Port;
 926   1              Port = PTB_REG;         
 927   1              Port |= RDPB_REG;
 928   1              Port &= ~PB1;
 929   1              PTB_REG = Port;
 930   1      }
 931          void ResetVideoOff()
 932          {
 933   1          Byte Port;
 934   1              Port = PTB_REG;         
 935   1              Port |= RDPB_REG;
 936   1              Port |= PB1;
 937   1              PTB_REG = Port;
 938   1      }
 939          void DrivePowOn()
 940          {
 941   1          Byte Port;
 942   1              Port = PTA_REG;         
 943   1              Port |= RDPA_REG;
 944   1              Port |= PA5;
 945   1              PTA_REG = Port;
 946   1      }
 947          void DrivePowOff()
 948          {
 949   1          Byte Port;
 950   1              Port = PTA_REG;         
 951   1              Port |= RDPA_REG;
 952   1              Port &= ~PA5;
 953   1              PTA_REG = Port;
 954   1      }
 955          void RestScalOn()
 956          {
 957   1          Byte Port;
 958   1          Port = PTC_REG;             
 959   1              Port |= RDPC_REG;
 960   1              Port &= ~PC4;
 961   1              PTC_REG = Port;
 962   1      }
 963          void RestScalOff()
 964          {
 965   1          Byte Port;
 966   1          Port = PTC_REG;             
 967   1              Port |= RDPC_REG;
 968   1              Port |= PC4;
 969   1              PTC_REG = Port;
 970   1      }
 971          void SetMenu()
 972          {  
 973   1          Byte Port;
 974   1              Port = PTA_REG;         
 975   1              Port |= RDPA_REG;
 976   1              Port &= ~PA7;
 977   1              PTA_REG = Port;
 978   1      }
 979          void ResetMenu()
 980          {  
 981   1          Byte Port;
 982   1              Port = PTA_REG;         
 983   1              Port |= RDPA_REG;
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 17  

 984   1              Port |= PA7;
 985   1              PTA_REG = Port;
 986   1      }
 987          bit NavMcu()    
 988          {
 989   1         bit m;
 990   1         Byte Port;
 991   1         RDPB_REG |=0x08; 
 992   1         Port = PTB_REG;
 993   1         if((Port & PB3)!=0)
 994   1            {
 995   2                  m=1;
 996   2                 }
 997   1              else
 998   1                {
 999   2                  m=0;
1000   2                 }
1001   1         return m;
1002   1      }
1003          
1004          void BackLightOn(void)
1005          {
1006   1          Byte Port;
1007   1          Port = PTE_REG;             
1008   1              Port |= RDPE_REG;
1009   1              Port |= PE1;
1010   1              PTE_REG = Port;
1011   1      }
1012          
1013          void BackLightOff(void)
1014          {
1015   1          Byte Port;
1016   1          Port = PTE_REG;             
1017   1              Port |= RDPE_REG;
1018   1              Port &= ~PE1;
1019   1              PTE_REG = Port;
1020   1      }
1021          void MuteStby0ff(void)
1022          {
1023   1          Byte Port;
1024   1          Port = PTD_REG;             
1025   1              Port |= RDPD_REG;
1026   1              Port |= PD6;
1027   1              PTD_REG = Port;
1028   1      }
1029          void MuteStbyOn(void)
1030          {
1031   1          Byte Port;
1032   1          Port = PTD_REG;             
1033   1              Port |= RDPD_REG;
1034   1              Port &= ~PD6;
1035   1              PTD_REG = Port;
1036   1      }
1037          bit KeyInput1(void)   // pin31   seek_up
1038          {
1039   1          bit m;
1040   1         Byte Port;
1041   1         RDPD_REG |=0x08; 
1042   1         Port = PTD_REG;
1043   1         if((Port & PD3)!=0)
1044   1            {
1045   2                  m=1;
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 18  

1046   2                 }
1047   1              else
1048   1                {
1049   2                  m=0;
1050   2                 }
1051   1         return m;
1052   1      }
1053          bit  KeyInput2(void)   // pin 30   seek_down
1054          {
1055   1          bit m;
1056   1         Byte Port;
1057   1         RDPD_REG |=0x10; 
1058   1         Port = PTD_REG;
1059   1         if((Port & PD4)!=0)
1060   1            {
1061   2                  m=1;
1062   2                 }
1063   1              else
1064   1                {
1065   2                  m=0;
1066   2                 }
1067   1         return m;
1068   1      }
1069          
1070          bit  KeyInput3(void)    //pin 29
1071          {
1072   1          bit m;
1073   1         Byte Port;
1074   1         RDPD_REG |=0x20; 
1075   1         Port = PTD_REG;
1076   1         if((Port & PD5)!=0)
1077   1            {
1078   2                  m=1;
1079   2                 }
1080   1              else
1081   1                {
1082   2                  m=0;
1083   2                 }
1084   1         return m;
1085   1      }
1086          bit StopIn(void)
1087          {
1088   1             bit m;
1089   1         Byte Port;
1090   1         RDPC_REG |=0x08; 
1091   1         Port = PTC_REG;
1092   1         if((Port & PC3)!=0)
1093   1            {
1094   2                  m=1;
1095   2                 }
1096   1              else
1097   1                {
1098   2                  m=0;
1099   2                 }
1100   1         return m;
1101   1      }
1102          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   1806    ----
   CONSTANT SIZE    =     13    ----
C51 COMPILER V7.06   MCU                                                                   12/11/2007 11:24:25 PAGE 19  

   XDATA SIZE       =   ----      12
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----       8
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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