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

📄 splc501hardware.lst

📁 电子词典的设计开发
💻 LST
📖 第 1 页 / 共 4 页
字号:
                     <      	//User can change  any of control pins at any bit, except user select the IO port 
                     <      	//of control pin the same as control bus. 
                     <      	//=======================================================
                     <      	//								FEDCBA9876543210					
                     <      	//.define		C_AOP_Pin    	00100000000000b;		//IO AOP
                     <      	//.define		C_EP_Pin   		01000000000000b;		//IO EP
                     <      	//.define		C_RWP_Pin     	10000000000000b;		//IO as RWP
                     <      	//								FEDCBA9876543210
                     <      	.define		C_AOP_Pin    	    0000000000010000b;		//IO AOP
                     <      	.define		C_EP_Pin   			0000000001000000b;		//IO EP
                     <      	.define		C_RWP_Pin     		0000000000100000b;		//IO as RWP
                     <      	//========================================================
                     <      	//Define the SPLC Data Bus Pin
                     <      	//Only Two Type Can Select
                     <      	//=====================================================
                     <      	//							FEDCBA9876543210
                     <      	.define		C_DataBus		1111111100000000b;		//IO Data Bus
                     <      	//.define		C_DataBus		0000000011111111b;
                     <      	.define		C_BusHighLow	1;			//Set Data High/Low Byte 1:High	
                     <      	//.define	C_AddressBus	0000000011111111b;		//IO Data Bus
                     <      	//.define	C_DataBus		0000000011111111b;		//IO Data Bus
                     <      	//.define	C_BusHighLow	0;			//Set Data High/Low Byte 0:Low
                     <      	//=====================================================
                     <      	//================================================
                     <      	//Set Control Pins Port
                     <      	//================================================
                     <      	//Set Control Pins At Port A
                     <      	//.define	P_IO_Control_Data			0x7000;		//P_IOA_Data
                     <      	//.define	P_IO_Control_Buffer			0x7001;		//P_IOA_Buffer
                     <      	//.define	P_IO_Control_Dir			0x7002;		//P_IOA_Dir
                     <      	//.define	P_IO_Control_Attrib			0x7003;		//P_IOA_Attrib
                     <      	//=========================================================
                     <      	//Set Control Pins At Port B
                     <      	.define	P_IO_Control_Data		0x7005;		//P_IOB_Data
                     <      	.define	P_IO_Control_Buffer		0x7006;		//P_IOB_Buffer
                     <      	.define	P_IO_Control_Dir		0x7007;		//P_IOB_Dir
                     <      	.define	P_IO_Control_Attrib		0x7008;		//P_IOB_Attrib
                     <      	//========================================================
                     <      	//=========================================================
                     <      	//Set Control Bus Port
                     <      	//==========================================================
                     <      	//Set Control Bus At Port A
                     <      	.define	P_IO_Data_Data				0x7000;		//P_IOA_Data
                     <      	.define	P_IO_Data_Buffer			0x7001;		//P_IOA_Buffer
                     <      	.define	P_IO_Data_Dir				0x7002;		//P_IOA_Dir
                     <      	.define	P_IO_Data_Attrib			0x7003;		//P_IOA_Attrib
                     <      	//==========================================================
                     <      	//Set Control Bus At Port B
                     <      	//.define	P_IO_Data_Data			0x7005;		//P_IOB_Data
                     <      	//.define	P_IO_Data_Buffer		0x7006;		//P_IOB_Buffer
                     <      	//.define	P_IO_Data_Dir			0x7007;		//P_IOB_Dir
                     <      	//.define	P_IO_Data_Attrib		0x7008;		//P_IOB_Attrib
                     <      	//=========================================================
0000CAE1                    	.code
                            	//////////////////////////////////////////////////////////////////////////////
                            	//Filename : F_Init_LCD_501
                            	//Function : Intialize  SPLC501c
                            	//Input    : None
                            	//Output   : None
                            	//Destory  : R1,R2,r3
                            	//////////////////////////////////////////////////////////////////////////////
                            	.public		_Init_LCD_501
                            	_Init_LCD_501:		.proc
0000CAE1 41 92              			R1 = 0x0001;
0000CAE2 19 D3 12 70        	        [P_Watchdog_Clear] = R1;   // reset watchdog
0000CAE4 40 F0 FF CA        	        CALL    F_LCD_Reset_Command;//Destory  : r3
0000CAE6 40 F0 0D CB        	        CALL    F_LCD_Command_Nop;	//Destory  : r3
0000CAE8 40 F0 1B CB        	        CALL    F_LCD_Solomon_Freq;	//Destory  : r3
0000CAEA 40 F0 36 CB        	        CALL    F_LCD_Power_Set;	//Destory  : r3
0000CAEC 40 F0 AB CB        	        CALL    F_LCD_Display_On;	//Destory  : r3
0000CAEE 40 92              	        R1 = 0x0000;                //Page No. = 0
0000CAEF 40 F0 D5 CB        	        CALL    F_Set_LCD_Page_No;	//Destory  : r3,r1
0000CAF1 40 92              	        R1 = 0x0000;                //Start line = 0
0000CAF2 40 F0 ED CB        	        CALL    F_Set_LCD_Start_Line;//Destory  : r3,r1
0000CAF4 40 94              	        R2 = 0x0000;                //Column address = 0
0000CAF5 40 F0 FE CB        	        CALL    F_Set_LCD_Column_Addr;//Destory  : r3,r2,r1
0000CAF7 40 F0 B9 CB        	        CALL    F_LCD_ALL_On;		//Destory  : r3
0000CAF9 40 F0 C7 CB        	        CALL    F_LCD_Normal_Display;//Destory  : r3
0000CAFB 40 96              	        R3 = 0x0000;                //Fill "00"
0000CAFC 40 F0 34 CC        	        CALL  F_Fill_All_LCD_Value;	
0000CAFE 90 9A              	        RETF;
                            			.endp
                            		
                            		
                            	//////////////////////////////////////////////////////////////////////////////
                            	//Subroutine
                            	//////////////////////////////////////////////////////////////////////////////
                            	F_LCD_Reset_Command:
0000CAFF 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB01 0A 95 00 FF        			r2=C_DataBus
0000CB03 0A 85 FF FF        			r2^=0xffff
0000CB05 02 B7              			r3&=r2
0000CB06 0B A7 00 E2        			r3|=0xe200
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB08 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB0A 40 F0 63 CC        			CALL F_Send_data			   
                            	//        R1=0x0AE2;                //Reset
                            	//        [P_Lcd501Ctrl]=R1;
                            	//        CALL    F_Delay_Bus_Time;
                            	
0000CB0C 90 9A              	        RETF;
                            	
                            	//////////////////////////////////////////////////////////////////////////////
                            	F_LCD_Command_Nop:
0000CB0D 13 97 00 70        			r3=[P_IO_Data_Data]
                            			
0000CB0F 0A 95 00 FF        			r2=C_DataBus
0000CB11 0A 85 FF FF        			r2^=0xffff
0000CB13 02 B7              			r3&=r2
                            		
0000CB14 0B A7 00 E3        			r3|=0xe300
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB16 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB18 40 F0 63 CC        			CALL F_Send_data			   
                            	//        R1=0x0AE3;                //Nop
                            	//        [P_Lcd501Ctrl]=R1;
                            	//        CALL F_Delay_Bus_Time;
                            	
0000CB1A 90 9A              	        RETF;
                            	
                            	//////////////////////////////////////////////////////////////////////////////
                            	F_LCD_Solomon_Freq:
0000CB1B 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB1D 0A 95 00 FF        					r2=C_DataBus
0000CB1F 0A 85 FF FF        			r2^=0xffff
0000CB21 02 B7              			r3&=r2
                            		
0000CB22 0B A7 00 C8        			r3|=0xC800					//C8
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB24 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB26 40 F0 63 CC        			CALL F_Send_data			  
                            	//        R1=0x0AA9;                //
                            	//        [P_Lcd501Ctrl]=R1;
                            	//        CALL F_Delay_Bus_Time;
0000CB28 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB2A 0A 95 00 FF        					r2=C_DataBus
0000CB2C 0A 85 FF FF        			r2^=0xffff
0000CB2E 02 B7              			r3&=r2
                            		
0000CB2F 0B A7 00 A0        			r3|=0xa000					//A0
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB31 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB33 40 F0 63 CC        			CALL F_Send_data			  
                            	//        R1=0x0AA1;                //ADC : Normal
                            	//        [P_Lcd501Ctrl]=R1;
                            	//        CALL F_Delay_Bus_Time;
                            	
0000CB35 90 9A              	        RETF;
                            	
                            	//////////////////////////////////////////////////////////////////////////////
                            	F_LCD_Power_Set:
0000CB36 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB38 0A 95 00 FF        					r2=C_DataBus
0000CB3A 0A 85 FF FF        			r2^=0xffff
0000CB3C 02 B7              			r3&=r2
                            		
0000CB3D 0B A7 00 A2        			r3|=0xa200
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB3F 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB41 40 F0 63 CC        			CALL F_Send_data			   
                            	//        R1=0x0AA2;
                            	//        [P_Lcd501Ctrl]=R1;        // 1/9 bias
                            	//        CALL F_Delay_Bus_Time;
0000CB43 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB45 0A 95 00 FF        					r2=C_DataBus
0000CB47 0A 85 FF FF        			r2^=0xffff
0000CB49 02 B7              			r3&=r2
                            		
0000CB4A 0B A7 00 24        			r3|=0x2400
                            			.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB4C 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB4E 40 F0 63 CC        			CALL F_Send_data			   
                            	//        R1=0x0A24;
                            	//        [P_Lcd501Ctrl]=R1;        // V5 RATIO 5 FOR 1/9 BIAS
                            	//        CALL F_Delay_Bus_Time;
0000CB50 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB52 0A 95 00 FF        					r2=C_DataBus
0000CB54 0A 85 FF FF        			r2^=0xffff
0000CB56 02 B7              			r3&=r2
                            		
0000CB57 0B A7 00 81        			r3|=0x8100
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB59 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB5B 40 F0 63 CC        			CALL F_Send_data			  
                            	//        R1=0x0A81;
                            	//        [P_Lcd501Ctrl]=R1;        // ELECTRONIC VOLUME MODE
                            	//        CALL F_Delay_Bus_Time;
0000CB5D 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB5F 0A 95 00 FF        					r2=C_DataBus
0000CB61 0A 85 FF FF        			r2^=0xffff
0000CB63 02 B7              			r3&=r2
                            		
0000CB64 0B A7 00 1A        			r3|=0x1a00
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;
                            			R3	=	R3	lsr	4;		
                            		.endif
0000CB66 1B D7 00 70        			[P_IO_Data_Data]=r3
0000CB68 40 F0 63 CC        			CALL F_Send_data			   
                            	//        R1=0x0A1A;
                            	//        [P_Lcd501Ctrl]=R1;        // MS Column : A
                            	//        CALL F_Delay_Bus_Time;
0000CB6A 13 97 00 70        			r3=[P_IO_Data_Data]
0000CB6C 0A 95 00 FF        					r2=C_DataBus
0000CB6E 0A 85 FF FF        			r2^=0xffff
0000CB70 02 B7              			r3&=r2
                            		
0000CB71 0B A7 00 D2        			r3|=0xd200
                            		.if	C_BusHighLow
                            		.else
                            			R3	=	R3	lsr	4;

⌨️ 快捷键说明

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