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

📄 0712.asm

📁 AV汇编 遥控 家庭功放带遥控 开关
💻 ASM
📖 第 1 页 / 共 2 页
字号:
               	  pt14_clk      BIT    p0.6
	  pt14_data     BIT    p0.7 
	  out1          bit    p2.7
	  out2          bit    p2.6
	  stdbay        bit    p2.5
	  sda02         BIT    p2.4  
	  scl02	        BIT    p2.3
	  powon         bit    p2.0
	  powoff        bit    p3.2
	  pt11_clk      BIT    p1.1
	  pt11_stb      BIT    p1.0
	  pt11_data     BIT    p1.2
	  klx           equ    31h
	  volmast       equ    32h
	  remvol        equ    33h
	  tiem1         equ    34h
	  tiem2         equ    35h
	  gif_sign      equ    36h
	  gif_time      equ    37h
	  gif_long      equ    38h
	  disp_buffer   equ    39h
	  disp_index    equ    3ah
	  bass          equ    3bh
	  treble        equ    3ch
	  balan         equ    3dh
	  delay_data    equ    3eh
	  dsp           equ    3fh
	  sys_sign      equ    40h
	  t_add         equ    41h
	  b_add         equ    42h
	  lastbmq   	equ    43h
	  khave         equ    44h
	  kdcnt         equ    45h
	  disp_h        equ    46h
	  disp_l        equ    47h
	  bal_l         equ    48h
	  bal_r         equ    43h
	  no_m          equ    49h
	  no_n          equ    50h
	  cs_x1         equ    51h
	  cs0_x1        equ    52h
	  u0_x1         equ    53h
	  yidong        equ    54h
	  phone         equ    55h
	  jiyiin        equ    56h
	  pt2314_msb    equ    57h
	  buff23        equ    58h
	  disp0         equ    59h
	  disp1         equ    5ah
	  pt_2314add    equ    88h
	  auto_sing     equ    20h.3
	  mute_bit      equ    20h.2
	  bpower        equ    20h.1
	  sta_data      equ    20h.0
	    
	  ;/////////////////////////////////////
	  org           0000h
	  jmp           start
	  org           0013h   
	  ajmp          rem
	  org           000bh
	  ajmp          itt0
	  org           001bh
	  ajmp          disp
	  ;///////////////////////////////
	  start:
	     mov       psw,#00h
		 mov       sp,#90h
		 mov       ie,#00h
		 mov       ip,#00h
		 clr       ea
		 mov       tmod,#00010001b
		 mov       th1,#0f0h
		 mov       tl1,#60h
		 mov       th0,#00h
		 mov       tl0,#00h
		 setb      tr0
		 setb      et0
		 setb      ea
		 setb      ex1
		 setb      it1
		 clr       ex0
		 clr       tr1
		 clr       29h.0
		 clr       20h.2
		 clr       p2.0
		 setb      p3.2
		 mov       no_m,#00h
		 mov       no_n,#00h
		 mov       volmast,#30h
		 call      start_vfd
	     call      bright	/*
     run_sta:
		 mov        a,time1
		 cjne       a,#1,run2
		 jmp        gif_1
       disp_b:
	     inc        time1
		 jmp        run_end
       run2:
	     mov        a,time1
		 cjne       a,#3,run3
		 jb         sta_data,run2_01
		 mov        a,gif_sign
		 cjne       a,#1,run2_3
		 jmp        run2_4
     run2_3:
	      call      sta_vfd
		  jmp       run2_1
	 run2_01:
	          ret
	 run2_02:
	          ret
     run2_1:
			 inc            time1
		     jmp            run_end
	  run3:  
		     mov            a,time1
		     cjne           a,#5,run4
      run4:
	         mov            a,time1
			; cjne          a,#7,run5
			 clr            tr1
			 jmp            wr_vfd
	  run4_1:
	         setb           tr1
			 inc            time
			 jmp            run_end
      run_end:
	         jmp            run_sta
      sta_vfd:
	         inc            delay_data
	         mov            a,delay_data
			 cjne           a,#45,sta_ret
			 mov            delay_data,#0  */
		      


			                                         


	     

		  
		   

	     
		         
	     

		 	 
    power:
	     mov   yidong,#01h
	     setb   ea
		 setb   tr1
		 setb   ex1
		 cpl    p2.5
		 cpl    p2.0
		 cpl    p3.2
   pw_1:
         mov     a,no_m
		 jz      pw_1
		 mov     no_m,#00h
		 xrl     a,#01h
		 jnz     pw_1
	  	 setb    tr1
		 setb    ex1
		 ;mov     r2,#00h
		 ;mov     r3,#0fh
   loop:
         mov     r3,a
		 xrl     a,#0fh
		 jnz     key
		 mov     r3,#00
   key:
         mov     a,no_m     
		 jz      loop
		 mov     a,#01h
		 mov     yidong,a
   loppvk:
         rl       a
		 mov      yidong,a
		 cpl      a
		 mov      p0,a
		 mov      a,no_m
		 jb       acc.0,scn12
   scn12:
         jb       acc.1,lop89
   lop89:
         mov      no_m,#00
		 rl       a
		 mov      dptr,#tab_key
		 nop
		 jmp      @a+dptr
   tab_key:
         ajmp     loop
		 ajmp     dvd   
		 ajmp     cd     
		 ajmp     aux
		 ajmp     phono
		 ajmp     tuner
		 ajmp     linin
		 ajmp     mute
;		 ajmp     power
;		 ajmp     funtion
		 ajmp     volup
		 ajmp     voldn
		 ajmp     bal
		 ajmp     balan_l
		 ajmp     balan_r     
		 ajmp     treup
		 ajmp     tredn
		; ajmp     loudon
;		 ajmp     loudoff
		 ajmp     swup
		 ajmp     swdn
		; ajmp     loop
		; ajmp     loop
		;///////////////////////////////////
     mute:
	     cpl       mute_bit
		 jnb       mute_bit,mute_on 
	muteo_off:
	     cpl       out1
		 cpl       out2
		 call      strvfd
		 call      disp_mute 
    mute_on:
	     cpl       out1
		 cpl       out2
		 call      strvfd
		 call      vfdvol
       	 ret
		 ;///////////////////////////////////////
      dvd:
	     mov       a,#0fbh
		 mov       p0,a
		 call      dvd_disp
		 call      vfdvol 
	     ret
		 ;////////////////////////////////////
      cd:
	     mov       a,#0fdh
		 mov       p0,a
		 call      cd_disp
		 call      vfdvol 
		 ret
		 ;///////////////////////////////////////
	 phono:
         mov       a,#0feh
		 mov       p0,a
		 call      phono_disp
		 call      vfdvol 
		 ret
		 ;/////////////////////////////////////////
      aux:
         mov       a,#0efh
		 mov       p0,a
		 call      aux_disp
		 call      vfdvol
		 ret 
		 ;//////////////////////////////////////
     tuner:
         mov       a,#0fdh
		 mov       p0,a
		 call      tuner_disp
		 call      vfdvol 
		 ret
		 ;/////////////////////////////////////
     linin:
	     mov       a,#0dfh
		 mov       p0,a
		 call      tuner_disp
		 call      vfdvol
		 ret
		 ;///////////////////////////////////////////
	voldn:
	     ;clr       mute_bit
;         lcall     mote_off
         mov          a,volmast	
         cjne         a,#0,mvol_dn
		 ret
		 ;//////////////////////////////////////////////
     bal:  
	     ret
     balan_l:
	      mov         a,bal_r
		  cjne        a,#0,br_1
		  mov         a,bal_l
		  cjne        a,#31d,bl_11
		  ret
	 br_1:
	      dec         a
		  mov         bal_r,a
		  add         a,#0e0h
		  lcall       pt2314_wr_bal
		  call        disp_bal
		  ret
	 bl_11:
	      inc         a
		  mov         bal_l,a
		  add         a,#0c0h
		  call        pt2314_wr_bal
		  lcall       disp_bal
		  ret
		  ;///////////////////////////////////////////////////
    balan_r:
	      mov        a,bal_l
		  cjne       a,#0,bl_1
		  mov        a,bal_r
		  cjne       a,#31d,br_11
		  ret
      bl_1:
	   	 dec         a
		 mov         bal_l,a
		 add         a,#0c0h
		 lcall       disp_bal
		 ret
	 br_11:
	     inc         a
		 mov         bal_r,a
		 add         a,#0e0h
		 lcall       pt2314_wr_bal
		 call        disp_bal
		 ret 
		 ;//////////////////////////////////////////////
   mvol_dn:
		 dec       a
		 mov       volmast,a
		 mov       pt2314_msb,a
		 lcall     pt2314_wr
		 mov       a,#63
		 subb      a,volmast
		 lcall     bin2bcd
		 lcall     strvfd
		 lcall     vfdvol
		 ret
		 ;//////////////////////////////////
     volup:	
         mov        a,volmast
         cjne   	A,#63,mvol_up
		 ret
     mvol_up:
         inc        a
         mov        volmast,a
         mov        pt2314_msb,a
         lcall      pt2314_wr
     dis_vol:
         mov     	a,#63
         subb    	a,volmast
         lcall   	bin2bcd
         lcall      vfddisp
         ret
		 ;//////////////////////////////////////////
	  swup:
		 mov       a,bass
		 cjne      a,14,ba_shuju
		 lcall     ddbs
		 ret
   ba_shuju:
         inc       a
		 mov       bass,a
		 call      ctrl_shuju
		 add       a,#60
		 mov       pt2314_msb,a
		 call      pt2314_wr
		 call      delay10
		 mov       a,bass
		 mov       b,a
		 mov       a,#b_add
		 call      wt24
     ddbs:
         mov       a,bass
		 mov       buff23,a
		 call      vfdbass
		 call      strvfd
		 ret
	  swdn:
	     mov       a,bass
		 cjne      a,#0,bai_shui
		 call      ddbs
	 	 ret
	 bai_shui:
         dec        a
		 mov        bass,a
		 lcall      ctrl_shuju  
         add        a,#60h
		 mov        pt2314_msb,a
		 lcall      pt2314_wr
		 call       delay10
		 mov        a,bass
		 mov        b,a
		 mov        a,#b_add
		 lcall      wt24
		 mov        a,bass
		 mov        buff23,a
		 call       vfdbass
		 call       strvfd
         ret
         ;//////////////////////////////
	treup:
	 	  mov      a,treble
		  cjne     a,#14,tr_shui
		  lcall    ddtr
		  ret     
    tr_shui:
	      inc       a
		  mov       treble,a
		  lcall     ctrl_shuju
		  add       a,#70h
		  mov       pt2314_msb,a
		  lcall     pt2314_wr
		  mov       b,treble
		  mov  	    a,#t_add
		  lcall     wt24
      ddtr:
          mov       a,treble
		  mov       buff23,a
		  call       vfdtre
		  call       strvfd
          ret
      tredn:
	      mov       a,treble
		  cjne      a,#0,tr1_shui
		  lcall     ddtr
		  ret
      tr1_shui:
          dec       a
		  mov       treble,a
		  lcall     ctrl_shuju
		  add       a,#70h
		  mov       pt2314_msb,a
		  lcall     pt2314_wr
		  mov       b,treble
		  mov       a,#t_add
		  lcall     wt24
		  mov       a,treble
		  mov       buff23,a
		  call       vfdtre
		  call       strvfd
		  ret
		phono_disp:
		  ret
		aux_disp:
		ret
  		disp_mute:
		ret
		
	   	
		ret
		vfdtre:
		ret
		strvfd:
		ret
		vfdbass:
		ret
	    vfddisp:
		ret
		vfdvol:
		ret
	    auto_vfd:
		ret
		dvd_disp:
		ret
		cd_disp:
		ret
		tuner_disp:
		ret
		linin_disp:	
		ret
		 disp_bal:
		 ret
      wr_vfd:
		    clr       pt11_clk
			mov       a,#70h
			call      outdata
			setb      pt11_stb
			nop
			nop
			clr       pt11_stb
			mov       a,disp_index
			mov       dptr,#table1
			add       a,#0c0h
			clr       c
			call      outdata
    		mov       r1,disp_buffer
    wr_vfd1:
	  		mov       a,@r1
			call      outdata
			inc       disp_buffer
			inc       disp_index
			cjne      a,#26,wr_qut
			mov       disp_buffer,#22h
			mov       disp_index,#0h
     wr_qut:
	       setb       pt11_stb
		   nop
		   nop
;		   jmp        run4_1
	  outdata:
	       mov        r0,#8
		   setb       pt11_data
		   nop
	  w1:
	       clr        pt11_clk
		   rrc        a
		   mov        pt11_data,c
		   setb       pt11_clk
		   djnz       r0,w1
		   ret
      start_vfd:
	      clr          pt11_stb
		  mov          a,#0c0h
		  call         outdata
		  ret 

⌨️ 快捷键说明

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