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

📄 mtv230 test.lst

📁 车载显示屏
💻 LST
📖 第 1 页 / 共 5 页
字号:
 738   1      	if((V_t_cnt_sync>500) && (V_read_sync==0))
 739   1      	{
 740   2      		V_read_sync=1;
 741   2      		B_read_sync=1;
 742   2      	}
 743   1      	if((V_t_cnt_sync>550) && (V_read_sync==1))
 744   1      	{
 745   2      		V_read_sync=2;
 746   2      		B_read_sync=1;
 747   2      	}
 748   1      	if((V_t_cnt_sync>600) && (V_read_sync==2))
 749   1      	{
 750   2      		V_read_sync=3;
 751   2      		B_read_sync=1;
 752   2      	}
 753   1      	if((V_t_cnt_sync>650) && (V_read_sync==3))
 754   1      	{
 755   2      		V_read_sync=4;
 756   2      		B_read_sync=1;
 757   2      	}
 758   1      	if((V_t_cnt_sync>700) && (V_read_sync==4))
 759   1      	{
 760   2      		V_read_sync=5;
 761   2      		B_read_sync=1;
 762   2      	}
 763   1      	if((V_t_cnt_sync>750) && (V_read_sync==5))
 764   1      	{
 765   2      		V_read_sync=6;
 766   2      		B_read_sync=1;
 767   2      	}
 768   1      	if((V_t_cnt_sync>800) && (V_read_sync==6))
 769   1      	{
 770   2      		V_read_sync=7;
 771   2      		B_read_sync=1;
 772   2      	}
 773   1      	if((V_t_cnt_sync>850) && (V_read_sync==7))
 774   1      	{
 775   2      		V_read_sync=8;
 776   2      		B_read_sync=1;
 777   2      	}
 778   1      	if((V_t_cnt_sync>900) && (V_read_sync==8))
 779   1      	{
 780   2      		V_read_sync=9;
 781   2      		B_read_sync=1;
 782   2      	}
 783   1      	if((V_t_cnt_sync>950) && (V_read_sync==9))
 784   1      	{
 785   2      		V_read_sync=10;
 786   2      		B_read_sync=1;
 787   2      	}
 788   1      	if((V_t_cnt_sync>1000) && (V_read_sync==10))
 789   1      	{
 790   2      		V_read_sync=11;
 791   2      		B_read_sync=1;
 792   2      	}
 793   1      	if(V_read_sync>=11)V_read_sync=0;
 794   1      	
 795   1      	if(B_read_sync)
 796   1      	{
 797   2      		B_read_sync=0;
 798   2      		V_vcnt1_h=VCNTH&0x8f;
 799   2      		V_vcnt1_l=VCNTL;
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 14  

 800   2      		if(V_vcnt1_h>=4 && V_vcnt1_h<=7)V_cnt_no_signal+=1;
 801   2      		else V_cnt_no_signal=0;
 802   2      		
 803   2      		if(V_t_cnt_sync>1000)
 804   2      		{
 805   3      			V_t_cnt_sync=0;
 806   3      			V_sync_temp=V_vcnt1_h;
 807   3      			V_sync_temp=(V_sync_temp<<8)&0xff00;
 808   3      			V_sync_temp=V_sync_temp|V_vcnt1_l;
 809   3      			if(V_cnt_no_signal>5)
 810   3      			{
 811   4      				V_cnt_no_signal=0;
 812   4      				FSSTP=0X00;
 813   4      				
 814   4      				if(!B_mute && (!(B_scan_tv||B_search_tv||B_scan_fm||B_search_fm)))DA3=V_volumn;
 815   4      				if(V_sys_mode==1)
 816   4      				{
 817   5      					if(V_sync_temp<=1116 && V_sync_temp>=892)
 818   5      					{
 819   6      						HB_p2n=1;
 820   6      						B_p2n=1;
 821   6      						if(!B_p2n_bak)
 822   6      						{
 823   7      							init_4137_ntsc();
 824   7      							init_osd0();
 825   7      							
 826   7      						}
 827   6      					}
 828   5      					if(V_sync_temp>1116 && V_sync_temp<1536)
 829   5      					{
 830   6      						HB_p2n=0;
 831   6      						B_p2n=0;
 832   6      						if(B_p2n_bak)
 833   6      						{
 834   7      							init_4137_pal();
 835   7      							init_osd0();
 836   7      						}
 837   6      					}
 838   5      				}
 839   4      			}
 840   3      			else
 841   3      			{
 842   4      				V_cnt_no_signal=0;
 843   4      			//	if((!(B_scan_tv||B_search_tv||B_scan_tv||B_search_tv)))
 844   4      			//	{
 845   4      			//		DA3=0x00;
 846   4      			//		for(i=0;i<15;i++)
 847   4      			//		{
 848   4      			//			init_row_ctrl(i,0x05);
 849   4      			//			for(j=0;j<31;j++)
 850   4      			//			{
 851   4      			//				dis_chara_col(i,j,GREEN);
 852   4      			//				dis_chara(i,j,0x00);
 853   4      			//			}
 854   4      			//		}
 855   4      			//		FSSTP=0X81;
 856   4      			//	}
 857   4      			//	else FSSTP=0X00;
 858   4      			}
 859   3      		}
 860   2      	}
 861   1      	if(V_sys_mode==2)
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 15  

 862   1      	{
 863   2      		HB_p2n=0x00;
 864   2      		mode_h=1;
 865   2      		mode_l=1;
 866   2      	}
 867   1      	if(B_mute && V_cnt_menu==0 && (!(B_scan_tv||B_search_tv||B_scan_fm||B_search_fm)))
 868   1      	{
 869   2      		dis_chara(12-V_temp_row,22,F_M);
 870   2      		dis_chara(12-V_temp_row,24,F_U);
 871   2      		dis_chara(12-V_temp_row,26,F_T);
 872   2      		dis_chara(12-V_temp_row,28,F_E);
 873   2      		dis_chara_col(12-V_temp_row,22,RED);
 874   2      		dis_chara_col(12-V_temp_row,24,RED);
 875   2      		dis_chara_col(12-V_temp_row,26,RED);
 876   2      		dis_chara_col(12-V_temp_row,28,RED);
 877   2      	}
 878   1      	else
 879   1      	{
 880   2      		dis_chara(12-V_temp_row,22,0x00);
 881   2      		dis_chara(12-V_temp_row,24,0x00);
 882   2      		dis_chara(12-V_temp_row,26,0x00);
 883   2      		dis_chara(12-V_temp_row,28,0x00);
 884   2      		dis_chara_col(12-V_temp_row,22,GREEN);
 885   2      		dis_chara_col(12-V_temp_row,24,GREEN);
 886   2      		dis_chara_col(12-V_temp_row,26,GREEN);
 887   2      		dis_chara_col(12-V_temp_row,28,GREEN);
 888   2      	}
 889   1      }
*** WARNING C280 IN LINE 674 OF .\MTV230 TEST.C: 'j': unreferenced local variable
 890          
 891          main()
 892          {
 893   1      	void deal_key(void);
 894   1      	void deal_key_s(void);
 895   1      	void deal_tv2fm_ir_key(void);
 896   1      	void deal_av_ir_key(void);
 897   1      	void deal_ir_key_s(void);
 898   1      	void scan_tv(void);
 899   1      	void scan_fm(void);
 900   1      	void Init_tuner(void);
 901   1      	void Dis_dis_all(void);
 902   1      	void init_sys(void);
 903   1      	void Scan_key(void);
 904   1      	
 905   1      	uchar Read_aft(void);
 906   1      	
 907   1      	void dis_channel(uchar V_dis_channel_temp);
 908   1      	
 909   1      	Init_230();
 910   1      	Dlay_nms(6000);
 911   1      	Dlay_nms(6000);
 912   1      	init_sys();
 913   1      	Init_tuner();
 914   1      	Dlay_nms(6000);
 915   1      	Dlay_nms(6000);
 916   1      	init_4137();
 917   1      	
 918   1      	Write_4137_pwm(V_bright,V_color,V_contrast);
 919   1      	V_sys_mode=0;
 920   1      	
 921   1      	while(1)
 922   1      	{
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 16  

 923   2      		WDT=0xc6;
 924   2      		tft_out();
 925   2      		Dis_dis_all();
 926   2      		switch(V_sys_mode)
 927   2      		{
 928   3      			case 0:
 929   3      			case 2:
 930   3      				deal_tv2fm_ir_key();
 931   3      				scan_tv();
 932   3      				scan_fm();
 933   3      				break;
 934   3      			case 1:
 935   3      				deal_av_ir_key();
 936   3      				break;
 937   3      			default:
 938   3      				V_sys_mode=0;
 939   3      				break;
 940   3      		}
 941   2      		deal_ir_key_s();
 942   2      		deal_key();
 943   2      		deal_key_s();
 944   2      		Scan_key();
 945   2      	}
 946   1      }
 947          
 948          void Start_iic(void)
 949          {
 950   1      	sda=1;
 951   1      	_nop_();
 952   1      	_nop_();
 953   1      	clk=1;
 954   1      	_nop_();
 955   1      	_nop_();
 956   1      	sda=0;
 957   1      	_nop_();
 958   1      	_nop_();
 959   1      	_nop_();
 960   1      	_nop_();
 961   1      	_nop_();
 962   1      	_nop_();
 963   1      	_nop_();
 964   1      	_nop_();
 965   1      	clk=0;
 966   1      }
 967          void Stop_iic(void)
 968          {
 969   1      	sda=0;
 970   1      	_nop_();
 971   1      	_nop_();
 972   1      	clk=1;
 973   1      	_nop_();
 974   1      	_nop_();
 975   1      	_nop_();
 976   1      	_nop_();
 977   1      	_nop_();
 978   1      	_nop_();
 979   1      	_nop_();
 980   1      	_nop_();
 981   1      	sda=1;
 982   1      }
 983          uchar Read_byte_end(void)
 984          {
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 17  

 985   1      	uchar    i=0;
 986   1      	for(i=0;i<8;i++)
 987   1             {
 988   2      		sda=1;
 989   2      		_nop_();
 990   2      		_nop_();
 991   2      		_nop_();
 992   2      		_nop_();
 993   2      		_nop_();
 994   2      		_nop_();
 995   2      		_nop_();
 996   2      		clk=1;
 997   2      		_nop_();
 998   2      		_nop_();
 999   2      		_nop_();
1000   2      		_nop_();
1001   2      		_nop_();
1002   2      		_nop_();
1003   2      		_nop_();
1004   2      		_nop_();
1005   2      		_nop_();
1006   2      		_nop_();
1007   2      		_nop_();
1008   2      		_nop_();
1009   2      		_nop_();
1010   2      		_nop_();
1011   2      		_nop_();
1012   2      		V_flag_buf=V_flag_buf<<1;
1013   2      		B_iic_buf_r=sda;
1014   2      		_nop_();
1015   2      		clk=0;
1016   2      	}
1017   1              _nop_();
1018   1              _nop_();
1019   1              _nop_();
1020   1              _nop_();
1021   1              _nop_();
1022   1      	_nop_();
1023   1      	_nop_();
1024   1      	_nop_();
1025   1      	_nop_();
1026   1              _nop_();
1027   1              _nop_();
1028   1              _nop_();
1029   1              //sda=1;
1030   1      	return(V_flag_buf);
1031   1      }
1032          uchar Read_byte(void)
1033          {
1034   1      	uchar    i=0;
1035   1      	for(i=0;i<8;i++)
1036   1      	{
1037   2      		sda=1;
1038   2      		_nop_();
1039   2      		_nop_();
1040   2      		_nop_();
1041   2      		_nop_();
1042   2      		_nop_();
1043   2      		_nop_();
1044   2      		_nop_();
1045   2      		clk=1;
1046   2      		_nop_();
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 18  

1047   2      		_nop_();
1048   2      		_nop_();
1049   2      		_nop_();
1050   2      		_nop_();
1051   2      		_nop_();
1052   2      		_nop_();
1053   2      		_nop_();
1054   2      		_nop_();
1055   2      		_nop_();
1056   2      		_nop_();
1057   2      		_nop_();
1058   2      		_nop_();
1059   2      		_nop_();
1060   2      		V_flag_buf=V_flag_buf<<1;
1061   2      		B_iic_buf_r=sda;
1062   2      		_nop_();
1063   2      		clk=0;
1064   2      	}
1065   1      	_nop_();
1066   1      	_nop_();
1067   1      	_nop_();
1068   1      	_nop_();
1069   1      	_nop_();
1070   1      	_nop_();
1071   1      	_nop_();
1072   1      	_nop_();
1073   1      	_nop_();
1074   1      	_nop_();
1075   1      	_nop_();
1076   1      	_nop_();
1077   1      	_nop_();
1078   1      	_nop_();
1079   1      	sda=0;
1080   1      	_nop_();
1081   1      	_nop_();
1082   1      	_nop_();
1083   1      	_nop_();
1084   1      	clk=1;
1085   1      	_nop_();
1086   1      	_nop_();
1087   1      	_nop_();
1088   1      	_nop_();
1089   1      	_nop_();
1090   1      	_nop_();
1091   1      	_nop_();
1092   1      	_nop_();
1093   1      	_nop_();
1094   1              _nop_();
1095   1              _nop_();
1096   1              _nop_();
1097   1              _nop_();
1098   1      	clk=0;
1099   1      	return(V_flag_buf);
1100   1      }
1101          void Write_byte(BYTE V_write_temp)
1102          {
1103   1      uchar    i;
1104   1      	
1105   1           	for(i=0;i<8;i++)
1106   1             	{
1107   2                 	V_flag_buf=V_write_temp;
1108   2                 	sda=B_iic_buf_w;
C51 COMPILER V6.12  MTV230_TEST                                                            04/18/2007 11:29:40 PAGE 19  

1109   2                 	V_write_temp=V_write_temp<<1;

⌨️ 快捷键说明

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